Skip to main content

header-schema-and-content-are-mutually-exclusive

Overview

This rule belongs to the openapi-v3-standards-validation ruleset and states that:

The properties schema and content 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.

PropertyValue
EnabledYes
Maximum SeverityError
MessageHeader Object contains both schema and content properties.
CodeOPENAPI3STANDARDS_V250
TypeValidation
Rule SystemSemantic
Broad CategoryHeaders
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsopenapi3 openapi standards semantic validation schema content type header

Suggested Fixes

  • Remove either the schema or content property from the Header Object.

For More Information