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.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Error |
| Message | Required property responses in Operation Object is missing. |
| Code | SWAGGER20STANDARDS_V065 |
| Type | Validation |
| Rule System | Semantic |
| Broad Category | Operations |
| Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
| Tags | swagger2 swagger standards semantic validation responses operation |
Suggested Fixes
- Add missing
responsesproperty in the Operation object. - Make sure that the
responsesproperty is a valid object and not set as null.