no-header-location-property
Overview
This rule belongs to the openapi-v3-standards-validation
ruleset and states that:
An explicit in
property must not be specified in the Header Object to indicate location since the type of object already implicitly implies it to be header
.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Error |
Message | Property in is specified in the Header Object which is not allowed. |
Code | OPENAPI3STANDARDS_V246 |
Type | Validation |
Rule System | Semantic |
Broad Category | Headers |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | openapi3 openapi standards semantic validation location header |
Suggested Fixes
- Remove the property
in
from the Header Object. - If you are referencing a global/reusable parameter using $ref, ensure that you reference a Header Object and not a Parameter Object, in order to avoid this issue.
For More Information
- 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#header-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#openapi-specification
- https://docs.apimatic.io/rulesets/overview/