cli: [BUG] Very out of date package JSON, breaking documentation example.
Describe the bug.
The documentation example https://www.asyncapi.com/tools/generator is to run using:
docker run --rm -it --user=root -v ${PWD}/example:/app/example -v ${PWD}/output:/app/output \
asyncapi/cli generate fromTemplate https://bit.ly/asyncapi @asyncapi/html-template -o example
However, the versions in the asyncapi/cli:2.8.0 (and many others) are out of date: package.json.
{
"name": "@asyncapi/cli",
"description": "All in one CLI for all AsyncAPI tools",
"version": "2.8.0",
"author": "@asyncapi",
"bin": {
"asyncapi": "./bin/run_bin"
},
"bugs": "https://github.com/asyncapi/cli/issues",
"dependencies": {
"@asyncapi/avro-schema-parser": "^3.0.23",
"@asyncapi/bundler": "^0.6.3",
"@asyncapi/converter": "^1.6.2",
"@asyncapi/diff": "^0.4.1",
"@asyncapi/generator": "^1.17.25",
resulting in the following errors:
◑ Generation in progress. Keep calm and wait a bit..Template @asyncapi/html-template successfully installed in /usr/local/lib/node_modules/@asyncapi/cli/node_modules/@asyncapi/generator/node_modules/@asyncapi/html-template.
Version of used template is 3.0.0.
◇ Generation failed
Generator Error: This template is not compatible with the current version of the generator (1.17.25). This template is compatible with the following version range: >=2.0.0 <3.0.0.
Expected behavior
Working example from homepage
Screenshots
How to Reproduce
Run the example from the homepage: https://www.asyncapi.com/tools/generator
🥦 Browser
None
👀 Have you checked for similar open issues?
- I checked and didn’t find similar issue
🏢 Have you read the Contributing Guidelines?
- I have read the Contributing Guidelines
Are you willing to work on this issue ?
No, someone else can work on it
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 2
- Comments: 16 (1 by maintainers)
The command should be
asyncapi generate models golang --packageName=model my-asynapi-file.json -o model.goFor example, current generator version is: 2.4.1 https://github.com/asyncapi/generator/releases
Container for the CLI:2.8.0 is running the following versions:
tried changing it in package.json and then installing cli. installed version of the generator seems OK but then I received following error while using generate:
I am using
html-templateso, I am using an specific version of it. ->2.3.14With the example above it could be something like:docker run --rm -it --user=root -v ${PWD}/example:/app/example -v ${PWD}/output:/app/output \ asyncapi/cli generate fromTemplate https://bit.ly/asyncapi @asyncapi/html-template@2.3.14 -o exampleYou can use a compatible version (if you are using
html-templatehere )The error
Generator Error: This template is not compatible with the current version of the generator (1.17.25). This template is compatible with the following version range: >=2.0.0 <3.0.0.is happening to me as well. I think the latest version of the generator should be used instead ( current version here ) which is 2.5.0 today