FAQ

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

    oasUnusedComponent


    oasUnusedComponent will check all Components (OpenAPI 3) or
    Definitions (OpenAPI 2/Swagger) have been used somewhere within the document.

    Example ruleset configuration

    oas2-unused-definition:
      description: "Check for orphaned or unused definitions"
      type: "validation"
      recommended: true
      severity: "warn"
      given: "$"
      then:
        function: "oasUnusedComponent"
    

    The function is used by the oas2-unused-definition and the oas3-unused-component Rules


    View Function Source