no-header-name-property
Overview
This rule belongs to the openapi-v3-standards-validation
ruleset and states that:
An explicit name
property must not be set in the Header Object since that is specified already when defining the headers map.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Error |
Message | Property name is specified in the Header Object which is not allowed. |
Code | OPENAPI3STANDARDS_V245 |
Type | Validation |
Rule System | Semantic |
Broad Category | Headers |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | openapi3 openapi standards semantic validation name header |
Suggested Fixes
- Remove the property
name
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/