No default response defined for the operation
One or more operations in your API have no default response defined.
OpenAPI Specification (OAS) defines the default response as optional. It can be used as the default response object for all HTTP codes that are not covered individually in the OpenAPI definition. It can also be used to cover undeclared responses.
For more details, see the OpenAPI Specification.
The following is an example of how this type of risk could look in your API definition:
1responses: 2 "200": 3 description: Expected response to a valid request 4 schema: 5 $ref: "#/definitions/Pets" 6
Possible exploit scenario
Attackers strive to make your APIs behave in an unexpected way to learn more about your system or to cause a data breach. We highly recommend that you minimize any risks and clearly specify the data that your API operations can return for each possible response code.
Define default responses for all API operations:
1responses: 2 "200": 3 description: Expected response to a valid request 4 schema: 5 $ref: "#/definitions/Pets" 6 default: 7 description: unexpected error 8 schema: 9 $ref: "#/definitions/Error" 10
Copyright 42Crunch 2021