Value 'multi' for the property 'collectionFormat' is only allowed for query parameters
Issue ID: validation-parameter-collectionformat
Description
The parameter in question has the value multi
defined for the property collectionFormat
. However, the parameter is not a query
or formData
parameter. Only query
and formData
arrays can have collectionFormat
set to multi
.
The value multi
value denotes multiple parameter instances instead of multiple values for a single instance, like other array format values.
For more details, see the OpenAPI Specification.
Example
The following is an example of how this issue could look in your API definition. The collectionFormat
property has been defined for a body parameter:
{
"name": "ID",
"in": "body",
"description": "ID of the account to be fetched",
"required": false,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
}
Remediation
Make sure that only query
and formData
array parameters have collectionFormat
set to multi
.
{
"name": "id",
"in": "query",
"description": "ID of the account to be fetched",
"required": false,
"type": "array",
"items": {
"type": "string"
},
"collectionFormat": "multi"
}