asyncapi / cli

CLI to work with your AsyncAPI files. You can validate them and in the future use a generator and even bootstrap a new file. Contributions are welcomed!
https://www.asyncapi.com/tools/cli
Apache License 2.0
187 stars 159 forks source link

[FEATURE] New Command to convert asyncapi document to multiple format #1535

Open AayushSaini101 opened 1 month ago

AayushSaini101 commented 1 month ago

Why do we need this improvement?

There are multiple formats of the asyncapi file that are yaml or JSON or yml. Need a separate commands to covert yaml to json or vice-versa

How will this change help?

Increase the developer experience in cli

Screenshots

image

How could it be implemented/designed?

Need to write a function to change one format to another format.

🚧 Breaking changes

No

👀 Have you checked for similar open issues?

🏢 Have you read the Contributing Guidelines?

Are you willing to work on this issue?

Yes I am willing to submit a PR!

toffee-k21 commented 1 month ago

Hi @AayushSaini101,

Thanks for your work on this project! I was wondering if it's possible to use the API for this conversion of yaml to json or vice versa. Would this be the recommended approach?

Looking forward to your response. Thanks again!

AayushSaini101 commented 3 weeks ago

Hi @AayushSaini101,

Thanks for your work on this project! I was wondering if it's possible to use the API for this conversion of yaml to json or vice versa. Would this be the recommended approach?

Looking forward to your response. Thanks again!

@toffee-k21 if the library is small in size you can use it otherwise try to implement the logic to convert

catosaurusrex2003 commented 3 weeks ago

I would like to work on this. by using js-yaml similar to how it is being done while converting in studio

Will raise a PR once it is done.