Skip to main content

discriminator-property-pointer-invalid-location

Overview

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

The property pointer location must be 'request.body' for discriminator configuration. Other locations aren't supported for event discrimination.

PropertyValue
EnabledYes
Maximum SeverityError
MessageDiscriminator property pointer references invalid location.
CodeAPIMATICCODEGEN_V545
TypeValidation
Rule SystemSemantic
Broad CategoryWebhooks
Products ImpactedCode Generation, Developer Experience Portal
Tagsapimatic code generation codegen sdks portal docs validation apimatic discriminator property pointer location validation request body

Suggested Fixes

  • Use 'request.body' as the location part of the property pointer.
  • Discriminators must reference fields in the request body for event type identification.
  • Remove any references to other locations like 'response.body' or 'request.headers'.
  • Ensure the format is 'request.body#/fieldName'.

For More Information