valid-response-header-type
Overview
This rule belongs to the swagger-v2-standards-validation
ruleset and states that:
The type of the header object specified using property type
of the Header Object must have only one of the following values: string
, number
, integer
, boolean
, or array
. Other types are not supported or allowed.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Error |
Message | Invalid type of header found. |
Code | SWAGGER20STANDARDS_V222 |
Type | Validation |
Rule System | Semantic |
Broad Category | Response Headers |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | swagger2 swagger standards semantic validation type header object header |
Suggested Fixes
- Value of header type is compared in a case-sensitive manner.
- Ensure that the header type value matches exactly with the possible list of values and that there are no typos:
string
,number
,integer
,boolean
, orarray
. - Ensure that the value for header type is not null or empty.