Skip to main content

required-operation-responses

Overview

This rule belongs to the swagger-v2-standards-validation ruleset and states that:

The Operation Object in a Swagger 2.0 document must specify list of possible responses that can be returned from executing this operation, using the responses property.

PropertyValue
EnabledYes
Maximum SeverityError
MessageRequired property responses in Operation Object is missing.
CodeSWAGGER20STANDARDS_V065
TypeValidation
Rule SystemSemantic
Broad CategoryOperations
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsswagger2 swagger standards semantic validation responses operation

Suggested Fixes

  • Add missing responses property in the Operation object.
  • Make sure that the responses property is a valid object and not set as null.

For More Information