Skip to main content

valid-test-case-expected-status

Overview

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

The expected status of a test case must be a valid HTTP status code or range and its corresponding response definition must be present in the endpoint responses.

PropertyValue
SeverityError
MessageThe expected status of test case is invalid.
CodeAPIMATICCODEGEN_V167
TypeValidation
Rule SystemSemantic
Broad CategoryTest Cases
Products ImpactedCode Generation, Developer Experience Portal
Tagsapimatic code generation codegen sdks portal docs validation apimatic response status test case endpoint

Suggested Fixes

  • The expected status must contain only 3 characters (digits or X for ranges).
  • 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 expected status must be a valid HTTP status code.
  • Must match regex pattern [1-5][0-5X][0-8X]
  • Disable the test case by turning off the Enabled flag.

For More Information