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
I am encountering an issue with Swagger UI when using the Python generated code to perform multipart/form-data requests.
The server receives que request, but it fails validating the data. This happens both using the client code or the curl command.
http://localhost:8080/test validation error: '{\r\n "name": "string",\r\n "age": 0\r\n}' is not of type 'object' - 'body'
127.0.0.1 - - [12/Dec/2023 12:46:37] "POST /test HTTP/1.1" 400 -
Looking at the examples in the documentation, the root object is called body, and the file is binary so it is encoded octet-stream by default, so I don't see any errors here, but for some reason the server cannot validate it correctly .
Description
I am encountering an issue with Swagger UI when using the Python generated code to perform multipart/form-data requests.
The server receives que request, but it fails validating the data. This happens both using the client code or the curl command.
Looking at the examples in the documentation, the root object is called body, and the file is binary so it is encoded octet-stream by default, so I don't see any errors here, but for some reason the server cannot validate it correctly .
Swagger-codegen version
https://editor-next.swagger.io/
OS: Ubuntu 22.04.2 LTS
Python: Python 3.10.12
Python packages:
swagger-ui-bundle 0.0.9
connexion 2.14.2
urllib3 2.1.0
Flask 2.2.5
six 1.16.0
Swagger declaration file content
Steps to reproduce
It can be reproduced from python code or curl command:
The text was updated successfully, but these errors were encountered: