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
  • Issues
  • #4403
Closed
Open
Issue created Nov 07, 2019 by Administrator@rootContributor

[BUG][PHP] Model name suffix incorrectly added to inline enum names

Created by: hinrik

Consider this definition:

components:
  schemas:
    Foo:
      type: object
      properties:
        inline_enum:
          type: string
          enum: [one, two, three]
        referenced_enum:
            $ref: '#/components/schemas/ReferencedEnum'
    ReferencedEnum:
      type: string
      enum: [one, two, three]

If you generate PHP from this defintion using a modelNameSuffix=DTO option on the generator, the values of inline_enum will now change from being e.g. INLINE_ENUM_ONE to INLINE_ENUM_DTO_ONE, which doesn't make sense.

Values of ReferencedEnum are untouched, still ReferencedEnum::ONE (though they are unusable regardless for another reason).

Assignee
Assign to
Time tracking