asyncapi-react icon indicating copy to clipboard operation
asyncapi-react copied to clipboard

[BUG] Messages aren't shown in sidebar unless they are used in operations

Open jonadaly opened this issue 1 year ago • 8 comments

Describe the bug.

For an AsyncAPI file that has no operations block, messages/schemas defined under the components block do not appear in the sidebar.

Expected behavior

Even if messages are not used in operations, they should appear in the sidebar. This happens in the playground at https://studio.asyncapi.com/, for example. It is also specifically called out as a use-case in the docs here:

In an AsyncAPI document, adding messages mainly means setting up channels and operations. This is key for explaining how data moves between your applications. However, sometimes you might just want to use the AsyncAPI document to describe the messages themselves, without anything else.

Screenshots

image image

How to Reproduce

  1. Create an AsyncAPI spec with no operations defined. For example, you can use the default "Streetlight" spec with the operations block removed.
  2. Generate the HTML: asyncapi generate fromTemplate <asyncapi.yaml> @asyncapi/[email protected]
  3. Observe that the messages/schemas don't appear in the sidebar

🥦 Browser

Google Chrome

👀 Have you checked for similar open issues?

  • [X] I checked and didn't find similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to work on this issue ?

Would like to help but I will need guidance as I'm not a front-end engineer 😅

jonadaly avatar Aug 12 '24 09:08 jonadaly

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

hey there, so you would expect that if there are no operations, then messages get visible in sidebar, and if there are operations, they show up only as part of these?

derberg avatar Aug 20 '24 21:08 derberg

Hi @derberg, sorry for the delayed reply! As per the spec, I'd expect the messages/schemas to be visible in the sidebar regardless of whether or not they're used in operations.

Looking at the reference implementation of the docs at https://studio.asyncapi.com/, this is indeed what happens when the operations/channels blocks are removed from the spec: image

jonadaly avatar Sep 09 '24 08:09 jonadaly

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 Nov 04 '24 18:11 github-actions[bot]

Hey can you assign this issue to me and since I am a new contributor it would be great if you guys can guide me and help me resolve the issue

atharvagarwal avatar Nov 07 '24 07:11 atharvagarwal

@jonadaly can you assign this issue to me please

jangala-laxman avatar Jan 20 '25 17:01 jangala-laxman

Hi @jangala-laxman and @atharvagarwal, In this organization, issues are not assigned (except for bounty and mentorship ones). Feel free to directly open a PR with your fix!

catosaurusrex2003 avatar Jan 20 '25 17:01 catosaurusrex2003

@derberg can you please explain what this issue requires me to do?

AkhileshJyotishi avatar Mar 06 '25 21:03 AkhileshJyotishi

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 Jul 05 '25 00:07 github-actions[bot]

This still feels like a valid feature request to me, so unless someone from the org wants to mark it as won't-do I feel like it should stay open

jonadaly avatar Sep 09 '25 13:09 jonadaly

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

The release is available on:

Your semantic-release bot :package::rocket:

asyncapi-bot avatar Nov 05 '25 13:11 asyncapi-bot