duplicatedEnum


duplicatedEnum will check a specification to ensure that Enum values have not been duplicated.

Sometimes copy-pasta happens. duplicatedEnum has your back and won’t let it get past you.

Example ruleset configuration

duplicated-entry-in-enum:
  description: "Check enum values have not been duplicated"
  type: "validation"
  recommended: true
  severity: "error"
  given: "$"
  then:
    function: "duplicatedEnum"

The function is used by the duplicated-entry-in-enum Rule


View Function Source