Default value for the header is not consistent with the header’s type

Description

The default value you have defined for a header is not consistent with the type of the header.

Example

The following is an example how this issue could look in your API. The header parameter accepts integer values but the default value is a string.

"responses": {
          "200": {
            "description": "OK",
            "headers": {
              "x-internal-id": {
                "type": "integer",
                "default": "none",
                ...
              }
          }
     }
}

Remediation

Make sure that all default values for headers match the header type.

"responses": {
          "200": {
            "description": "OK",
            "headers": {
              "x-internal-id": {
                "type": "integer",
                "default": 0,
                ...
              }
          }
     }
}

 


Get API Security news directly in your Inbox.

By clicking Subscribe you agree to our Data Policy