Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generator features #9

Closed
Tracked by #251
Souvikns opened this issue Jun 2, 2021 · 7 comments · Fixed by #221
Closed
Tracked by #251

generator features #9

Souvikns opened this issue Jun 2, 2021 · 7 comments · Fixed by #221
Labels
enhancement New feature or request released

Comments

@Souvikns
Copy link
Member

Souvikns commented Jun 2, 2021

CLI will be porting all the functionalities from the generator CLI, so as of now the supported options and commands by the generator CLI are

arguments

<asyncapi> <template>
<asyncapi> - path to the asyncapi file
<template> - template name

Options

  • -d, --disable-hook [hooks...] disable a specific hook type or hooks from a given hook type
  • --debug to enable specific errors in the console
  • -i, --install installs the template and its dependencies (defaults to false)
  • -n, --no-overwrite <glob> glob or path of the file(s) to skip when regenerating
  • -o, --output <outputDir> directory where to put the generated files (defaults to current directory)
  • -p, --param <name=value> additional param to pass to templates
  • --force-write force writing of the generated files to given directory even if it is a git repo with unstaged files or not empty dir (defaults to false)
  • --watch-template watches the template directory and the AsyncAPI document, and re-generate the files when changes occur. Ignores the output directory.
  • --map-base-url <url:folder> maps all schema references from base url to local folder
@Souvikns Souvikns added the enhancement New feature or request label Jun 2, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Aug 2, 2021

This issue has been automatically marked as stale because it has not had recent activity 😴
It will be closed in 60 days if no further activity occurs. To unstale this issue, add a comment with detailed explanation.
Thank you for your contributions ❤️

@github-actions
Copy link
Contributor

github-actions bot commented Oct 2, 2021

This issue has been automatically marked as stale because it has not had recent activity 😴
It will be closed in 60 days if no further activity occurs. To unstale this issue, add a comment with detailed explanation.
Thank you for your contributions ❤️

@magicmatatjahu
Copy link
Member

magicmatatjahu commented Oct 2, 2021

Still valid. We need the generator commands in our cli.

@github-actions
Copy link
Contributor

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

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 ❤️

@dxps
Copy link

dxps commented Mar 29, 2022

I'd suggest some improvements to the ag CLI, based on my recent experience using it with the Go generator.

  1. Depending on the case, it generally takes some time.
    • Since by default we don't have any "progress" or other feedback in the output, for anything that takes more than 10 seconds I guess anybody would start wondering if it's still going or it got stucked.
    • That's why currently I always use --debug although I don't get too many details either.
  2. Currently, the generation can take either ~30s or ~8s, depending on the case (described below).
    • Since generally the generation part would be mostly used, even if initially it may take more time, I'd say it could be acceptable to the User, while doing the initial setup once (that could include a local installation of the generator and anything else needed for later usage, such as any compilation or transpiling), but have this initial part relevant to prepare an efficient usage.

Sure enough, I'm currently referring to a GitHub repo instead of an NPM, but either way the UX can be improved.
And maybe this can introduce some specifics.
The usage is: ag /path/to/spec_aapi.yaml https://github.com/anandsunderraman/go-watermill-template/tree/rabbit-publisher -o gen_go_app

  • Running it first time it takes ~30s
  • Running it again it takes ~8s
  • Interesting enough, if I'm running it later (some minutes, I guess), it takes again ~30s

And I can assure you it's nothing wrong with my powerful workstation. 😊

That's the moment when I'd like to have this generator preps done once and have a better response time.
And when using --debug we always get that package is not available locally, and then you'd like to an option to install it locally (I mean globally at the user level, kinda like npm i -g, ofc)

Hope it helps! Thanks!

@github-actions
Copy link
Contributor

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

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 ❤️

@asyncapi-bot
Copy link
Contributor

🎉 This issue has been resolved in version 0.24.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

peter-rr added a commit to peter-rr/cli that referenced this issue Mar 6, 2024
…-docs

docs: metrics collection markdown file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants