Skip to content

Support different types of output #75

Open
@aayushmau5

Description

@aayushmau5
Member

Reason/Context

  • Why we need this improvement?
    Since, this library currently supports showing diff in a JSON format. I think it would be good to have more different ways of showing the output. For example, we can show the output in YAML, HTML or Markdown format.
  • How will this change help?
    This library will have more ways of showing the output, and since, this library will be integrated into AsyncAPI CLI and playground, we will have the ability to show different type of output on those platforms as well.
  • What is the motivation?
    Extend this library :)

Description

  • Detailed description:
    Current JSON format only goes so far, we need to provide more ways to show the diff. For starters, we can show the output in HTML as well as Markdown format. And then, as need arises, we can focus on having other different types of output as well(like YAML, etc.)

  • How could it be implemented/designed?
    The implementation is not really clear right now(I'll be working on that now), but since the diff generates JSON output, we need to convert this JSON output into HTML, Markdown.
    As for how this HTML, Markdown format will look like, we need to have a detailed discussion on that as well. I'll be working on an initial draft for the output, and from there we can flesh out the design.

Activity

derberg

derberg commented on Jan 17, 2022

@derberg
Member

adding YAML will be easiest, so I guess focus on this one first

for HTML best would be to engage with @magicmatatjahu and @mcturco as it would be nice to generate something that could be easily reused in Studio

form Markdown, I think this one is less complicated, headings are names of changes, and then under each heading I guess you get a table of changes? could be nicely handled with https://github.com/IonicaBizau/json2md, so you just first slightly modify the default JSON output that you get as input for Markdown, and then run it through json2md to get markdown. No complicated Markdown templating needed, you only need to add some props to JSON

aayushmau5

aayushmau5 commented on Jan 17, 2022

@aayushmau5
MemberAuthor

Sounds like a plan :D
I will start working on YAML output first, and then for HTML, I will make a separate issue to discuss the format and stuff.

For YAML, I guess I can use some JSON to YAML library 🤔

derberg

derberg commented on Jan 17, 2022

@derberg
Member

For YAML, I guess I can use some JSON to YAML library

definitely

aayushmau5

aayushmau5 commented on Feb 9, 2022

@aayushmau5
MemberAuthor

YAML done!

Next up, markdown.

aayushmau5

aayushmau5 commented on Feb 10, 2022

@aayushmau5
MemberAuthor

@derberg Regarding asyncapi/website#599

You said:

If you maintain one of AsyncAPI tools, please come up with at least one issue that is easy to fix in a month without having a good knowledge of AsyncAPI.

Perhaps we can do Markdown output or HTML output as an issue. What do you think?

derberg

derberg commented on Feb 10, 2022

@derberg
Member

Definitely. Can be both but as 2 separate issues

github-actions

github-actions commented on Jun 11, 2022

@github-actions

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 ❤️

aayushmau5

aayushmau5 commented on Jun 17, 2022

@aayushmau5
MemberAuthor

Status update: currently adding support for markdown output from diff in CLI. After that, I'll start working on HTML output for this library :)

github-actions

github-actions commented on Oct 16, 2022

@github-actions

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 ❤️

7 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @derberg@aayushmau5

        Issue actions

          Support different types of output · Issue #75 · asyncapi/diff