FAQ

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

    asyncApiUnusedComponents


    asyncApiUnusedComponents is an AsyncAPI-specific function for vacuum rules.

    What does it validate?

    Sweeps reusable component maps and reports entries that are not referenced.

    Options

    The optional location option limits the sweep to one component map, for example messages.

    Result behavior

    Unused component keys are reported at their component path. The optional location option can limit checks to one component map.

    Example ruleset configuration

    rules:
      example-asyncapiunusedcomponents:
        description: Detect unused AsyncAPI components.
        severity: error
        formats: [asyncapi3]
        given: $
        then:
          function: asyncApiUnusedComponents
    

    Used by


    View Function Source