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

[FEATURE] asyncapi generate fromTemplate requires arguments despite interactive mode #1660

Open
2 tasks done
Adi-204 opened this issue Feb 12, 2025 · 1 comment
Open
2 tasks done
Labels
enhancement New feature or request

Comments

@Adi-204
Copy link
Contributor

Adi-204 commented Feb 12, 2025

Why do we need this improvement?

Currently, the asyncapi generate command has a --no-interactive flag, meaning that by default, it should run in interactive mode. However, the arguments ASYNCAPI and TEMPLATE are still required, even though the interactive mode is already designed to prompt the user for these values. This contradicts the purpose of interactive mode.

  1. The current implementation forces users to provide ASYNCAPI and TEMPLATE even when they intend to use interactive mode.
  2. This makes the CLI experience inconsistent because interactive mode is supposed to allow users to provide inputs dynamically.
  3. Removing these constraints will make the CLI more user-friendly, aligning it with common interactive CLI patterns.

How will this change help?

  1. Users will be able to run asyncapi generate fromTemplate without needing to remember or type the required arguments.
  2. The interactive mode will guide users through input selection instead of throwing an error.
  3. This will make the tool more intuitive, especially for new users.
  4. It improves flexibility while maintaining backward compatibility for those who prefer using arguments explicitly.

Screenshots

Image

How could it be implemented/designed?

Update the CLI argument parser to make ASYNCAPI and TEMPLATE optional. If these arguments are missing and --no-interactive is not used, prompt the user interactively.

🚧 Breaking changes

No

👀 Have you checked for similar open issues?

  • I checked and didn't find a similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to work on this issue?

Yes I am willing to submit a PR!

@Adi-204 Adi-204 added the enhancement New feature or request label Feb 12, 2025
@github-project-automation github-project-automation bot moved this to To Triage in CLI - Kanban Feb 12, 2025
@Adi-204
Copy link
Contributor Author

Adi-204 commented Feb 12, 2025

@AayushSaini101 Could you please review this? If it gets approved, I would be happy to proceed with the implementation.
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: To Triage
Development

No branches or pull requests

1 participant