flask restx enum model

Viewed 1559

How to create an Enum api model in flask restx with one string field without other properties so that the following description is generated in swagger.yml?

definitions:
    Colors:
      type: string
      enum: [black, white, red, green, blue]

enter image description here Maybe some hacks will help? Because now it seems like you can create an api model with properties only

1 Answers
Related