-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ApiModelProperty doesn't seem to support List and allowableValues #1565
Comments
Yeah, at the moment |
Is this issue closed because it should work already or because it won't be fixed? I have a similar problem. My object has a list of enum values, but I want to restrict the values which may be used by the API. enum MyEnum { VAL1, VAL2, VAL3 } This works: @ApiModelProperty(allowableValues = "VAL1,VAL2")
MyEnum myenum; This doesn't work (it ignores the allowableValues and uses all possible enum values instead): @ApiModelProperty(allowableValues = "VAL1,VAL2")
List<MyEnum> mylist; |
It would be nice to support other types as well for allowed values |
In 2019 this still doesn't work for List |
In 2021 this still doesn't work for List |
In 2022 this still doesn't work for List |
I have the following annotation in my model
the swagger.json generated is as follows.
allowableValues
are missing from theswagger.json
.Also is array the correct output type for a
List<String>
?My config
The text was updated successfully, but these errors were encountered: