Property defined for a header is not applicable for the parameter type

Description

A property defined for a parameter in a header is not applicable for the type of the parameter.

Example

The following is an example of how this issue could look like in your API definition. The rate limiting header can include parameters of the type integer, but the parameters also have the property maxLength defined which is a property of string parameters, not integers:

{
 "headers": {
    "X-Rate-Limit-Limit": {
      "description": "The number of requests allowed in the current period",
      "type": "integer",
      "maxLength": 8,
    },
    ...
  }
}

Remediation

Make sure that all properties defined for parameters match the parameter type.

{
 "headers": {
    "X-Rate-Limit-Limit": {
      "description": "The number of requests allowed in the current period",
      "type": "integer"
    },
    ...
  }
}

Get API Security news directly in your Inbox.

By clicking Subscribe you agree to our Data Policy