class ContactsControllerSchema < ApplicationControllerSchema
  def create
    request do
      body_parameters do |s|
        s.hash "contact" do |s|
          s.contact_attributes
        end
      end
    end
    response_for do |status|
      status.ok # contacts/create.schema
      status.unprocessable_entity do
        body do |s|
          s.string "error"
        end
      end
    end
  end
end

class ContactsControllerSchema < ApplicationControllerSchema
  def create
    request do |r|
      r.body_parameters do |s|
        s.hash "contact" do |s|
          s.contact_attributes
        end
      end
    end
    response_for do |status|
      status.ok # contacts/create.schema
      status.unprocessable_entity do |s|
        s.body do |s|
          s.string "error"
        end
      end
    end
  end
end

Adjust to new DSL syntax.
Adjust to new DSL syntax.
