callback-discriminator-property-pointer-required
Overview
This rule belongs to the openapi-v3-apimatic-linting ruleset and states that:
When an event discriminator is defined for a callback group, the propertyPointer field must be specified. This pointer identifies the field in the request body used to differentiate between event types.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Error |
| Message | The event discriminator property pointer is required for the callback group. |
| Code | OPENAPI3APIMATIC_L505 |
| Type | Linting |
| Rule System | Semantic |
| Broad Category | OpenAPI Callbacks |
| Products Impacted | Code Generation, Developer Experience Portal |
| Tags | openapi3 openapi apimatic semantic linting callback discriminator property pointer required |
Suggested Fixes
- Specify the
propertyPointerfield in the event discriminator definition. - The property pointer should reference a field in the request body that identifies the event type.
For More Information
- https://docs.apimatic.io/specification-extensions/swagger-codegen-extensions/#callback-group-extension
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#callback-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md
- https://docs.apimatic.io/rulesets/overview/