Skip to content
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

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

Open
2 tasks done
JannickKemming1997 opened this issue Apr 10, 2024 · 2 comments
Open
2 tasks done
Labels
enhancement New feature or request stale

Comments

@JannickKemming1997
Copy link

JannickKemming1997 commented Apr 10, 2024

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?

  • 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 JannickKemming1997 added the enhancement New feature or request label Apr 10, 2024
Copy link

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.

Copy link

github-actions bot commented Aug 9, 2024

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

@github-actions github-actions bot added the stale label Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale
Projects
None yet
Development

No branches or pull requests

1 participant