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
  • #1693
Closed
Open
Issue created Dec 17, 2018 by Administrator@rootContributor

Support for enum descriptions (x-enum-descriptions)

Created by: jmini

With https://github.com/OpenAPITools/openapi-generator/issues/893#issuecomment-416617460 we have introduced support for the x-enum-varnames extension.

In a similar way x-enum-descriptions should be supported:

  weather:
    type: object
    properties:
      type:
        type: integer
        format: int32
        enum:
          - 1
          - 2
          - 3
        x-enum-descriptions:
          - 'Blue sky'
          - 'Slightly overcast'
          - 'Take an umbrella with you'
        x-enum-varnames:
          - Sunny
          - Cloudy
          - Rainy

The java generator could add some Javadoc on top of the enum value.

Assignee
Assign to
Time tracking