Skip to main content



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.

Maximum SeverityError
MessageDiscriminator mapping key is null or empty.
Rule SystemSemantic
Broad CategoryOpenAPI Discriminators
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsopenapi3 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.

For More Information