-
-
Notifications
You must be signed in to change notification settings - Fork 265
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
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
632a555
docs: removed AsyncAPI CLI command bash and replace with CLI docs link
Adi-204 8613ad5
docs: minor changes in docs
Adi-204 0ee5cf9
docs: changes in table of content
Adi-204 d372759
Merge branch 'master' into docs-changes
Florence-Njeri 4da8912
Merge branch 'master' into docs-changes
derberg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,34 +4,19 @@ weight: 30 | |
--- | ||
|
||
There are two ways to use the generator: | ||
- [AsyncAPI CLI](#generator-cli) | ||
- [Generator library](#using-as-a-modulepackage) | ||
- [AsyncAPI CLI](#asyncapi-cli) | ||
- [`asyncapi generate fromTemplate ASYNCAPI TEMPLATE`](#asyncapi-generate-fromtemplate-asyncapi-template) | ||
- [Global templates installed with `yarn` or `npm`](#global-templates-installed-with-yarn-or-npm) | ||
- [CLI usage examples](#cli-usage-examples) | ||
- [CLI usage with Docker](#cli-usage-with-docker) | ||
- [CLI usage with `npx` instead of `npm`](#cli-usage-with-npx-instead-of-npm) | ||
- [Using as a module/package](#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: | ||
``` | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need this?
navigation is automatically rendered anyway - look https://www.asyncapi.com/docs/tools/generator/usage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@derberg Sir, my apologies for the oversight. The table of contents was generated automatically based on the section headings (##, ###, etc.). I will change it.