-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
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
Suggestion: Support x-enumNames extension #234
Comments
Any update on this? Content & configurationIt would be great if ReDoc could take Swagger/OpenAPI definition: "PersonGender": {
"type": "integer",
"x-enumNames": [
"Female",
"Male",
"Other"
],
"enum": [
0,
1,
2
],
"description": ""
}, Is your feature request related to a problem?Right now the generator has to generate a "special" description so that the user knows the mapping - but this is not very structured. Describe the solution you'd likeIf there's an x-enumNames property in an enum schema, render the name in the dropdown with the same index as the value and submit the correct enum value. This way the description is not needed anymore. Describe alternatives you've consideredRight now we are using the description with the mappings - but that is not optimal... Additional contextRefs:
|
Is it different from x-enum-descriptions extension? |
The x-enumNames extension (generated by NSwagStudio in our case) includes the human readable name of an enum when you're using integers for enum rather than strings
It would be great if ReDoc could support being able to display what the integer element of an enum value means, rather than just the value
Currently it shows as
Valid values: 0 1 2
Showing something like
Valid values: Female (0) Male (1) Other (2)
would be really useful
The text was updated successfully, but these errors were encountered: