Skip to main content

non-empty-discriminator-mapping-key

Overview

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

Possible discriminator values provided as keys of the discriminator mapping information must be non-null and non-empty.

PropertyValue
EnabledYes
Maximum SeverityError
MessageDiscriminator mapping key is null or empty.
CodeAPIMATICPRE_V584
TypeValidation
Rule SystemSemantic
Broad CategoryGlobal Types/Models
Products ImpactedCode Generation, Developer Experience Portal, API Transformer
Tagspreliminary checks validation apimatic discriminator mapping discriminator value discriminator

Suggested Fixes

  • Make sure that the discriminator mapping keys are not null or empty.
  • The keys represent possible values of the discriminator property in the data.