valid-header-style
Overview
This rule belongs to the openapi-v3-standards-validation
ruleset and states that:
For headers, only the simple
style is applicable and rest will be treated as invalid.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Error |
Message | The current value of style is not applicable to headers. |
Code | OPENAPI3STANDARDS_V247 |
Type | Validation |
Rule System | Semantic |
Broad Category | Headers |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | openapi3 openapi standards semantic validation style serialization header |
Suggested Fixes
- Header style value is compared in a case-sensitive manner.
- Ensure that you are not using a style value that is not supported for headers e.g.
matrix
,label
,form
,spaceDelimited
,pipeDelimited
ordeepObject
. - Ensure that the value for style is not null or empty.
For More Information
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#style-values
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameter-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#header-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#style-values
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#parameter-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#header-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#openapi-specification
- https://docs.apimatic.io/rulesets/overview/