-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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] Date and DateTime enums do not work in many languages #2404
Comments
👍 Thanks for opening this issue! The team will review the labels and make any necessary changes. |
I am working on this in #2297 for python only |
This one is still open, do we have any update on resolution? |
So this will having to be fixed on a generator by generator basis. Do you want to fix the generator that you need this in? I can point you to where to start. |
@spacether yes please let me know. |
@chikki1982 which generator do you need it working in? |
Hi @spacether , |
We support generating code in many languages and frameworks. |
Ok. Thanks. I would be needing the fix for the Java-based generator. Thanks. HTH |
Great; if you want to work on fixing that generator:
And some of the code that handles enums is here:
This project is run by and built by volunteers and fixes and contributions are welcome |
Bug Report Checklist
Description
Generators in python, java, csharp and others fail to generate valid datetime and date enum values. The expected behavior is that valid libraries are generated that cast date and datetime enums as the correct datatypes in the chosen languages.
Which version of openapi-generator are you using?
OpenAPI declaration file content or url
Command line used for generation
generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-jersey2.json -o samples/client/petstore/java/jersey2 -DhideGenerationTimestamp=true
Steps to reproduce
Related issues/PRs
#1312
#1299
#926
Suggest a fix
We should add the ability to these generators to handle date and datetime enums
The text was updated successfully, but these errors were encountered: