Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Merge requests
  • !14366

Checking the uniqueness of elements in the ENUM to ensure the correctness of the generated classes

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open Administrator requested to merge github/fork/shmakovalexey/check-unique-names-in-enums into master Jan 02, 2023
  • Overview 1
  • Commits 2
  • Pipelines 1
  • Changes 2

Created by: shmakovalexey

It's another solution for https://github.com/OpenAPITools/openapi-generator/issues/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.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/shmakovalexey/check-unique-names-in-enums