-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[JAVA] enums with number type are not supported #447
Labels
Comments
Actually, looking at the initial issue gave me an idea to test. What I can say now is that, with 3.0.3, my problem is fixed if I use |
@le-jhe I am glad your problem is solved, but I still think that we should support |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Description
Given that a numerical enum is in my custom input types, openapi-generator "decides" to use BigDecimal for mapping the "type" : "number" (maybe because of something in my pom). The problem is that the java source code generated for the enum is not correct
Correct code should be something like
openapi-generator version
OpenAPI declaration file content or url
With the following type definition in my input .json file:
Command line used for generation
Steps to reproduce
mvn package
Suggest a fix/enhancement
Check AbstractJavaCodegen.java:1045 ( toEnumValue(...) )in the list of numerical types, BigDecimal is not there, thus the processor goes to default and just wraps escaped values with string
The text was updated successfully, but these errors were encountered: