Skip to content

Support numeric value enums #694

Description

@mreiche

Is your feature request related to a problem? Please describe.
Enum values beginning with a number will result in VALUE_N keys.

"enum": [
    "1st",
    "2nd"
],

generated enum:

class MyEnum(Enum):
    VALUE_0="1st"
    VALUE_1="2nd"

Describe the solution you'd like
It would be better write the keys as

class MyEnum(Enum):
    VALUE_1ST="1st"
    VALUE_2ND="2nd"

Additional context
Having enums with anonymous VALUE keys are not human-readable.

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

    ✨ enhancementNew feature or improvement🥚breakingThis change breaks compatibility

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions