Skip to content

Java enums are not generated correctly with anyOf #798

@srividhyak27

Description

@srividhyak27

Using openapi-generator-maven-plugin 3.1.2

EventType:
  anyOf:
  - type: string
    enum:
      - "A"
      - "B"
      - "C"
      - "D"
  - type: string

Enum is generated as a class EventType and contains only the basic equals, toString and hashCode methods. The values not not available in the class.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions