Skip to content
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

[Java] Enums are renamed - why?? #1075

Open
AttilaW-Keytiles opened this issue Oct 30, 2022 · 0 comments
Open

[Java] Enums are renamed - why?? #1075

AttilaW-Keytiles opened this issue Oct 30, 2022 · 0 comments

Comments

@AttilaW-Keytiles
Copy link
Contributor

AttilaW-Keytiles commented Oct 30, 2022

Description

Enum values are renamed in generated Java classes - compared to what I write in the schema.

This "feature" was already reported several times (in the swagger-codegen project)

I found even a closed MR (in the swagger-codegen project at least)

My question first of all would be: why? Why was such a mechanism introduced at all?
What do I miss?? What is the benefit / intention by doing this?

Does anyone know the answer for this?

In DefaultCodegenConfig there is a method findCommonPrefixOfVars() which is used in Enums generation and at the end of the day leads to renaming Enums.
Since this thing is sitting in DefaultCodegenConfig although not verified maybe happening in other languages too not just Java. For Java it is there for sure.

Version

1.0.36-SNAPSHOT (current master - when I file this problem)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant