openapi-python-client icon indicating copy to clipboard operation
openapi-python-client copied to clipboard

Add support for application/pdf content type

Open jrobbins-LiveData opened this issue 3 years ago • 0 comments

Is your feature request related to a problem? Please describe. I have a 3rd party schema describing an API which returns a PDF file with content application/pdf

Describe the solution you'd like I'd like either to add the following line to https://github.com/openapi-generators/openapi-python-client/blob/33040307d162f8703100bde8eb22745d07a4156a/openapi_python_client/parser/responses.py#L23

"application/pdf": "response.content"

or some interface to add that mapping myself.

Describe alternatives you've considered I'm currently patching _SOURCE_BY_CONTENT_TYPE to workaround this.

jrobbins-LiveData avatar May 02 '22 10:05 jrobbins-LiveData