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

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

Open
2 tasks done
jonadaly opened this issue Aug 12, 2024 · 5 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@jonadaly
Copy link

jonadaly commented Aug 12, 2024

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?

  • 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 jonadaly added the bug Something isn't working label Aug 12, 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
Member

derberg commented Aug 20, 2024

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?

@jonadaly
Copy link
Author

jonadaly commented Sep 9, 2024

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

@derberg derberg transferred this issue from asyncapi/html-template Nov 4, 2024
Copy link

github-actions bot commented Nov 4, 2024

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.

@atharvagarwal
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants