Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: remove AsyncAPI CLI command bash and replace with CLI docs link #1371

Merged
merged 5 commits into from
Mar 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 4 additions & 24 deletions apps/generator/docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,10 @@ There are two ways to use the generator:
- [Generator library](#using-as-a-modulepackage)

## AsyncAPI CLI
Generates whatever you want using templates compatible with AsyncAPI Generator.
```bash
USAGE
$ asyncapi generate fromTemplate [ASYNCAPI] [TEMPLATE] [-h] [-d <value>] [-i] [--debug] [-n <value>] [-o <value>] [--force-write] [-w] [-p <value>] [--map-base-url <value>]

ARGUMENTS
ASYNCAPI - Local path, url or context-name pointing to AsyncAPI file
TEMPLATE - Name of the generator template like for example @asyncapi/html-template or https://github.com/asyncapi/html-template

FLAGS
-d, --disable-hook=<value>... Disable a specific hook type or hooks from a given hook type
-h, --help Show CLI help.
-i, --install Installs the template and its dependencies (defaults to false)
-n, --no-overwrite=<value>... Glob or path of the file(s) to skip when regenerating
-o, --output=<value> Directory where to put the generated files (defaults to current directory)
-p, --param=<value>... Additional param to pass to templates
-w, --watch Watches the template directory and the AsyncAPI document, and re-generate the files when changes occur. Ignores the output directory.
--debug Enable more specific errors in the console
--force-write Force writing of the generated files to given directory even if it is a git repo with unstaged files or not empty dir (defaults to false)
--map-base-url=<value> Maps all schema references from base url to local folder

EXAMPLES
$ asyncapi generate fromTemplate asyncapi.yaml @asyncapi/[email protected] --use-new-generator --param version=1.0.0 singleFile=true --output ./docs --force-write
```

### `asyncapi generate fromTemplate ASYNCAPI TEMPLATE`

Generates whatever you want using templates compatible with AsyncAPI Generator. For complete command usage and options, refer to the official [AsyncAPI CLI documentation](https://www.asyncapi.com/docs/tools/cli/usage#asyncapi-generate-fromtemplate-asyncapi-template).

All templates are installable npm packages. Therefore, the value of `template` can be anything supported by `npm install`. Here's a summary of the possibilities:
```
Expand Down