single-entry-header-content-map
Overview
This rule belongs to the openapi-v3-standards-validation
ruleset and states that:
The content
property of the Header Object is a map that contains representations of the header such that the key represents the media type while the value describes the header schema. This content map must contain only one entry.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Error |
Message | Header content map contains more than one entries. |
Code | OPENAPI3STANDARDS_V254 |
Type | Validation |
Rule System | Semantic |
Broad Category | Headers |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | openapi3 openapi standards semantic validation map content schema header |
Suggested Fixes
- Keep only one entry in the header content map and remove all others.
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/