You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow requests with extra_params and no parameters
Without this commit, the following request:
post '/orders' do
example_request 'should take an optional parameter hash', order_type: 'big' do
...
end
end
would **not receive** the POST body/param `order_type: 'big'` specified.
The reason is that the function `params` was returning nil if
example.metadata[:parameters] was undefined, and the only one to
define example.metadata[:parameters] was to have previously called
"parameter". In other words, requests were not allowed to have so-called
"extra parameters" unless they had at least one "parameter" specified.
This commit removes this restrictions, allowing requests to specify all
their parameters "inline".
0 commit comments