Skip to main content

required-discriminator-property-name

Overview

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

The Discriminator Object must specify the name of the property in the payload that will hold the discriminator value, using the propertyName property.

PropertyValue
EnabledYes
Maximum SeverityError
MessageRequired property propertyName in Discriminator Object is missing.
CodeOPENAPI3STANDARDS_V400
TypeValidation
Rule SystemSemantic
Broad CategoryDiscriminators
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsopenapi3 openapi standards semantic validation name discriminator property discriminator property

Suggested Fixes

  • Add missing propertyName property in the Discriminator Object.
  • Make sure that the propertyName property is not null or empty.

For More Information