The HTTP response code keys of the ‘responses’ object must be between 100 and 999

Description

One or more responses objects in your API have non-standard HTTP response code keys. The HTTP response code keys must be between 100 and 999.

Example

The following is an example how this could look in your API definition. Here, the response code has a typo and is missing one number:

"responses": {
    "20": {
    "description": "Expected response to a valid request",
    "schema": {
      "$ref": "#/definitions/Pets"
    }
  }
}

Remediation

Make sure that all responses objects have HTTP response code keys between 100 and 999.

"responses": {
    "200": {
    "description": "Expected response to a valid request",
    "schema": {
      "$ref": "#/definitions/Pets"
    }
  }
}

Get API Security news directly in your Inbox.

By clicking Subscribe you agree to our Data Policy