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
Response serialisation doesn't support any other text content types but text/plain. In the openapi declaration provided example that contains content-type: text/csv.
It would require any server implementation that returns a response in text/csv format. I haven't one.
But from other declaration with the very same content type I have got an error:
E odm_api.exceptions.ApiException: (0)
E Reason: Unsupported content type: text/csv;charset=UTF-8
Bug Report Checklist
Description
Response serialisation doesn't support any other
text
content types buttext/plain
. In the openapi declaration provided example that contains content-type:text/csv
.openapi-generator version
7.7.0
OpenAPI declaration file content or url
Generation Details
Steps to reproduce
It would require any server implementation that returns a response in
text/csv
format. I haven't one. But from other declaration with the very same content type I have got an error:Related issues/PRs
https://github.com/OpenAPITools/openapi-generator/commit/6ae8a8f4c7b00ed15bbb3cfdc49a7b99dbb56c4b
Suggest a fix
I suppose we can substitute this condition in template:
to more general one:
Link in the code: https://github.com/OpenAPITools/openapi-generator/blob/2f5529a1845d7e5a9239a3b547a487fa5b3cfd29/samples/client/echo_api/python/openapi_client/api_client.py#L408