At least one 200 or 202 response should be defined for GET operations
GET operations in your API must have at least one
202 response defined.
For more details, see RFC 7231.
The following is an example of how this type of risk could look in your API definition:
1get: 2 description: Returns all pets from the system that the user has access to 3 # ... 4 responses: 5 default: 6 description: unexpected error 7 schema: 8 $ref: "#/definitions/Error" 9
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.
202 responses for all
1get: 2 description: Returns all pets from the system that the user has access to 3 # ... 4 responses: 5 "200": 6 description: pet response 7 schema: 8 type: array 9 items: 10 $ref: Pet.json 11 default: 12 description: unexpected error 13 schema: 14 $ref: "#/definitions/Error" 15
Copyright 42Crunch 2021