Repository navigation
feat(plugin): support OpenAPI 3.2 hierarchical tags (tags[].parent) - #1603
Merged
Merged
Conversation
Add a `groupPathsBy: "tagParent"` sidebar mode that nests tag categories into an arbitrary-depth hierarchy driven by the standardized OpenAPI 3.2 `tags[].parent` field, instead of the vendor `x-tagGroups` extension. - Add `parent`, `summary`, and `kind` to `TagObject` - Allow "tagParent" in the `groupPathsBy` Joi validation - Nest categories from `tags[].parent`, rendering pure-container parents, pruning empty tags, and guarding against dangling and cyclic references - Add a bakery demo spec + config and document the new mode Closes #1588 Co-Authored-By: Claude Opus 4.8 <[email protected]>
|
Size Change: +22.2 kB (+0.92%) Total Size: 2.42 MB 📦 View Changed
ℹ️ View Unchanged
|
|
Visit the preview URL for this PR (updated for commit a50d63d): (expires Tue, 18 Aug 2026 16:16:19 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: bf293780ee827f578864d92193b8c2866acd459f |
📸 Visual Diff ReportSnapshot comparison against https://docusaurus-openapi.tryingpan.dev/
✅ No visual regressions detected. Updated at 2026-08-11T16:22:28.787Z · run 31511122241 |
Wire the bakery demo through the plugin-generated sidebar instead of an autogenerated (filesystem) sidebar, which flattened the hierarchy. Also drop explanatory code comments. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Co-Authored-By: Claude Opus 4.8 <[email protected]>
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new
groupPathsBy: "tagParent"sidebar mode that builds nested sidebar categories from the OpenAPI 3.2 standardizedtags[].parentfield — an alternative to the vendorx-tagGroupsextension that supports arbitrary depth.Closes #1588.
Config
Given:
produces:
Changes
TagObject: addparent,summary,kind(OpenAPI 3.2 tag fields).options.ts: allow"tagParent"in thegroupPathsByJoi validation.sidebars/index.ts: newnestByTagParents()builder reusing the existing flatgroupByTagsoutput, plus atagParentbranch ingenerateSidebarSlice.examples/food/bakery/openapi.yaml(3.2 spec) +bakeryplugin instance + "Bakery" sidebar entry.demo/docs/sidebars.mdx;groupPathsByrow updated in both READMEs.Behavior / edge cases
parentwith no operations of its own, e.g.Products) still render, provided they have descendants with content.parent(references an undeclared tag) → treated as top-level.parent(A → B → A, or self-parent) → detected; affected tags render as top-level instead of recursing.x-tagGroups/tagbehavior is unchanged.Testing
gen-api-docs bakeryproduces the correct nestedsidebar.tsand the routes serve.🤖 Generated with Claude Code