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

[BUG] Invalid enum var names are generated by multi-byte characters #14365

Closed
shmakovalexey opened this issue Jan 2, 2023 · 0 comments
Closed

Comments

@shmakovalexey
Copy link

Description

It's another solution for ISSUE-893

The project [swagger-codegen] (https://github.com/swagger-api/swagger-codegen/blob/master/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java#L324) contains a check for the uniqueness of names, as a result, when using multibyte characters, instead of a list of characters "_", classes are obtained without compilation errors. I think we need to do the same.

In a perfect world, it's the swagger description provider that should add the "x-enum-names" parameter, but in the real world it's very hard to get an external organization to modify their file. Thus, it will be very useful if third-party files are converted into classes that compile without errors.

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

No branches or pull requests

1 participant