header-example-and-examples-are-mutually-exclusive
Overview
This rule belongs to the openapi-v3-standards-validation
ruleset and states that:
The properties example
and examples
in Header Object are mutually exclusive. This means that in a Header Object instance, only one of these properties must be present at a time but not both.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Warning |
Message | Header Object contains both example and examples properties. |
Code | OPENAPI3STANDARDS_V251 |
Type | Validation |
Rule System | Semantic |
Broad Category | Headers |
Products Impacted | API Transformer, Developer Experience Portal |
Tags | openapi3 openapi standards semantic validation examples example header |
Suggested Fixes
- Remove either the
example
orexamples
property from the Header Object.
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/