Skip to content

Commit 159b54b

Browse files
authored
docs(generator): update latest generator documentation (#5161)
1 parent 3a526ff commit 159b54b

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

markdown/docs/tools/generator/usage.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,29 +40,29 @@ asyncapi generate fromTemplate asyncapi.yaml @asyncapi/html-template
4040

4141
**The shortest possible syntax:**
4242
```bash
43-
asyncapi generate fromTemplate asyncapi.yaml @asyncapi/html-template@3.0.0 --use-new-generator
43+
asyncapi generate fromTemplate asyncapi.yaml @asyncapi/html-template@3.5.4
4444
```
4545

4646
**Generating from a URL:**
4747
```bash
48-
asyncapi generate fromTemplate https://bit.ly/asyncapi @asyncapi/html-template@3.0.0 --use-new-generator
48+
asyncapi generate fromTemplate https://bit.ly/asyncapi @asyncapi/html-template@3.5.4
4949
```
5050

5151
**Specify where to put the result:**
5252
```bash
53-
asyncapi generate fromTemplate asyncapi.yaml @asyncapi/html-template@3.0.0 --use-new-generator -o ./docs
53+
asyncapi generate fromTemplate asyncapi.yaml @asyncapi/html-template@3.5.4 -o ./docs
5454
```
5555

5656
**Passing parameters to templates:**
5757
```bash
58-
asyncapi generate fromTemplate asyncapi.yaml @asyncapi/html-template@3.0.0 --use-new-generator -o ./docs -p title='Hello from param'
58+
asyncapi generate fromTemplate asyncapi.yaml @asyncapi/html-template@3.5.4 -o ./docs -p title='Hello from param'
5959
```
6060

61-
In the template you can use it like this: ` {{ params.title }}`
61+
In the template you can use it like this: `{{ params.title }}`
6262

6363
**Disabling the hooks:**
6464
```bash
65-
asyncapi generate fromTemplate asyncapi.yaml @asyncapi/html-template@3.0.0 --use-new-generator -o ./docs -d generate:before generate:after=foo,bar
65+
asyncapi generate fromTemplate asyncapi.yaml @asyncapi/html-template@3.5.4 -o ./docs -d generate:before generate:after=foo,bar
6666
```
6767

6868
The generator skips all hooks of the `generate:before` type and `foo`, `bar` hooks of the `generate:after` type.
@@ -81,7 +81,7 @@ asyncapi generate fromTemplate asyncapi.yaml https://github.com/asyncapi/html-te
8181

8282
**Map schema references from baseUrl to local folder:**
8383
```bash
84-
asyncapi generate fromTemplate test/docs/apiwithref.json @asyncapi/html-template@3.0.0 --use-new-generator -o ./build/ --force-write --map-base-url https://schema.example.com/crm/:./test/docs/
84+
asyncapi generate fromTemplate test/docs/apiwithref.json @asyncapi/html-template@3.5.4 -o ./build/ --force-write --map-base-url https://schema.example.com/crm/:./test/docs/
8585
```
8686

8787
The parameter `--map-base-url` maps external schema references to local folders.
@@ -104,7 +104,7 @@ docker run --rm -it \
104104
--user=root \
105105
-v ${PWD}/test/fixtures/asyncapi_v1.yml:/app/asyncapi.yml \
106106
-v ${PWD}/output:/app/output \
107-
asyncapi/cli generate fromTemplate -o /app/output /app/asyncapi.yml @asyncapi/html-template@3.0.0 --use-new-generator --force-write
107+
asyncapi/cli generate fromTemplate -o /app/output /app/asyncapi.yml @asyncapi/html-template@3.5.4 --force-write
108108
```
109109
Note: Use ``` ` ``` instead of `\` for Windows.
110110

@@ -115,7 +115,7 @@ Note: Use ``` ` ``` instead of `\` for Windows.
115115
Use the following npx command on your terminal:
116116

117117
```bash
118-
npx -p @asyncapi/cli asyncapi generate fromTemplate ./asyncapi.yaml @asyncapi/html-template@3.0.0 --use-new-generator
118+
npx -p @asyncapi/cli asyncapi generate fromTemplate ./asyncapi.yaml @asyncapi/html-template@3.5.4
119119
```
120120

121121
## Using as a module/package

markdown/docs/tools/generator/versioning.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@ It is better to lock a specific version of the template and the generator if you
1818
Generate HTML with the latest AsyncAPI CLI using the html-template.
1919
```
2020
npm install -g @asyncapi/cli
21-
asyncapi generate fromTemplate asyncapi.yaml @asyncapi/html-template@3.0.0 --use-new-generator
21+
asyncapi generate fromTemplate asyncapi.yaml @asyncapi/html-template@3.5.4
2222
```
2323

24-
> AsyncAPI CLI has multiple versions of the generator, and to use the latest version, you may need to pass the `--use-new-generator` flag. For more details you can also check [asyncapi generate fromTemplate ASYNCAPI TEMPLATE](https://www.asyncapi.com/docs/tools/cli/usage#asyncapi-generate-fromtemplate-asyncapi-template)
2524

2625
Generate HTML using a particular version of the AsyncAPI CLI using the html-template.
2726

0 commit comments

Comments
 (0)