Skip to main content

unique-response-http-status-code

Overview

This rule belongs to the swagger-v2-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 for each response.

PropertyValue
EnabledYes
Maximum SeverityError
MessageDuplicate response status code entry found.
CodeSWAGGER20STANDARDS_V181
TypeValidation
Rule SystemSemantic
Broad CategoryResponses
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsswagger2 swagger standards semantic validation responses status code status http

Suggested Fixes

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

For More Information