Description
What is the current support for an ApiModelProperty
being a List
and declaring allowableValues
?
If I have a request object whose type is just a standard type (e.g. String), then the generated swagger spec will show the type as string
and enum containing the allowable values. Likewise, all of the allowable values will display properly on the swagger UI page.
If I have a request object whose type is a List, then the generated swagger spec will show the type as array
, but there will be an items
entry with type string
and enum containing the allowable values. The set of allowable values will not be displayed at all on the swagger UI page.
If I run swagger-codegen for Java against this spec file I end up getting an error when it tries to generate the model for the request object. The failure seems to indicate that it thinks the value type itself is an ArrayList
instead of just the (generated) enum.
I don't know if this problem lies within springfox or the swagger-codegen, but the fact that the UI page doesn't display the set of allowable values leads me to think this is an issue with springfox.