Skip to main content

unique-schema-enum-list-items

Overview

This rule belongs to the openapi-v3-standards-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 SeverityWarning
MessageEnumeration list item is already defined.
CodeOPENAPI3STANDARDS_L151
TypeLinting
Rule SystemSemantic
Broad CategorySchemas
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsopenapi3 openapi standards semantic linting enum schema

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