callback-discriminator-mapping-value-empty
Overview
This rule belongs to the openapi-v3-apimatic-linting ruleset and states that:
Each entry in the discriminator mapping must reference a valid callback ID. Mapping values that are empty or missing will prevent proper event discrimination.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Error |
| Message | A callback discriminator mapping value must not be empty. |
| Code | OPENAPI3APIMATIC_L523 |
| 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 value |
Suggested Fixes
- Ensure all discriminator mapping values are non-empty.
- Each mapping value must reference a valid callback definition ID.
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/