Skip to main content



This rule belongs to the openapi-v3-codegen-linting ruleset and states that:

The x-enum-elements extension is used to provide additional information or metadata for each enum item. The x-enum-elements extension, when used, should have an object count that matches the number of enum items defined in the schema.

Maximum SeverityWarning
MessageObject count in x-enum-elements extension does not match with the enum items count.
Rule SystemSemantic
Broad CategoryOpenAPI Schemas
Products ImpactedCode Generation, Developer Experience Portal
Tagscode generation sdks openapi3 openapi semantic linting apimatic x-enum-elements enum elements count mismatch

Suggested Fixes

  • Ensure that the object count in the x-enum-elements extension matches the number of enum items.
  • Adjust the object count or the number of enum items to ensure they match each other.

For More Information