Skip to main content

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.

PropertyValue
EnabledYes
Maximum SeverityError
MessageDiscriminator property pointer references non-existent request body.
CodeAPIMATICCODEGEN_V547
TypeValidation
Rule SystemSemantic
Broad CategoryWebhooks
Products ImpactedCode Generation, Developer Experience Portal
Tagsapimatic 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.Body format.
  • Define an appropriate schema for the request body that contains the discriminator field.
  • If no request body is needed, remove the discriminator configuration.

For More Information