Skip to content

generator features  #9

Closed
Closed

Description

@Souvikns

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

Activity

  1. added
    enhancement
    on Jun 2, 2021
  2. github-actions commented on Aug 2, 2021

    @github-actions
    Contributor

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

  3. github-actions commented on Oct 2, 2021

    @github-actions
    Contributor

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

  4. magicmatatjahu commented on Oct 2, 2021

    @magicmatatjahu
    Member

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

  5. github-actions commented on Jan 31, 2022

    @github-actions
    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 ❤️

  6. dxps commented on Mar 29, 2022

    @dxps

    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!

  7. github-actions commented on Jul 28, 2022

    @github-actions
    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 ❤️

  8. asyncapi-bot commented on Sep 27, 2022

    @asyncapi-bot
    Contributor

    🎉 This issue has been resolved in version 0.24.0 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

  9. added a commit that references this issue on Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementreleased

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions