non-empty-discriminator-mapping-key
Overview
This rule belongs to the openapi-v3-apimatic-linting
ruleset and states that:
In OpenAPI specifications, the discriminator mapping key must be a non-empty string. The discriminator mapping key is used to map the discriminator value to a schema definition.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Error |
Message | Discriminator mapping key is null or empty . |
Code | OPENAPI3APIMATIC_L802 |
Type | Linting |
Rule System | Semantic |
Broad Category | OpenAPI Discriminators |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | openapi3 openapi apimatic semantic linting discriminator mapping key empty null valid schema |
Suggested Fixes
- Check the OpenAPI specification to confirm if the discriminator mapping key is null or empty.
- If the discriminator mapping key is null or empty, update the specification to provide a valid, non-empty mapping key.
- Ensure that the updated specification is appropriate for the data being represented by the discriminator mapping.