Skip to main content

unique-definition-name

Overview

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

The definitions keys are patterned fields that must have unique values within the Definitions Object. The keys represent the names of the definitions that can be consumed and produced by operations.

PropertyValue
EnabledYes
Maximum SeverityError
MessageDuplicate entry found for definition name in the Definitions Object.
CodeSWAGGER20STANDARDS_V350
TypeValidation
Rule SystemSemantic
Broad CategoryReusable Definitions
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsswagger2 swagger standards semantic validation name definitions definitions object

Suggested Fixes

  • Remove duplicate definition name entries from the Definitions Object.
  • Definition key value is compared in a case-sensitive manner.

For More Information