Skip to main content

media-type-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 Media Type Object are mutually exclusive. This means that in a Media Type Object instance, only one of these properties must be present at a time but not both.

PropertyValue
EnabledYes
Maximum SeverityWarning
MessageMedia Type Object contains both example and examples properties.
CodeOPENAPI3STANDARDS_V131
TypeValidation
Rule SystemSemantic
Broad CategoryMedia Types
Products ImpactedAPI Transformer, Developer Experience Portal
Tagsopenapi3 openapi standards semantic validation examples example media type

Suggested Fixes

  • Remove either the example or examples property from the Media Type Object.

For More Information