The header format is not consistent with the type

Description

The format you have specified for a numeric header is not consistent with the type you have defined. While this is acceptable, it may not be what you want.

Example

The following is n example of how this issue could look in your API definition. The header type is integer, but format is float which is not an integer format:

"responses": {
  "200": {
    "description": "OK",
    "headers": {
      "x-ids": {
        "schema": {
          "type": "integer",
          "format": "float"
        }
      }
    }
  }
}

Remediation

Make sure that the formats of all numeric headers match the type of the headers.

Numeric headers type integer can have the format int32 or int64. Numeric headers type number can have the format float or double.

"responses": {
  "200": {
    "description": "OK",
    "headers": {
      "x-ids": {
        "schema": {
          "type": "integer",
          "format": "int32"
        }
      }
    }
  }
}

Get API Security news directly in your Inbox.

By clicking Subscribe you agree to our Data Policy