Open mortenegelund opened 2 weeks ago
Same issue as #19204
There 2 workarounds: x-enum-varnames in the contract or enumNameMappings option
Some generators have the enumPropertyNaming option. original
could solve your specific issue but you would loose the conversion to uppercase. Unfortunately no java implementation yet. There is #19277
There are no hard enum naming conventions in Java. I suggest enum parsing should be done at an absolute minimum level just to avoid syntax errors.
Description
When enum values are parsed with the Java parser, they get messed up in the generated code.
For example:
openapi-generator version
Version 7.8.0
Suggested fix
This bug has been introduced with https://github.com/OpenAPITools/openapi-generator/pull/18338
AbstractJavaCodeGen.java, line 1913:
Related issues/PRs
https://github.com/OpenAPITools/openapi-generator/pull/18338