Skip to main content

non-null-non-empty-discriminator-mapping-value

Overview

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

Discriminator mapping value represents the concrete type to which the discriminator value needs to be mapped to. This information is useful for deserialization purposes. If this mapping value is null or empty, the mapping information is considered incomplete and the entry for it will automatically be removed from the discriminator mapping definition.

PropertyValue
EnabledYes
Maximum SeverityWarning
MessageDiscriminator mapping value is null or empty, therefore, this invalid entry has been removed from the discriminator mapping definition.
CodeAPIMATICPOSTPROCESS_V495
TypeValidation
Rule SystemSemantic
Broad CategoryGlobal Types/Models
Products ImpactedCode Generation, Developer Experience Portal, API Transformer
Tagsapimatic postprocessing validation discriminator mapping value discriminator mapping discriminator

Suggested Fixes

  • Make sure that the discriminator mapping values are not null or empty.