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

Support platform generator type templates to infrastructure as code #1221

Closed
2 tasks done
emeraldjava opened this issue Jun 11, 2024 · 4 comments
Closed
2 tasks done
Labels
enhancement New feature or request

Comments

@emeraldjava
Copy link

Why do we need this improvement?

The idea here that we can extend the existing 'asyncapi generate' command to generate platform commands to create/configure the topics.

How will this change help?

This enables the user to leverage the asyncapi file as a form of infrastructure as code.

Screenshots

No response

How could it be implemented/designed?

On the assumption that kafka is the most popular event broker this enhancement would take the list of topic names from the ayncapi yml file, and output a set of 'kafka' style command to config the needed topics.

kafka-topics.sh --create --topic 'topic-name-per-async-api-yml'

The existing cli supports these two options currently

asyncapi generate fromTemplate ASYNCAPI TEMPLATE
asyncapi generate models LANGUAGE FILE

and i'd foresee a 3rd flavour called 'platform'

asyncapi generate platform ASYNCAPI

which based on the broker type in yml file we'd call the relevant platform-template module.

🚧 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!

@emeraldjava emeraldjava added the enhancement New feature or request label Jun 11, 2024
Copy link
Contributor

Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.

@emeraldjava
Copy link
Author

As discussed on the slack channel - i opened the proposal issue here. Thanks for the suggestion. @derberg

@jonaslagoni
Copy link
Sponsor Member

makes sense to me ✌️

Can easily be extended for multiple protocols 🤙 Remember to add this to the CLI not the generator though 🙂 https://github.com/asyncapi/cli

@emeraldjava
Copy link
Author

Let me move the issue to the cli repo and an attempt to start a coded proposal.

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
None yet
Development

No branches or pull requests

2 participants