OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
[ ] [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
Since this commit, generated python api_client cannot handle deserializing json with a content type that does not start with application/json.
For example vendor extensions like application/vnd.amadeus+json
Bug Report Checklist
Description
Since this commit, generated python api_client cannot handle deserializing json with a content type that does not start with application/json. For example vendor extensions like application/vnd.amadeus+json
https://www.iana.org/assignments/media-types/application/vnd.amadeus+json
https://github.com/OpenAPITools/openapi-generator/commit/6ae8a8f4c7b00ed15bbb3cfdc49a7b99dbb56c4b
openapi-generator version
7.7.0
OpenAPI declaration file content or url
Generation Details
java -jar openapi-generator-cli-7.8.0-SNAPSHOT.jar generate -o ./generated -i ./test-api.yaml -g python
Steps to reproduce
Save the API declaration in a file and generate it.
When calling test_get() method, it fails with an exception because it doesnt understand application/vnd.amadeus+json is json:
Related issues/PRs
None I could find
Suggest a fix
In the api_client files updated by the commit I mention, Replace:
With: