Skip to main content

header-example-overrides-schema-example

Overview

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

An example for a header can be provided in two ways: either directly in the Header Object using the example/examples property or in the Schema Object definition when specifying the header level schema property. If an example is provided at both levels, the Header Object level example will override the Schema Object level example.

PropertyValue
EnabledYes
Maximum SeverityInformation
MessageHeader Object level example found that overrides the example present in the header's schema definition.
CodeOPENAPI3STANDARDS_V252
TypeValidation
Rule SystemSemantic
Broad CategoryHeaders
Products ImpactedAPI Transformer, Developer Experience Portal
Tagsopenapi3 openapi standards semantic validation example header schema

Suggested Fixes

  • If the header schema level example adds no new example value as compared to the one at Header Object level, remove the schema level example property.

For More Information