Please add x_enum_varnames supports for int ENUM #2510
shurshilov
started this conversation in
Ideas
Replies: 2 comments
-
|
I found solution x-enum-varnames |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
About the specialized Enum, it's related to #1313 and should be fixed with PR #2512 :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have enum like this openapi
"MyEnum": {
"type": "integer",
"enum": [1, 2],
"title": "MyEnum",
"x_enum_varnames": [
"NEW",
"ACTIVE",
]
},
I expect:
class MyEnum(IntEnum):
NEW = 1
ACTIVE = 2
I get:
class MyEnum(Enum):
integer_1 = 1
integer_2 = 2
the most gallant that the names match
and second I also expect IntEnum (preferably it can be passed with --use-subclass-enum parametr)
Beta Was this translation helpful? Give feedback.
All reactions