Skip to main content

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.

PropertyValue
EnabledYes
Maximum SeverityInformation
MessageThe response code definition takes precedence over the range definition for the same code.
CodeOPENAPI3STANDARDS_L100
TypeLinting
Rule SystemSemantic
Broad CategoryResponses
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsopenapi3 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.

For More Information