@asyncapi/generator 1.17.17 → 1.17.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/docs/usage.md +21 -16
  2. package/package.json +2 -2
package/docs/usage.md CHANGED
@@ -8,24 +8,29 @@ There are two ways to use the generator:
8
8
  - [Generator library](#using-as-a-modulepackage)
9
9
 
10
10
  ## AsyncAPI CLI
11
+ Generates whatever you want using templates compatible with AsyncAPI Generator.
11
12
  ```bash
12
- Usage: asyncapi generate fromTemplate <asyncapi> <template> [<options>]
13
+ USAGE
14
+ $ asyncapi generate fromTemplate [ASYNCAPI] [TEMPLATE] [-h] [-d <value>] [-i] [--debug] [-n <value>] [-o <value>] [--force-write] [-w] [-p <value>] [--map-base-url <value>]
13
15
 
14
- - <asyncapi>: Local path or URL pointing to AsyncAPI document for example https://bit.ly/asyncapi
15
- - <template>: Name of the generator template like for example @asyncapi/html-template or https://github.com/asyncapi/html-template
16
+ ARGUMENTS
17
+ ASYNCAPI - Local path, url or context-name pointing to AsyncAPI file
18
+ TEMPLATE - Name of the generator template like for example @asyncapi/html-template or https://github.com/asyncapi/html-template
16
19
 
17
- - <options>:
18
- -V, --version output the generator version
19
- -d, --disable-hook [hooks...] disable a specific hook type or hooks from a given hook type
20
- --debug enable more specific errors in the console
21
- -i, --install install the template and its dependencies (defaults to false)
22
- -n, --no-overwrite <glob> glob or path of the file(s) to skip when regenerating
23
- -o, --output <outputDir> directory to put the generated files (defaults to current directory)
24
- -p, --param <name=value> additional parameters to pass to templates
25
- --force-write force writing of the generated files to a given directory even if it is a Git repository with unstaged files or not empty dir (defaults to false)
26
- --watch-template watches the template directory and the AsyncAPI document, and re-generates the files when changes occur. Ignores the output directory. This flag should be used only for template development.
27
- --map-base-url <url:folder> maps all schema references from base URL to local folder
28
- -h, --help display help for command
20
+ FLAGS
21
+ -d, --disable-hook=<value>... Disable a specific hook type or hooks from a given hook type
22
+ -h, --help Show CLI help.
23
+ -i, --install Installs the template and its dependencies (defaults to false)
24
+ -n, --no-overwrite=<value>... Glob or path of the file(s) to skip when regenerating
25
+ -o, --output=<value> Directory where to put the generated files (defaults to current directory)
26
+ -p, --param=<value>... Additional param to pass to templates
27
+ -w, --watch Watches the template directory and the AsyncAPI document, and re-generate the files when changes occur. Ignores the output directory.
28
+ --debug Enable more specific errors in the console
29
+ --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)
30
+ --map-base-url=<value> Maps all schema references from base url to local folder
31
+
32
+ EXAMPLES
33
+ $ asyncapi generate fromTemplate asyncapi.yaml @asyncapi/html-template --param version=1.0.0 singleFile=true --output ./docs --force-write
29
34
  ```
30
35
 
31
36
  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:
@@ -149,4 +154,4 @@ try {
149
154
  }
150
155
  ```
151
156
 
152
- See the [API documentation](api) for more examples and full API reference information.
157
+ See the [API documentation](api) for more examples and full API reference information.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asyncapi/generator",
3
- "version": "1.17.17",
3
+ "version": "1.17.18",
4
4
  "description": "The AsyncAPI generator. It can generate documentation, code, anything!",
5
5
  "main": "./lib/generator.js",
6
6
  "bin": {
@@ -49,7 +49,7 @@
49
49
  "homepage": "https://github.com/asyncapi/generator",
50
50
  "dependencies": {
51
51
  "@asyncapi/generator-react-sdk": "^1.0.15",
52
- "@asyncapi/parser": "^3.0.11",
52
+ "@asyncapi/parser": "^3.0.12",
53
53
  "@npmcli/arborist": "5.6.3",
54
54
  "@smoya/multi-parser": "^5.0.0",
55
55
  "ajv": "^8.12.0",