webhook-discriminator-mapping-value-references-existing-definition
Overview
This rule belongs to the openapi-v3-apimatic-linting ruleset and states that:
Each value in the event discriminator mapping must reference an existing webhook definition. Mapping values that reference non-existent webhooks will prevent proper event type resolution.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Error |
| Message | The event discriminator mapping value does not reference an existing webhook definition. |
| Code | OPENAPI3APIMATIC_L1042 |
| Type | Linting |
| Rule System | Semantic |
| Broad Category | OpenAPI Webhooks |
| Products Impacted | Code Generation, Developer Experience Portal |
| Tags | openapi3 openapi apimatic semantic linting webhook discriminator mapping definition |
Suggested Fixes
- Ensure each discriminator mapping value references an existing webhook definition.
- Verify that the webhook IDs used in the mapping are correctly spelled and defined.
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/