diff --git a/README.md b/README.md index 8c9ac48c2..c932eedae 100644 --- a/README.md +++ b/README.md @@ -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/html-template@2.3.14 +``` + +> If you use template version v3 with AsyncAPI Generator v2 + ```bash -asyncapi generate fromTemplate @asyncapi/html-template@0.28.0 +asyncapi generate fromTemplate @asyncapi/html-template@3.0.0 --use-new-generator ``` -You can replace `` with local path or URL pointing to [any AsyncAPI document](https://raw.githubusercontent.com/asyncapi/spec/master/examples/streetlights-kafka.yml). +You can replace `` 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 diff --git a/package.json b/package.json index eff25da6d..9f653690c 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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.",