-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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][JAVA] Enum generation fails on same values in upperCase and lowerCase #12624
Comments
I am currently facing the same issue, have you had any updates on this ? |
No updates. |
Just responded to a similar PR/issue but for C#: #16981 (comment) If we add the |
Does it add a suffix when both generated values are the same ? |
It doesn't. Using the example provide in the issue. the command line input would look like
so that users will have complete control of the enum naming to handle edge cases reported in this issue. |
Merged #17018 to fix the issue Please pull the latest master to give it a try. e.g.
|
Bug Report Checklist
Description
For Java the enum's are generated with name upper and value is the value of the openapi spec.
In our case we need to be compliant with another specification which has the same value in uppercase and lowercase.
This causes a compile error in the java generated enum:
Is there a config setting for this? (Could not find it)
Actual:
Compile exception (see above)
Expected:
Generation of multiple casing should compile the java enum file
Maybe just like
org.jsonschema2pojo.Jsonschema2Pojo
It generates a enum name with an underscoreS_("S"),
for the second name.openapi-generator version
'org.openapi.generator' version '5.4.0'
OpenAPI declaration file content or url
Generation Details
gradle plugin is used
Steps to reproduce
Generate the models
Related issues/PRs
In this issue a same problem is described but not solved: #12187 (comment)
Suggest a fix
Maybe just like
org.jsonschema2pojo.Jsonschema2Pojo
It generates a enum name with an underscoreS_("S"),
for the second name.The text was updated successfully, but these errors were encountered: