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