Skip to content

Support for enum descriptions (x-enum-descriptions) #1693

Open
@jmini

Description

@jmini

With #893 (comment) 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions