You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
How to Reproduce
Create an AsyncAPI spec with no operations defined. For example, you can use the default "Streetlight" spec with the operations block removed.
Generate the HTML: asyncapi generate fromTemplate <asyncapi.yaml> @asyncapi/[email protected]
Observe that the messages/schemas don't appear in the sidebar
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.
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?
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:
Describe the bug.
For an AsyncAPI file that has no
operations
block, messages/schemas defined under thecomponents
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:
Screenshots
How to Reproduce
operations
block removed.asyncapi generate fromTemplate <asyncapi.yaml> @asyncapi/[email protected]
🥦 Browser
Google Chrome
👀 Have you checked for similar open issues?
🏢 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 😅
The text was updated successfully, but these errors were encountered: