Introduce Modelina CLI that can be extended by AsyncAPI CLI
Reason/Context
Currently, you can use the AsyncAPI CLI to generate models with Modelina, however, one limitation is that only AsyncAPI inputs are supported.
A better setup would be to have the AsyncAPI CLI extend the Modelina CLI which has no restrictions on inputs. That way we can reuse most if not all the implementation while keeping everything Modelina-related in this repo.
While this issue is a
good first issue, it is gonna take quite a time to implement the initial implementation, because some research and trial and error need to be done.
Here is the TODO I would suggest to follow to solve this issue:
- Figure out if it's possible for two CLIs to reuse part of their code base with each other (when using oclif as the CLI framework). NOTICE: After this step it might not be possible to complete it as it shows it's impossible
- If it is possible make a small implementation in the AsyncAPI CLI and for Modelina that integrate with each other
- Copy most of the implementation of the model command from https://github.com/asyncapi/cli/blob/master/src/commands/generate/models.ts
- Create a PR with the change.
@jonaslagoni I am happy to work on this issue and the idea is very useful to encourage reusability.
Hey @ankur0904 any progress or update? 🙂
@jonaslagoni My sincere apologies for the delayed response. Unfortunately, I faced unexpected challenges that prevented me from making progress on the issue.
Hi @ankur0904, are you still working on this one? If not, @jonaslagoni I would like to work on this.
@devilkiller-ag Please go ahead as I am currently not working on this issue.
Thanks @ankur0904! @jonaslagoni I will study a little bit about this issue and let you know my initial findings.
I think we can close this issue, as the remaining effort is already under way in https://github.com/asyncapi/cli/pull/1376