-
Notifications
You must be signed in to change notification settings - Fork 74
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 not allowing upload of text files. #528
Comments
Maybe the I'm open to suggestion about how to improve/fix this if it is the case. It might be interesting to also try with different OpenAPI versions, and perhaps with RapiDoc. |
Hello, so I tried setting the OPENAPI_VERSION = "2.0", and it worked! I will try to peek into the source files later to check if I can find the cause. |
OpenAPI 2 is quite different and although I never heard of a deprecation date, I'd be reluctant to push for its use. However, there are slight differences in v3.0.x and v3.1.x and it could be worth trying both, if only to help debugging this. I don't think apispec is perfectly 3.1 compliant. The test with RapiDoc could help ruling out a Swagger UI issue or at least give a hint. |
Okay, I'll investigate this, keeping in mind the points you have provided. I'll check:
|
Hello!
I was trying to upload two .txt files to do some text processing. I uploaded through the input fields in Swagger UI generated by API. But, the Swagger-UI gives me the following error:
Details
Here's the relevant parts of the code:
The code works fine when tested using Postman. Problem only shows up in Swagger-UI
Also, when I didn't attach the files in the Swagger-ui, the code worked fine and returned intended response, so likely the issue might be with the Upload() field.
What could I be doing wrong?
Thanks!
The text was updated successfully, but these errors were encountered: