We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Take a look on the following spec
"TenantAvailabilityState": { "enum": [ 1, 2, 3 ], "type": "integer", "format": "int32", "x-enumNames": [ "Available", "InActive", "NotFound" ] },
this produce following Dart
enum TenantAvailabilityState { @JsonValue('swaggerGeneratedUnknown') swaggerGeneratedUnknown, @JsonValue(1) value_1, @JsonValue(2) value_2, @JsonValue(3) value_3 } const $TenantAvailabilityStateMap = { TenantAvailabilityState.value_1: '1', TenantAvailabilityState.value_2: '2', TenantAvailabilityState.value_3: '3' };
What I'm expecting is an enum generated with same labels that are listed in x-enumNames spec's field, instead of value_1, value_2 and value_3!
enum
x-enumNames
value_1
value_2
value_3
Isn't it?
The text was updated successfully, but these errors were encountered:
Hi @fncap , thanks for raising issue. Actually, it's not a bug and looks like cool feature. I will try to take a look on it
Sorry, something went wrong.
Link with all possibilities of annotation enums: https://stackoverflow.com/questions/66465888/how-to-define-enum-mapping-in-openapi
fryette
Vovanella95
Successfully merging a pull request may close this issue.
Take a look on the following spec
this produce following Dart
What I'm expecting is an
enum
generated with same labels that are listed inx-enumNames
spec's field, instead ofvalue_1
,value_2
andvalue_3
!Isn't it?
The text was updated successfully, but these errors were encountered: