Skip to main content

unique-schema-enum-items

Overview

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

If property enum is specified in the schema object, it must consist of only unique items in the list.

PropertyValue
EnabledYes
Maximum SeverityError
MessageEnumeration list item is already defined.
CodeOPENAPI3APIMATIC_L694
TypeLinting
Rule SystemSemantic
Broad CategoryOpenAPI Schemas
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsopenapi3 openapi apimatic semantic linting unique enum schema items entries

Suggested Fixes

  • Remove redundant/duplicate entries from the enumeration list.
  • Enumeration items are compared in a case-sensitive manner.
  • Ensure that all the items in the list are unique.

For More Information