-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
Description
It's not clear how to document enums in a scalable manner. I want to provide users with a list of all possible enum values, and for each value provide a description of its meaning.
Ideally, I would like to link to the enum from the REST method that returns it and then provide a separate description (annotation) per value.
@ApiModelProperty(dataType = "string", allowableValues = "Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday", value = "description", notes = "notes")
is not a good fit because:
- The documentation falls out of date if an enum value is added or removed.
- I am forced to dump the description for all values in a single
notes
field. This clutters the code and is hard to maintain.
Any ideas?