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
The following example will cause a failure due to sending parameters as:
Processing by Api::PostsController#show as application/json
Parameters: {"{}"=>nil, "id"=>"0ae45670-7beb-4ff5-aac8-3df1dd4ce601"}
RspecApiDocumentation.configuredo |config|
config.post_body_formatter=:jsonendresource'Post'dodelete'/posts/:id'dolet(:id){'0ae45670-7beb-4ff5-aac8-3df1dd4ce601'}example_request'delete a post'doexpect(status).toeql(204)endendend
This does not occur when using example alongside do_request, only with example_request due to setting the params as default to {}.
Where this happens
I dug into this, and the {"{}"=>nil} portion occurs all the way down in Rack::Utils.parse_query.
The text was updated successfully, but these errors were encountered:
jsmestad
changed the title
config.post_body_formatter = :json and no params causes error with example_requestconfig.post_body_formatter = :json and no params causes bad payload with example_request
Dec 5, 2014
The following example will cause a failure due to sending parameters as:
This does not occur when using
example
alongsidedo_request
, only withexample_request
due to setting the params as default to{}
.Where this happens
I dug into this, and the
{"{}"=>nil}
portion occurs all the way down inRack::Utils.parse_query
.Workaround
The text was updated successfully, but these errors were encountered: