webhook-discriminator-property-pointer-missing-request-body
Overview
This rule belongs to the openapi-v3-apimatic-linting ruleset and states that:
The property pointer in the event discriminator references a field in the request body, but the webhook operation does not have a request body defined. A request body is required for the discriminator to function.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Error |
| Message | The event discriminator property pointer requires a request body but none is defined. |
| Code | OPENAPI3APIMATIC_L1039 |
| Type | Linting |
| Rule System | Semantic |
| Broad Category | OpenAPI Webhooks |
| Products Impacted | Code Generation, Developer Experience Portal |
| Tags | openapi3 openapi apimatic semantic linting webhook discriminator property pointer request body |
Suggested Fixes
- Define a request body for the webhook operation.
- Ensure the request body contains the property referenced by the discriminator's property pointer.
For More Information
- https://docs.apimatic.io/specification-extensions/swagger-codegen-extensions/#webhook-group-extension
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#fixed-fields
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md
- https://docs.apimatic.io/rulesets/overview/