-
-
Notifications
You must be signed in to change notification settings - Fork 181
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
Integrate asyncapi/diff
in the CLI
#58
Comments
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. |
Hey, there is a topics covered here that are important no matter if we work on diff or not: the output atm, library outputs on terminal only. There is no regarding optional flags, we so far tend to always have name, so instead of as if it comes to |
Got it.
👍
So I guess, we will have
for file. |
yup, but with clear indication which one is checked against the other, I mean if file1 is checked against file 2? or the opposite the part about |
Now that the migration to Oclif is done, I will start working on this. Hope to make a PR by the end of this week. |
Yeah sure, let me know if you need anything. |
@Souvikns Does the CLI have the ability to output data into files? Since, Lukasz said that this functionality should be a separate implementation independent of the command. |
hmm, it doesn't.
Yeah, you should create a wrapper around diff and connect it with CLI. For a little context, the CLI is this, so you just need to create a function wrapping your Can you give me some context on what kind of output diff is generating? As of now, all output is printed in the console itself. |
Right now I'm just generating the default json output. |
Solution that we should consider for that issue asyncapi/community#249 It's only an idea so please treat it as suggestion, not final approach. Feel free to comment :) |
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 ❤️ |
Should we close this issue now that we have integrated diff in CLI? |
Since the
asyncapi/diff
library is, now, usable, we can integrate it into the AsyncAPI CLI.My idea for the command usage:
So, we need to think about some things:
How to output the data:
For this, I'm thinking of having a flag
--<format>
. For started, we can provide output in JSON format. Then, in the future, we can go to HTML based output, markdown, etc.Where to output the data:
Now the question arises, where do we output the data. In a file? In the terminal?
Looking at OpenAPI diff tool, we can also provide an optional
<file>
option along with--<format>
flag.--<format> <file>
. The default output will be in the terminal.The flags which will specify the type of output:
Since the diff library provides a bunch of helpers function which provide different output(ex. only
breaking
changes, onlynon-breaking
changes), we can provide a flag to do this through the CLI. The default will provide the full output.ex.
Any thoughts on this idea?
The text was updated successfully, but these errors were encountered: