-
Notifications
You must be signed in to change notification settings - Fork 9k
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
Multipart request doc example for OpenAPI 3.0 fails with err "not of type 'object' - 'address'" #7560
Comments
Hope this is the right issue tracker. Please advise if this is a doc problem (not software problem) in which case prolly I should have created an issue here instead: https://github.com/swagger-api/swagger.io/issues |
Hi @chrisinmtown yes it's the right issue tracker. We have to first determine if the problem is in swagger-ui or in swagger-client which actually executes requests for swagger-ui. We started to use new library for form data lately, so this might be related with it. |
I encountered similar issue where I reckon reason is performed JSON.stringify on the JSON object and as result the form field is supplied with string and not object. That causes validation failure and 400 as result from connexion. |
I had the same issue. But put extra information in the encoding section:
Fix the issue |
Using Python3.8, flask 1.1.4, connexion 2.9.0 and swagger-ui-bundle 0.0.9 I cannot make the example work from https://swagger.io/docs/specification/describing-request-body/multipart-requests/ and I pasted that spec below. Please forgive if this is a dupe, I searched other open issues for multipart but didn't spot an exact match to this behavior.
Q&A (please complete the following information)
Content & configuration
Example Swagger/OpenAPI definition -- exactly the spec from the Swagger web site, URL above
Swagger-UI configuration options: (none)
Describe the bug you're encountering
The multipart form is not uploaded as I expect. I click "Try it out" in the UI, put in valid data. The window shows this cURL command:
But an error comes back:
The server logs this error:
To reproduce...
Steps to reproduce the behavior:
Expected behavior
I was hoping the documentation example would work :)
The text was updated successfully, but these errors were encountered: