Skip to main content

non-empty-discriminator-mapping-key

Overview

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

Possible discriminator values provided as keys of the discriminator mapping information must be non-null and non-empty. If that is not the case, this entry will be treated as invalid and removed from the discriminator mapping definition.

PropertyValue
EnabledYes
Maximum SeverityWarning
MessageDiscriminator mapping key is null or empty, therefore, this invalid entry has been removed from the discriminator mapping definition.
CodeAPIMATICPOSTPROCESS_V494
TypeValidation
Rule SystemSemantic
Broad CategoryGlobal Types/Models
Products ImpactedCode Generation, Developer Experience Portal, API Transformer
Tagsapimatic postprocessing validation 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.