Skip to main content

unique-items-enum-list-entries

Overview

This rule belongs to the swagger-v2-standards-validation ruleset and states that:

The enumeration list declared using the enum property for the items object, must not contain any duplicate values i.e. they must all be unique.

PropertyValue
EnabledYes
Maximum SeverityError
MessageDuplicate enum entry found in Items Object.
CodeSWAGGER20STANDARDS_V162
TypeValidation
Rule SystemSemantic
Broad CategoryArray Items
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsswagger2 swagger standards semantic validation duplicate entry enum items json schema validation json schema

Suggested Fixes

  • Ensure that no duplicate values are contained within the enumeration list.
  • Enum values are compared in a case-sensitive manner.

For More Information