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

Hidden section still appears in sidebar

Open rijenkii opened this issue 1 year ago • 2 comments

Description

When hiding a section in configuration, links to the section and its children remain in the sidebar.

Steps to reproduce

Paste the following into the playground:

Schema
{
  "asyncapi": "3.0.0",
  "info": {
    "title": "Reproduction",
    "version": "1.0.0"
  },
  "operations": {
    "test": {
      "action": "receive",
      "channel": { "$ref": "#/channels/test" }
    }
  },
  "channels": {
    "test": {
      "address": "/test",
      "messages": {
        "test": { "$ref": "#/components/messages/test" }
      }
    }
  },
  "components": {
    "messages": {
      "test": {
        "payload": {
          "type": "object",
          "properties": {
            "test": {
              "description": "test",
              "type": "string",
              "pattern": "^(?:helloworld)+$"
            }
          },
          "required": ["test"]
        }
      }
    }
  }
}
Configuration
{
  "show": {
    "sidebar": true,
    "info": true,
    "operations": true,
    "servers": true,
    "messages": false,
    "schemas": true,
    "errors": true
  },
  "expand":{
    "messageExamples": false
  },
  "sidebar": {
    "showServers": "byDefault",
    "showOperations": "byDefault"
  }
}

Expected result

Section "messages" to be removed from the page and from the sidebar.

Actual result

Section "messages" is removed from the page, but not from the sidebar.

Troubleshooting

N/A

rijenkii avatar Feb 03 '24 07:02 rijenkii

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 Jun 03 '24 00:06 github-actions[bot]

Still an issue.

rijenkii avatar Jun 03 '24 01:06 rijenkii

Ran into this today, too

gcx-seb avatar Aug 06 '24 14:08 gcx-seb

I'd look into this

AceTheCreator avatar Aug 09 '24 11:08 AceTheCreator

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

The release is available on:

Your semantic-release bot :package::rocket:

asyncapi-bot avatar Aug 22 '24 15:08 asyncapi-bot

I see it's now working in the playground.

But on CLI I'm still running into this :thinking:

$ asyncapi --version          
@asyncapi/cli/2.3.2 linux-x64 node-v20.17.0

$ asyncapi generate fromTemplate asyncapi.yaml \
        @asyncapi/html-template \
        --param \
        singleFile=true \
        config='{"show":{"messages":false},"expand":{"messageExamples":true},"sidebar":{"showOperations":"byOperationsTags"}}' \
        --output example

Any ideas?

Edit: ah, looks like html-template still needs an update

gcx-seb avatar Aug 26 '24 10:08 gcx-seb