Skip to main content

single-declaration-of-discriminator

Overview

This rule belongs to the apimatic-post-processing-codegen-validation ruleset and states that:

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

PropertyValue
EnabledYes
Maximum SeverityWarning
MessageDiscriminator re-declared in the child type. It has been set to null for code generation purposes.
CodeAPIMATICPOSTPROCESSCODEGEN_V102
TypeValidation
Rule SystemSemantic
Broad CategoryGlobal Types/Models
Products ImpactedCode Generation, Developer Experience Portal
Tagsapimatic postprocessing code generation validation discriminator inheritance type custom type model complex model

Suggested Fixes

  • Avoid re-declaring a discriminator.
  • Declare discriminator once in the base type only.

For More Information