Skip to main content

valid-http-status-code-range

Overview

This rule belongs to the apimatic-preliminary-validation ruleset and states that:

A response status must be a valid HTTP status code or range.

PropertyValue
EnabledYes
Maximum SeverityError
MessageEndpoint has a response definition with invalid status code/range.
CodeAPIMATICPRE_V301
TypeValidation
Rule SystemSemantic
Broad CategoryEndpoint Responses
Products ImpactedCode Generation, Developer Experience Portal, API Transformer
Tagspreliminary checks validation apimatic http status response endpoint

Suggested Fixes

  • For ranges, use "X" in upper case only. Ranges like 2xX or 2Xx are not valid.
  • XXX is not a valid range.
  • If only digits are used, the status must be a valid HTTP status code.

For More Information