Skip to content

Generate enums #426

Description

@slevy85

Hello,

Is it possible to generate typescript enums when using the json schema property "enum" ?

For example with this in my schema :

"gender": {
          "title": "Gender",
          "enum": ["male", "female"]
        },

I would have the resulting enum:

export enum Gender {
  male = 'male',
  female = 'female',
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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