FAQ

  • GitHub GitHub Repo stars
  • Discord Discord Server
  • ✨ New! Try the OpenAPI Doctor ✨ The OpenAPI Doctor

    typedEnum


    typedEnum will check each Enum definition, and will ensure that the type defined for the enum, actually matches the values supplied.

    Example ruleset configuration

    typed-enum:
      description: "Enum values must respect the specified type"
      type: "validation"
      recommended: true
      severity: "warn"
      given: "$"
      then:
        function: "typedEnum"
    

    The function is used by the typed-enum Rule


    View Function Source