Skip to content

Commit

Permalink
FIX: #60 response code
Browse files Browse the repository at this point in the history
  • Loading branch information
hikari-desu committed Feb 8, 2020
1 parent a9b1a48 commit 60c7485
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/open_api/dsl/api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def data name, type = nil, schema = { }
end

def response code, desc, media_type = nil, headers: { }, data: { }, **options
(self[:responses][code] ||= ResponseObj.new(desc)).absorb(desc, media_type, headers: headers, data: data, **options)
(self[:responses][code.to_s] ||= ResponseObj.new(desc)).absorb(desc, media_type, headers: headers, data: data, **options)
end

alias_method :resp, :response
Expand Down

0 comments on commit 60c7485

Please sign in to comment.