discriminator-property-pointer-missing-request-body
Overview
This rule belongs to the apimatic-codegen-validation ruleset and states that:
The endpoint doesn't have a request body parameter, but the discriminator property pointer references 'request.body'. A request body parameter is required for discriminator functionality.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Error |
| Message | Discriminator property pointer references non-existent request body. |
| Code | APIMATICCODEGEN_V547 |
| 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 request body parameter validation |
Suggested Fixes
- Add a request body parameter to the endpoint definition.
- Ensure the request body parameter has
ParamFormat.Bodyformat. - Define an appropriate schema for the request body that contains the discriminator field.
- If no request body is needed, remove the discriminator configuration.