The value ‘multi’ for the property ‘collectionFormat’ is only allowed for ‘query’ and ‘formData’ array parameters

Description

The parameter in question has the value multi defined for the property collectionFormat. However, the parameter is not a query or formData array parameter. Only query and formData array parameters 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.

Example

The following is an example of how this issue could look in your API definition. The collectionFormatproperty 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"
}

Get API Security news directly in your Inbox.

By clicking Subscribe you agree to our Data Policy