cli icon indicating copy to clipboard operation
cli copied to clipboard

[FEATURE] New Command to format the Asyncapi document

Open AayushSaini101 opened this issue 1 year ago • 3 comments

Why do we need this improvement?

Introducing new command that helps to format the asyncapi document with the help of CLI that help to reduce the errors as well as increase the readability of the document.

How will this change help?

asyncapi format <documentName> the command helps to format the document

Screenshots

No response

How could it be implemented/designed?

  • Parse the Asyncapi document
  • Return the document with the proper formatting

🚧 Breaking changes

No

👀 Have you checked for similar open issues?

  • [X] 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!

AayushSaini101 avatar May 13 '24 07:05 AayushSaini101

Hi @AayushSaini101 could you provide some examples? Thanks

Amzani avatar May 13 '24 10:05 Amzani

Hi @AayushSaini101 could you provide some examples? Thanks

We have different formatter available that format the yml online: https://jsonformatter.org/yaml-formatter Here is one of its,

@Amzani one example Before formatting:

image

After Formatting: image

AayushSaini101 avatar May 13 '24 10:05 AayushSaini101

This issue has been automatically marked as stale because it has not had recent activity :sleeping:

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 :heart:

github-actions[bot] avatar Sep 11 '24 00:09 github-actions[bot]

Proposed Format of the command: asyncapi format asyncapi.yml --output

AayushSaini101 avatar Nov 13 '24 16:11 AayushSaini101

:tada: This issue has been resolved in version 2.11.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

asyncapi-bot avatar Nov 22 '24 16:11 asyncapi-bot