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.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Error |
| Message | Endpoint has a response definition with invalid status code/range. |
| Code | APIMATICPRE_V301 |
| Type | Validation |
| Rule System | Semantic |
| Broad Category | Endpoint Responses |
| Products Impacted | Code Generation, Developer Experience Portal, API Transformer |
| Tags | preliminary 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.