Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.

[BUG] Data model is lost for python generator when http code is not in 2XX #90

Closed
spacether opened this issue Nov 22, 2022 · 0 comments · Fixed by #91
Closed

[BUG] Data model is lost for python generator when http code is not in 2XX #90

spacether opened this issue Nov 22, 2022 · 0 comments · Fixed by #91
Labels
bug Something isn't working

Comments

@spacether
Copy link
Contributor

Description

In the endpoint.handlebar , if the http code is not in the 2xx range, an exception is thrown:
https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/python/endpoint.handlebars#L395

The ApiException implementation only keeps the http message as a plain binary string:
https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/python/exceptions.handlebars#L93

From here on, the model corresponding to the OpenAPI schema of the response in case of a 5xx code for example, is lost.

Is this on purpose? Or maybe I'm doing something wrong ?

Copied from OpenAPITools/openapi-generator#14088
thank you @lsoica

@spacether spacether linked a pull request Nov 22, 2022 that will close this issue
3 tasks
@spacether spacether added the bug Something isn't working label Nov 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
1 participant