Skip to content
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

[BUG] Python Generated Code is always parsing responses as json even if the response type is string #4822

Closed
6 tasks
tkinz27 opened this issue Dec 17, 2019 · 1 comment

Comments

@tkinz27
Copy link

tkinz27 commented Dec 17, 2019

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • What's the version of OpenAPI Generator used?
  • Have you search for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Bounty to sponsor the fix (example)
Description

In the generated kubernetes client, responses that are strings are being loaded as json and then stringified resulting in a return value that is not correct.

See kubernetes-client/python#1032 (comment) for full details.

openapi-generator version
OpenAPI declaration file content or url
Command line used for generation
Steps to reproduce
Related issues/PRs
Suggest a fix
@spacether
Copy link
Contributor

Multiple response content types are deserializable in the python-experimental generator
One can see them here: https://github.com/OpenAPITools/openapi-generator/blob/master/samples/openapi3/client/petstore/python-experimental/petstore_api/api_client.py#L936
And they include:

  • 'application/octet-stream'
  • json
  • 'multipart/form-data'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants