response-code-overrides-response-range
Overview
This rule belongs to the openapi-v3-standards-linting
ruleset and states that:
The Responses Object supports explicit response codes as well as response ranges. If a response is defined using an explicit code and a response range definition also exists for the same code, the explicit code definition takes precedence over the range definition.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Information |
Message | The response code definition takes precedence over the range definition for the same code. |
Code | OPENAPI3STANDARDS_L100 |
Type | Linting |
Rule System | Semantic |
Broad Category | Responses |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | openapi3 openapi standards semantic linting response status code status range http status |
Suggested Fixes
- If the explicit code definition does not vary from the response range definition, you can safely remove the explicit code definition.