-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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] Int Enum serialization is the enum name instead of value #18327
Labels
Comments
BaptisteSaves
added a commit
to BaptisteSaves/openapi-generator
that referenced
this issue
Apr 8, 2024
5 tasks
BaptisteSaves
added a commit
to BaptisteSaves/openapi-generator
that referenced
this issue
Apr 9, 2024
BaptisteSaves
added a commit
to BaptisteSaves/openapi-generator
that referenced
this issue
Apr 9, 2024
BaptisteSaves
added a commit
to BaptisteSaves/openapi-generator
that referenced
this issue
Apr 9, 2024
BaptisteSaves
added a commit
to BaptisteSaves/openapi-generator
that referenced
this issue
Apr 9, 2024
BaptisteSaves
added a commit
to BaptisteSaves/openapi-generator
that referenced
this issue
Apr 9, 2024
BaptisteSaves
added a commit
to BaptisteSaves/openapi-generator
that referenced
this issue
Apr 9, 2024
BaptisteSaves
added a commit
to BaptisteSaves/openapi-generator
that referenced
this issue
Apr 9, 2024
BaptisteSaves
added a commit
to BaptisteSaves/openapi-generator
that referenced
this issue
Apr 10, 2024
wing328
pushed a commit
that referenced
this issue
Apr 10, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Report Checklist
Description
When using Enum as a parameter, the serialization is the enum name instead of the value.
Enum.NUMBER_0
instead of0
openapi-generator version
v7.4.0
OpenAPI declaration file content or url
Generation Details
Simple generation in 7.4.0 with -g python
Steps to reproduce
This code currently fails
Suggest a fix
https://github.com/OpenAPITools/openapi-generator/blob/f323a3e788ec932ddc1e31f44f3bd0c8a88f7dbc/modules/openapi-generator/src/main/resources/python/api_client.mustache#L355C25-L355C28 Before testing for primitive types, test for
Enum
and returnobj.value
In Python, the object is both primitive and enum
--> will push a PR with this fix
The text was updated successfully, but these errors were encountered: