Schema is an array schema, the ‘items’ property must be defined

Description

The schema in question is an array schema, but you have not defined the items property for it. Array schemas must have the items property defined.

For more details, see the OpenAPI Specification.

Example

The following is an example of how this could look like in your API definition:

{
"name": "user",
  "in": "body",
  "description": "The user to be added",
  "required": true,
  "schema": {
    "type": "array",
    "type": "string"
    }
}

Remediation

Make sure that all array schemas have the items property defined.

{
"name": "user",
  "in": "body",
  "description": "The user to be added",
  "required": true,
  "schema": {
    "type": "array",
    "items": {
      "type": "string"
       }
    }
}

Get API Security news directly in your Inbox.

By clicking Subscribe you agree to our Data Policy