Skip to content

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

@jonadaly

Description

@jonadaly

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/html-template@0.28.0
  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 😅

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions