Skip to content

Commit dac7bb4

Browse files
feat!: drop support for generator v1 and v2 (#1919)
Co-authored-by: Lukasz Gornicki <[email protected]> Co-authored-by: Chan <[email protected]>
1 parent 0a8406d commit dac7bb4

File tree

18 files changed

+123
-354
lines changed

18 files changed

+123
-354
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@asyncapi/cli": major
3+
---
4+
5+
Breaking changes: Removed support for AsyncAPI Generator v1 and v2. The CLI now exclusively uses Generator v3. The `--use-new-generator` flag has been removed from the `generate fromTemplate` command. Minimum supported Node.js version is now 24+.

.github/workflows/release-with-changesets.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,6 @@ jobs:
127127
publish: npx -p @changesets/[email protected] changeset publish
128128
setupGitUser: false
129129
env:
130-
# Workaround for https://github.com/changesets/changesets/issues/1152
131-
NODE_AUTH_TOKEN: ""
132-
NPM_TOKEN: ""
133-
NPM_CONFIG_PROVENANCE: true
134130
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
135131
GIT_AUTHOR_NAME: asyncapi-bot
136132
GIT_AUTHOR_EMAIL: [email protected]

DEVELOPMENT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ feat: add new feature
134134
135135
If you encounter any issues during development or testing, please check the following:
136136
137-
1. Ensure you're using the correct Node.js version (18.12.0 or higher) and npm version (8.19.0 or higher).
137+
1. Ensure you're using the correct Node.js version (24.0.0 or higher) and npm version (8.19.0 or higher).
138138
2. Clear the `node_modules` directory and reinstall dependencies if you encounter unexpected behavior.
139139
3. For Docker-related issues, make sure Docker is running and you have sufficient permissions.
140140

action-template.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ inputs:
1515
default: 'asyncapi.yml'
1616
template:
1717
description: 'Template for the generator. Official templates are listed here https://github.com/search?q=topic%3Aasyncapi+topic%3Agenerator+topic%3Atemplate. You can pass template as npm package, url to git repository, link to tar file or local template.'
18-
default: '@asyncapi/[email protected]'
19-
required: false
18+
required: true
2019
language:
2120
description: 'Language of the generated code. This input is required if you want to generate models. List of available languages can be found in https://www.asyncapi.com/docs/tools/cli/usage#asyncapi-generate-models-language-file'
2221
required: false

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ inputs:
1515
default: 'asyncapi.yml'
1616
template:
1717
description: 'Template for the generator. Official templates are listed here https://github.com/search?q=topic%3Aasyncapi+topic%3Agenerator+topic%3Atemplate. You can pass template as npm package, url to git repository, link to tar file or local template.'
18-
default: '@asyncapi/markdown-template@0.10.0'
18+
default: '@asyncapi/markdown-template@2.0.0'
1919
required: false
2020
language:
2121
description: 'Language of the generated code. This input is required if you want to generate models. List of available languages can be found in https://www.asyncapi.com/docs/tools/cli/usage#asyncapi-generate-models-language-file'

docs/github-action.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Path to the AsyncAPI document that you want to process.
6161

6262
Template for the generator. Official templates are listed here https://github.com/asyncapi/generator#list-of-official-generator-templates. You can pass template as npm package, url to git repository, link to tar file or local template.
6363

64-
**Default** points to `@asyncapi/markdown-template@0.10.0` template.
64+
**Default** points to `@asyncapi/markdown-template@2.0.0` template.
6565

6666
> [!TIP]
6767
> We recommend to always specify the version of the template to not encounter any issues with the action in case of release of the template that is not compatible with given version of the generator.
@@ -229,7 +229,7 @@ Use following commands to run and test github action locally:
229229
2. Execute docker image with proper arguments
230230

231231
```bash
232-
docker run -e GITHUB_WORKSPACE="" --workdir /action -v "/home/{user}/path/to/repo":"/action" asyncapi/github-action-for-cli "" "generate" "github-action/test/asyncapi.yml" "@asyncapi/markdown-template@0.10.0" "" "output" "" ""
232+
docker run -e GITHUB_WORKSPACE="" --workdir /action -v "/home/{user}/path/to/repo":"/action" asyncapi/github-action-for-cli "" "generate" "github-action/test/asyncapi.yml" "@asyncapi/markdown-template@2.0.0" "" "output" "" ""
233233
```
234234

235235
Make sure to change the path of the repo and user in the command.

github-action/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
DEFAULT_VERSION = 'latest'
22
DEFAULT_COMMAND = 'generate'
33
TEST_FILEPATH = 'test/asyncapi.yml'
4-
DEFAULT_TEMPLATE = '@asyncapi/markdown-template@0.10.0'
4+
DEFAULT_TEMPLATE = '@asyncapi/markdown-template@2.0.0'
55
DEFAULT_LANGUAGE = ''
66
DEFAULT_OUTPUT = 'output'
77
DEFAULT_PARAMETERS = ''

0 commit comments

Comments
 (0)