When documenting an API, is there a way to provide a list of possible values? Something like this:
{
"name": "propertyType",
"in": "query",
"description": "Type of home",
"required": false,
"type": "list",
"listValues": ["singleFamilyHome", "condo", "farm", …]
}
In swagger 2.0 you can use enum:
{
"name": "propertyType",
"in": "query",
"description": "Type of home",
"required": false,
"type": "list",
"enum": ["singleFamilyHome", "condo", "farm"]
}
You ca find more info here: How to define enum in swagger.io?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With