droptheplot / apipony

Rails API documentation DSL
MIT License
11 stars 2 forks source link

Fixed undefined method 'set' for #<Apipony::Response> #11

Closed Novtopro closed 7 years ago

droptheplot commented 8 years ago

Thanks for the PR! But why do you need set method inside response_with? There is attribute method to describe each attribute and example method for headers and body as json. E.g.:

response_with 200 do
  example do
    set :body, {
      test: :test
    }
  end
  attribute :test, type: :string
end