cli icon indicating copy to clipboard operation
cli copied to clipboard

[BUG] AsyncAPI/generator needs to upgrade

Open Ervishalpathak7 opened this issue 9 months ago • 12 comments

Describe the bug.

when i am trying to generate the api doc using Async-cli generate method with the @asyncapi/html-template it is showing error with the message

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

AsyncApi generator needs to be update to latest version , so that it can support the @asyncapi/html-template

Screenshots

Image

How to Reproduce

  1. Clone the repo
  2. Build with npm run build
  3. then run node bin/run generate fromTemplate ./testing/main.yml @asyncapi/html-template

🥦 Browser

None

👀 Have you checked for similar open issues?

  • [x] I checked and didn't find similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to work on this issue ?

Yes I am willing to submit a PR!

Ervishalpathak7 avatar Mar 08 '25 04:03 Ervishalpathak7

Hey @Ervishalpathak7 there is already a --use-new-generator flag that needs to be added with only this specific template as also mentioned here https://github.com/asyncapi/html-template?tab=readme-ov-file#usage and rest templates don't need it as you can see from the screenshot below

Image

Moreover not all templates require the latest version which you can verify in their respective readme where the required version of generator is mentioned, so making new generator the default is probably a good idea for now.

Also there have been some problems with the new generator as mentioned here https://github.com/asyncapi/cli/issues/1540.

But will have to wait for the view of maintainers on this.

Thanks.

neoandmatrix avatar Mar 09 '25 07:03 neoandmatrix

@neoandmatrix bro the main reason is that the html-template's latest version is compatible with the latest generator but the markdown is not comaptible with thee latest generator

Image

if we use old-version of template it will work , but if we use the latest template it will give you this error

Ervishalpathak7 avatar Mar 09 '25 07:03 Ervishalpathak7

yes @Ervishalpathak7 that's what i also said and the reason not to make the new generator the default.

neoandmatrix avatar Mar 09 '25 07:03 neoandmatrix

@neoandmatrix yes for now true , we first need to fix the markdown template to support the latest version so that oth html-template and markdown template can be suitable with the generator , for now html-template require version > 2 and markdown require version < 2

Ervishalpathak7 avatar Mar 09 '25 07:03 Ervishalpathak7

@neoandmatrix yes for now true , we first need to fix the markdown template to support the latest version so that oth html-template and markdown template can be suitable with the generator , for now html-template require version > 2 and markdown require version < 2

The flag --use-new-generator is that for that specific reason only that whatever template requires we can use that version by adding or removing the flag in the command. So i don't think updating that is required in a priority as of now and as mentioned in the above comments the new generator also has some bugs so making it a default might have some issues just for one template.

Although maintainers will make the final decision, these were just my suggestions.

Thanks.

neoandmatrix avatar Mar 09 '25 07:03 neoandmatrix

@AayushSaini101 Hi , I’ll take care of this issue related to upgrading the AsyncAPI generator #1699. Please assign it to me. to start work on it as soon as possible.

Hovering-Ace avatar Mar 10 '25 16:03 Hovering-Ace

Hi @AayushSaini101 can I contribute my code in this issue

Devnil434 avatar Mar 10 '25 17:03 Devnil434

Can I work on this issue

Devnil434 avatar May 30 '25 11:05 Devnil434

I don't think an upgrade is required as due to reasons mentioned in above comments instead just some updates in docs regarding the use of different versions of generator and different flags for it.

neoandmatrix avatar May 30 '25 11:05 neoandmatrix

Can I work on this issue

@neoandmatrix is this stll valid ?

AayushSaini101 avatar May 30 '25 11:05 AayushSaini101

@neoandmatrix is this stll valid ?

Will be resolved via https://github.com/asyncapi/cli/issues/1741 and the reason for no need in upgrade of generator version is also mentioned in that issue only.

Thanks.

neoandmatrix avatar May 30 '25 11:05 neoandmatrix

This issue has been automatically marked as stale because it has not had recent activity :sleeping:

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience :heart:

github-actions[bot] avatar Sep 28 '25 00:09 github-actions[bot]