Skip to main content

unique-response-http-status-code

Overview

This rule belongs to the openapi-v3-standards-validation ruleset and states that:

Response keys are patterned fields that must have unique values within the Responses Object. The keys represent the HTTP status code/range for each response.

PropertyValue
EnabledYes
Maximum SeverityError
MessageDuplicate response status code/range entry found.
CodeOPENAPI3STANDARDS_V195
TypeValidation
Rule SystemSemantic
Broad CategoryResponses
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsopenapi3 openapi standards semantic validation responses status code status range status http

Suggested Fixes

  • Remove duplicate response status code/range entries from the Responses Object.
  • Response key value is compared in a case-sensitive manner.

For More Information