-
Notifications
You must be signed in to change notification settings - Fork 472
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swagger-ui for JSON APIs sends incorrect content-type #721
Comments
A related issue #623. It should be either setting default consume to 'application/x-www-form-urlencoded', or setting default params_type to 'body'. Otherwise, Swagger-UI will be unusable without a patch to this gem for semantic errors like:
|
Have the same issue, would love to see this resolved 👀 |
Just a quick ping on this issue. Looks like it should be following: And v3: |
My workaround FYI is to add requires(
:data,
type: Array[JSON],
documentation: { param_type: 'body' }
) do
end |
Relevant lines are
and
|
Hi all, I've made a PR fixing this default behaviour at #880 |
fixed in #927 |
Coming from swagger-api/swagger-ui#4981
Swagger UI produces multipart bodies on POST tries. I believe this is because the swagger API produces fields with
in: 'formData'
. It seems that the code does that for any primitive type, instead of doingin: 'body'
. Doesn't seem right.Monkey patching this works around the problem.
But probably not the right solution?
The text was updated successfully, but these errors were encountered: