Repository navigation
fix(docs): build API doc fallback slugs the way docusaurus-openapi-docs does - #45897
Merged
villebro merged 1 commit intoOct 30, 2026
Merged
Conversation
…cs does
generate-api-index.mjs and generate-api-tag-pages.mjs link each endpoint to
the page docusaurus-openapi-docs generates, looking the slug up in the
generated sidebar and falling back to a local slugify. The plugin names pages
with lodash kebabCase, which splits letter/digit boundaries ("OAuth2" ->
"o-auth-2"), while the fallback produced "oauth2". When the sidebar lookup
missed, the OAuth2 token endpoints added in apache#45676 got links to pages that
don't exist and the Docusaurus broken-link check failed the build. Use
kebabCase for the fallback too.
villebro
marked this pull request as ready for review
October 30, 2026 17:50
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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
docs/scripts/generate-api-index.mjsanddocs/scripts/generate-api-tag-pages.mjslink every endpoint to the pagedocusaurus-openapi-docsgenerates for it. They look the page slug up in the generated sidebar by label and fall back to a localslugifywhen the lookup misses. The plugin names pages with lodashkebabCase(summary), which splits letter/digit boundaries, so "OAuth2" becomeso-auth-2; the local fallback lowercases and joins it asoauth2. For most summaries the two agree, which is why the fallback looked equivalent.The OAuth2 token endpoints added in #45676 are the first summaries where they differ. When the sidebar lookup misses (seen on Netlify deploy previews, e.g. #45404's), the API index and the Database tag page link to
/developer-docs/api/list-oauth2-credential-metadata-for-a-databaseand two similar paths, while the generated pages arelist-o-auth-2-..., and Docusaurus fails the build with "Docusaurus found broken links!".This makes the fallback use
lodash/kebabCase(already a direct docs dependency), the same algorithm the plugin uses, so fallback links always match the generated pages.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Not applicable.
TESTING INSTRUCTIONS
node -e "console.log(require('lodash/kebabCase')('List OAuth2 credential metadata for a database'))"printslist-o-auth-2-credential-metadata-for-a-database, the page name the plugin generates.ADDITIONAL INFORMATION