Open ahrberg opened 3 years ago
@ahrberg thanks for reporting the issue.
Instead of guessing the content-type from the file, what about using the content-type specified in the specifications (2.0, 3.0)?
Thanks for reply @wing328 !
I guess the content-type from the specification could be used if only one content-type is accepted? But in my case the API accepts xml, and gzip. Or I'm I missing something?
One example with two accepted content-types I also found in the swagger documentation https://swagger.io/docs/specification/describing-request-body/multipart-requests/
Description
When uploading a gzip file the
Content-Type
is set toapplication/octet-stream
. According to RFC6713 it should beapplication/gzip
.openapi-generator version
v4.3.1 but bug still exists in master
Suggest a fix
Possible fix inspired by this. Targeting this line.
If accepted I can make a pull request.