Skip to main content

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

PropertyValue
EnabledYes
Maximum SeverityError
MessageParameter Object contains both schema and content properties.
CodeOPENAPI3STANDARDS_V078
TypeValidation
Rule SystemSemantic
Broad CategoryParameters
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsopenapi3 openapi standards semantic validation schema content type parameter

Suggested Fixes

  • Remove either the schema or content property from the Parameter Object.
  • The schema property is used more commonly while property content is recommended for more complex scenarios involving media types.

For More Information