Repository navigation
feat(api-reference): Display x-badges in sidebar navigation #11018
roman-ternovyi
started this conversation in
Ideas
Replies: 1 comment
|
I opened a pull request for this idea: #11020 It adds the
Scalar.createApiReference('#app', {
url: '/openapi.json',
showBadgesInSidebar: true,
})Not in the PR yet: AsyncAPI entries and a toggle in the developer tools. I can add them if you want them. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Feature Request
Description
Currently, Scalar supports the
x-badgesextension for displaying custom badges on API operations. However, these badges are only visible in the main content area and are not displayed in the sidebar navigation.It would be useful to optionally display these badges next to operation names and tags in the sidebar.
Proposed Solution
Add a configuration option, such as
showBadgesInSidebar, to enable displaying existingx-badgesin the sidebar.For example:
Expected sidebar:
Ideally, this would also support badges on tags, allowing entire API sections to be marked as
Beta,Experimental, orDeprecated.Use Cases
Additional Context
This could reuse the existing
x-badgesextension without introducing a new OpenAPI extension.Making this behavior configurable would preserve the current sidebar appearance by default.
All reactions