Skip to main content

discriminator-mapping-value-references-existing-definition

Overview

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

Every ID referenced in discriminator mapping values MUST correspond to an existing webhook or callback definition in the respective section.

PropertyValue
EnabledYes
Maximum SeverityError
MessageDiscriminator mapping value references a non-existent definition.
CodeAPIMATICCODEGEN_V524
TypeValidation
Rule SystemSemantic
Broad CategoryWebhooks
Products ImpactedCode Generation, Developer Experience Portal
Tagsapimatic code generation codegen sdks portal docs validation apimatic webhook callback discriminator mapping reference validation

Suggested Fixes

  • Verify that all IDs referenced in the mapping exist in the webhooks or callbacks section.
  • Check for typos in the ID references.
  • Define the missing webhook or callback in the appropriate section.
  • Remove the mapping entry that references the non-existent definition.

For More Information