-
Notifications
You must be signed in to change notification settings - Fork 762
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
Should default to consumes[0]
if no requestContentType
provided
#995
Comments
I've run into this as well. Is someone already working on this? If not, I can take a crack at it. I've already implemented part of it in my own requestInterceptor function. Also related, I've noticed that if I have a POST endpoint with a json parameter in the body and I call that operation with the tags interface like To get it to work, I have to serialize the value of the param explicitly Would it be reasonable to automatically stringify if the content type is application/json and it has an "in: body" parameter and the value is an object? I can create a separate issue for this if you'd like. |
@dwilson6 we're always looking for community contributions. Nobody has started working on this issue yet. As for the other thing you bring up, please open a separate ticket. I don't really follow what you're saying, but there are better developers than me on the project who will ;) |
I was going to look at this today but it looks like @bodnia has it almost done |
|
@ponelat when we do not have any content and ( |
you're right. |
fixed #1016 |
The final order of setting the
Content-Type
header should be as follows..has no req.body, no req.form
add nothing.requestContentType
, use that.has consumes
useconsumes[0]
has a "type: file"
parameteruse multipart/form-data
has "in: formData"
useapplication/x-www-form-urlencoded
The text was updated successfully, but these errors were encountered: