tree

Documents tree #

go-asyncapi doc tree shows the hierarchy of documents linked by $refs, starting from the given document. It is handy to get an overview of how a spec is split across several files and which documents depend on which.

Arguments #

Command receives one argument, the path to the document to start from. The path can be a local file or a URL.

By default the hierarchy is drawn as a graphical tree. The -l arg turns the output into a plain text list, one document per line, which is suitable for scripting.

By default the $refs pointing to URLs are not followe, pass -F to allow following them.

The $ref locator options are described in the reference locator article.

Usage #

Show the documents tree starting from a document:

go-asyncapi doc tree asyncapi.yaml

Print the documents as a plain list, one per line:

go-asyncapi doc tree asyncapi.yaml -l

Follow the $refs that point to URLs as well:

go-asyncapi doc tree asyncapi.yaml -F