Skip to main content

single-declaration-of-discriminator

Overview

This rule belongs to the apimatic-preliminary-validation ruleset and states that:

The discriminator must be declared once and in the base type only.

PropertyValue
EnabledYes
Maximum SeverityError
MessageDiscriminator re-declared in the child type.
CodeAPIMATICPRE_V505
TypeValidation
Rule SystemSemantic
Broad CategoryGlobal Types/Models
Products ImpactedCode Generation, Developer Experience Portal, API Transformer
Tagspreliminary checks validation apimatic discriminator inheritance type custom type model complex model

Suggested Fixes

  • Remove the re-declaration of discriminator.
  • Declare discriminator once in the base type only.

For More Information