@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.
- package/docs/usage.md +21 -16
- 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
|
-
|
|
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
|
-
|
|
15
|
-
-
|
|
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
|
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
--
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
--
|
|
26
|
-
--
|
|
27
|
-
--map-base-url
|
|
28
|
-
|
|
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.
|
|
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.
|
|
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",
|