Closed
Description
I am working with springfox version 2.9.2
In my spring boot application, I have a RestController with request parameter like:
@ApiParam(allowableValues="one, two, three")
@RequestParam(name = "expand", required = false) Set<NumberEnum> numbers
I have an Enum class NumberEnum with values {one, two, three, four}
On swagger am expecting to see: "Available values: one, two, three" Instead I see all the 4 enum values.
Here's how my swagger json looks like:
{
"name": "numbers",
"in": "query",
"description": "some desc",
"required": false,
"type": "array",
"items": {
"type": "string",
"enum": [
"one",
"two",
"three",
"four"
]
},
"collectionFormat": "multi",
"allowEmptyValue": false,
"enum": [
"one",
"two",
"three",
"four"
]
}
Am I doing something wrong here. Please advice.