Skip to content

Commit

Permalink
feat!: follow generator v2 that drops node support prior v18 (#615)
Browse files Browse the repository at this point in the history
  • Loading branch information
derberg authored Oct 14, 2024
1 parent 77b6423 commit b933056
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,19 @@ npm install -g @asyncapi/cli

Generate using CLI

> If you use template version v1 or v2 with AsyncAPI Generator v1
```bash
asyncapi generate fromTemplate <asyncapi.yaml> @asyncapi/[email protected]
```

> If you use template version v3 with AsyncAPI Generator v2
```bash
asyncapi generate fromTemplate <asyncapi.yaml> @asyncapi/html-template@0.28.0
asyncapi generate fromTemplate <asyncapi.yaml> @asyncapi/html-template@3.0.0 --use-new-generator
```

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).
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).
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.

## Supported parameters
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"lint": "echo \"No linter specified yet\"",
"test:library": "jest --coverage",
"test:generator": "npm run test:generator:v2 && npm run test:generator:v3",
"test:generator:v2": "asyncapi generate fromTemplate ./test/spec/asyncapi_v2.yml ./ -o test/output --force-write",
"test:generator:v3": "asyncapi generate fromTemplate ./test/spec/asyncapi_v3.yml ./ -o test/output --force-write",
"test:generator:v2": "asyncapi generate fromTemplate ./test/spec/asyncapi_v2.yml ./ -o test/output --force-write --use-new-generator",
"test:generator:v3": "asyncapi generate fromTemplate ./test/spec/asyncapi_v3.yml ./ -o test/output --force-write --use-new-generator",
"develop": "npm run generate:assets && npm run test:generator:v2 -- --watch-template",
"develop:install": " npm run develop -- --install",
"generate:assets": "npm run copy:sources && npm run generate:readme:toc",
Expand Down Expand Up @@ -57,7 +57,7 @@
"generator": {
"renderer": "react",
"apiVersion": "v3",
"generator": ">=1.15.0 <2.0.0",
"generator": ">=2.0.0 <3.0.0",
"parameters": {
"sidebarOrganization": {
"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.",
Expand Down

0 comments on commit b933056

Please sign in to comment.