Comments (2)
@fabricio-godoi Were you sending through an accept header on your requests? I recently found in my own projects that the form data parsing fails if an accept header that is not "multipart/form-data" or "application/x-www-form-urlencoded" is sent on the request.
It's specifically coming from this line.
It seems like the accept header is incorrectly being used to determine whether the request will have form data or not; instead of the content-type header.
It will work as intended if no accept header is sent, or if an accept header like "*/*", "application/*" or "multipart/*" is used. However doing that as a work around seems ill advised.
from swagger-routes.
@russell-matt I was not providing the accept header, just the "content-type": "multipart/form-data".
For now, I set the field as not required since I could not configure it properly, but I`ll keep in mind that workaround in future releases.
But the problem is with the swagger web interface that does not set up the accept header, so this workaround will not resolve all my problems 😞
I hope that is fixed in the feature releases. Thank you for your response 😄
from swagger-routes.
Related Issues (15)
- Removing an API, adding an API using JSON and preventing handler generation. HOT 4
- Parameter with an array is not being validated and maybe not parsed correctly HOT 5
- Support for OpenAPI 3.0 HOT 6
- Response validation
- Unexpected fields validation HOT 1
- Errors from middleware swallowed by promise HOT 2
- Help on usage HOT 3
- Not initializing on Windows
- Support for restify 7.x and 8.x HOT 2
- Order of excecution of security handlers
- `apiSpecs.js` broken after axios update
- Split apiSpecs into separate module
- path.id is not of a type(s) integer HOT 1
- Array items failing validation HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swagger-routes.