-
Notifications
You must be signed in to change notification settings - Fork 255
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
Schemas should not be added to all (or any?) x-tagGroups groups when showSchemas: true
#836
Comments
Perhaps it's only tangentially related to this particular issue, but I've just discovered the redocly extension I don't know what it takes to "support |
@ElliotFriend is this issue resolved since #837 was merged? |
Hey, thanks for asking! In #837, I didn't actually actually do anything to resolve the "schemas added to every I can work on getting a proper bug fix ready this week, if you'd like. |
Thanks @ElliotFriend, that would be great! |
This commit takes the first tagGroup category's Schema category, adds it to the very end of the sidebarSlice, and deletes the Schema category from all the (now sibling) tagGroup categories. Closes PaloAltoNetworks#836
This commit takes the first tagGroup category's Schema category, adds it to the very end of the sidebarSlice, and deletes the Schema category from all the (now sibling) tagGroup categories. Closes PaloAltoNetworks#836
* Rearrange Schemas category from each tagGroup category This commit takes the first tagGroup category's Schema category, adds it to the very end of the sidebarSlice, and deletes the Schema category from all the (now sibling) tagGroup categories. Closes #836 * add a schema object to the Restaurant specfile * show schemas in the restaurant demo API * add documentation to sidebars.md
Describe the bug
All defined schemas in an OpenAPI doc are displayed as a "Schemas" sub-category under each tagGroup category.
Expected behavior
I'm not precisely sure what I expected to happen, but I could see two options feeling "predictable," from my point of view:
I think I'd prefer the first option, myself. Maybe it's also a bit easier to implement?
Current behavior
I have a plugin instance that is listing the
x-tagGroups
groups properly (after a little work, see this comment), with two tagGroups to speak of: "Resources" and "Aggregations." I also haveshowSchemas
set to true in the plugin config.The
Schemas
category then shows up in both of the tagGroups, with all defined schemas in the whole OpenAPI doc showing in both schemas categories.Possible solution
In
sidebars/index.ts
, maybe the logic for creating the "Schemas" category could be move out of thegroupByTags
function, and into thegenerateSidebarSlice
function. Then it could be added on tosidebarSlice
just before returning (whether it was grouped by tag or tagGroup). I supposeSteps to reproduce
I don't (at the moment) have a live repro, but I can create one. Here's the relevant config:
My OpenAPI specfile has two tagGroups defined: "Resources" and "Aggregations."
Screenshots
Context
We have some (quite old) customizations to how sidebars are generated for the OpenAPI plugin, and I'm trying to "regular-ize" and clean up our usage, while also making sure our specfile is as polished as possible. We could definitely use the
x-tagGroups
extension to do away with some of the cumbersome, old code. Providing the "Schemas" category would help in this regard, but not in the current way it's generating/placing that category.Your Environment
v3.0.0-beta.10
node.js 20.13.1
running onnginx
The text was updated successfully, but these errors were encountered: