Related questions
swagger @ApiModelProperty example value for List<String> property
I have one class in which there is one property which is List<String>
public class MyClass {
....
@ApiModelProperty(position = 2)
private List<String> productIdentifiers;
....
}
This code generates the example values as following:
{
"customerId": "1001",
"productIdentifiers": [
"string"
],
"statuses": [
"NEW"
]
}
…
Enum in swagger
I'm wondering how to document enums in swagger.
According to JavaDoc
The dataType. See the documentation for the supported datatypes. If the data type is a custom object, set it's name, or nothing. In case of an enum use 'string' …