-
Notifications
You must be signed in to change notification settings - Fork 6k
Open
Description
Description
We have a lot of enums defined in our backend. We have a small UI that shows these enums as a dropdown. The problem we face is whenever we update the enums on our backend. We have to update the frontend code. If swagger codegen can provide the enum values as a list we can return that in an API for frontend to populate these values or use this function to render it in django forms.
For example:
Consider this class
swagger-codegen/samples/client/petstore/python/petstore_api/models/outer_enum.py
Lines 29 to 31 in b7ba962
| PLACED = "placed" | |
| APPROVED = "approved" | |
| DELIVERED = "delivered" |
It has enums placed, approved, delivered. But there is no way for me to get these values as a list at the moment.
Swagger-codegen version
2.4.8
Suggest a fix/enhancement
Add a function that returns the list of enum vars.
Metadata
Metadata
Assignees
Labels
No labels