markdown-template icon indicating copy to clipboard operation
markdown-template copied to clipboard

[FEATURE] Ability to jump directly to payload properties via link

Open JannickKemming1997 opened this issue 1 year ago • 2 comments

Why do we need this improvement?

For large APIs it can become unwieldy to reference specific payload properties since it's only possible to link to the "Payload" headline. This makes it necessary to scroll (sometimes quite far) to find whatever property one is looking for.

How will this change help?

I suggest turning the property names into links that when opened jump directly to said property. This would prevent the tedious scrolling currently necessary.

Screenshots

Here is an example of a payload section rendered on GitHub.

Before: before

After: after

How could it be implemented/designed?

I suggest wrapping the property name in an a tag to give it an id and a link. To avoid conflicts between different payloads, an index suffix (-0, -1 etc.) could be used. Lastly, it might make sense to do this for headers as well in the name of consistency.

Before:

| (root)| object | - | - | - | **additional properties are allowed** |
| title | string | Title of the article | - | - | - |

After:

| <a id="(root)-0" href="#(root)-0">(root)</a> | object | - | - | - | **additional properties are allowed** |
| <a id="title-0" href="#title-0">title</a> | string | Title of the article | - | - | - |

🚧 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!

JannickKemming1997 avatar Apr 10 '24 15:04 JannickKemming1997

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.

github-actions[bot] avatar Apr 10 '24 15:04 github-actions[bot]

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 Aug 09 '24 00:08 github-actions[bot]