mirror of
https://github.com/ditkrg/rswag.git
synced 2026-01-25 15:22:56 +00:00
Allows for parameters to be defined without the 'in' key defined to allow for parameter
This commit is contained in:
@@ -36,7 +36,9 @@ module Rswag
|
||||
end
|
||||
|
||||
def parameter(attributes)
|
||||
attributes[:required] = true if attributes[:in].to_sym == :path
|
||||
if attributes[:in] && attributes[:in].to_sym == :path
|
||||
attributes[:required] = true
|
||||
end
|
||||
|
||||
if metadata.has_key?(:operation)
|
||||
metadata[:operation][:parameters] ||= []
|
||||
|
||||
Reference in New Issue
Block a user