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.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Error |
| Message | Discriminator property pointer references invalid location. |
| Code | APIMATICCODEGEN_V545 |
| Type | Validation |
| Rule System | Semantic |
| Broad Category | Webhooks |
| Products Impacted | Code Generation, Developer Experience Portal |
| Tags | apimatic 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'.