Skip to content

Commit b933056

Browse files
authored
feat!: follow generator v2 that drops node support prior v18 (#615)
1 parent 77b6423 commit b933056

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

README.md

+10-2
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,19 @@ npm install -g @asyncapi/cli
3232

3333
Generate using CLI
3434

35+
> If you use template version v1 or v2 with AsyncAPI Generator v1
36+
37+
```bash
38+
asyncapi generate fromTemplate <asyncapi.yaml> @asyncapi/[email protected]
39+
```
40+
41+
> If you use template version v3 with AsyncAPI Generator v2
42+
3543
```bash
36-
asyncapi generate fromTemplate <asyncapi.yaml> @asyncapi/html-template@0.28.0
44+
asyncapi generate fromTemplate <asyncapi.yaml> @asyncapi/html-template@3.0.0 --use-new-generator
3745
```
3846

39-
You can replace `<asyncapi.yaml>` with local path or URL pointing to [any AsyncAPI document](https://raw.githubusercontent.com/asyncapi/spec/master/examples/streetlights-kafka.yml).
47+
You can replace `<asyncapi.yaml>` with local path or URL pointing to [any AsyncAPI document](https://raw.githubusercontent.com/asyncapi/spec/refs/heads/master/examples/streetlights-kafka-asyncapi.yml).
4048
Look into [Releases](/asyncapi/html-template/releases) of this template to pick up the version you need. It is not recommended to always use the latest in production. Always use a specific version.
4149

4250
## Supported parameters

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
"lint": "echo \"No linter specified yet\"",
2323
"test:library": "jest --coverage",
2424
"test:generator": "npm run test:generator:v2 && npm run test:generator:v3",
25-
"test:generator:v2": "asyncapi generate fromTemplate ./test/spec/asyncapi_v2.yml ./ -o test/output --force-write",
26-
"test:generator:v3": "asyncapi generate fromTemplate ./test/spec/asyncapi_v3.yml ./ -o test/output --force-write",
25+
"test:generator:v2": "asyncapi generate fromTemplate ./test/spec/asyncapi_v2.yml ./ -o test/output --force-write --use-new-generator",
26+
"test:generator:v3": "asyncapi generate fromTemplate ./test/spec/asyncapi_v3.yml ./ -o test/output --force-write --use-new-generator",
2727
"develop": "npm run generate:assets && npm run test:generator:v2 -- --watch-template",
2828
"develop:install": " npm run develop -- --install",
2929
"generate:assets": "npm run copy:sources && npm run generate:readme:toc",
@@ -57,7 +57,7 @@
5757
"generator": {
5858
"renderer": "react",
5959
"apiVersion": "v3",
60-
"generator": ">=1.15.0 <2.0.0",
60+
"generator": ">=2.0.0 <3.0.0",
6161
"parameters": {
6262
"sidebarOrganization": {
6363
"description": "Defines how the sidebar should be organized. 'byTags' to categorize operations by tags in the root of the document, `byTagsNoRoot` does the same but for pub/sub tags.",

0 commit comments

Comments
 (0)