richhollis / swagger-docs

Generates swagger-ui json files for Rails APIs with a simple DSL.
MIT License
750 stars 150 forks source link

Dropdown create #119

Closed shefaleechaudhary closed 8 years ago

shefaleechaudhary commented 9 years ago

Hello,

Can you please help me as I am not able to create drop down by using database value as option.

I have tried using enum , but not worked for me, Please provide me correct syntax.

Thank you.

richhollis commented 8 years ago

Example:

param_list :form, "freq", :string, :optional, "Frequency", ["daily", "monthly", "monthly"]
richhollis commented 8 years ago

And now also:

Support for Enums (PR #108)

property_list :type, :string, :optional, "Type", ["info", "warning", "error"]