-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Support Hierarchical Tags #1489
Comments
Have you tried using x-tagGroups? It's already supported by Redoc and lets you group tags. |
Ah! Thank you for the tip! I didn't know about that, and it looks like it'll work great. I remain convinced that hierarchical tags will be a well-used feature going forward and that it's worth supporting them natively, but perhaps it doesn't make sense to do so until the discussion leads to a more centralized convention in the OAS community. For now, the |
Hey again all, There's been some progress over on the SwaggerUI version of this feature request (here) and it made me wonder if ReDoc has any kind of plugin infrastructure similar to Swagger's. I just did a cursory look and it appears that there's some very limited functionality, but not nearly enough to produce changes to the way the interface renders. The x-tagGroups is a good lead, but I see a few problems with it:
|
any update on this? really need this. |
This is back to the old story of basically having a Foldable tagGroup. I would have found this extremely useful as the API product I am working is enormous. Would certainly be looking for a 3-stage foldable menu. I'm sorry about my primitive coding but I'm still learning - I've attached the kind of thing I'm on about. ` /* Fixed sidenav, full height */ /* Style the sidenav links and the dropdown button */ /* On mouse-over */ /* Main content / /* Add an active class to the active dropdown button */ /* Dropdown container (hidden by default). Optional: add a lighter background color and some left padding to change the design of the dropdown content */ /* Optional: Style the caret down icon */ /* Some media queries for responsiveness */ **div class="sidenav"> button class="dropdown-btn">x-tagGroup /div>** /div> div class="main"> Sidebar DropdownClick on the dropdown button to open the dropdown menu inside the side navigation. This sidebar is of full height (100%) and always shown. Some random text.. <script> /* Loop through all dropdown buttons to toggle between hiding and showing its dropdown content - This allows the user to have multiple dropdowns without any conflict */ var dropdown = document.getElementsByClassName("dropdown-btn"); var i; for (i = 0; i < dropdown.length; i++) { dropdown[i].addEventListener("click", function() { this.classList.toggle("active"); var dropdownContent = this.nextElementSibling; if (dropdownContent.style.display === "block") { dropdownContent.style.display = "none"; } else { dropdownContent.style.display = "block"; } }); } </script> `Sorry I had to remove some less than symbols '<' from the code or it was removing the important bits |
We're not planning to extend tag support beyond the x-tagGroups extension for Redoc open source at this time, so I'm closing the issue. |
There's growing momentum for a string-based, backward-compatible way of hierarchicalizing tags in OAS documents; see OAI/OpenAPI-Specification#1367 and swagger-api/swagger-ui#5969 for discussion and support for the idea.
I'd love to see an implementation of this in redoc. I propose something like the screenshot below:
Note that we can use the well-established "nested collapsible list" pattern for arbitrary depth under the first item in the hierarchy. It would be great if there were additionally a "collapse/expand all" link for each level.
For reference, the current version of redoc renders this screen like so:
The text was updated successfully, but these errors were encountered: