fix(docs): update API documentation links for consistency and clarity#39077
fix(docs): update API documentation links for consistency and clarity#39077shantanukhond wants to merge 1 commit intoapache:masterfrom
Conversation
Code Review Agent Run #44d05cActionable Suggestions - 0Additional Suggestions - 1
Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This PR aligns the docs site’s navigation and API reference links with the current Docusaurus route base paths, while making the docs generator scripts compatible with Python 3.9 and “python3-only” environments.
Changes:
- Update docs homepage “Get Started” CTA to point to
/user-docs/. - Make docs generator scripts runnable on Python 3.9 by adding
from __future__ import annotationsand removingzip(..., strict=False). - Standardize docs database generator to invoke
python3(fixesspawnSync python ENOENT) and refresh API reference links for consistent slugs.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| docs/src/pages/index.tsx | Updates homepage CTA link target to /user-docs/ to match the current docs base path. |
| docs/scripts/generate-database-docs.mjs | Uses python3 for the Flask-backed generation path to avoid missing python executable. |
| docs/scripts/fix-openapi-spec.py | Adds future annotations import to prevent runtime evaluation issues with X | Y annotations on Python 3.9. |
| docs/scripts/extract_custom_errors.py | Adds future annotations import and removes Python 3.10+ zip(strict=...) usage for Python 3.9 compatibility. |
| docs/developer_docs/api.mdx | Updates a set of API reference links to consistent/expected slugs for generated endpoint pages. |
|
Do the changes from "oath2" to "o-auth-2" and similar for "dashboard-s" fix currently broken links or are they a result of the other changes? Trying to understand the main point of this PR. Can you state that in a way other than the AI summary? Thank you. |
SUMMARY
docs/scripts/fix-openapi-spec.pyanddocs/scripts/extract_custom_errors.pynow run on Python 3.9 (e.g. macOS systempython3) by addingfrom __future__ import annotations(avoids runtime errors onX | Ytype hints).extract_custom_errors.pyno longer useszip(..., strict=False)(3.10+ only).docs/scripts/generate-database-docs.mjsinvokespython3instead ofpythonwhen running the optional Flask-backed path, fixingspawnSync python ENOENTon machines that only exposepython3.docs/src/pages/index.tsxGet Started now points to/user-docs/instead of/docs/intro, matching the current user-docs base path used elsewhere in the site.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Skip (or note: Get Started previously opened
/docs/intro, now opens/user-docs/).Before
https://github.com/user-attachments/assets/0620d161-9585-4b65-a623-3f1716cf74bf
After
https://github.com/user-attachments/assets/38d43f63-cef1-42ce-8de9-3f850bcb10a9
TESTING INSTRUCTIONS
cd docs && yarn install && yarn start(oryarn start:quickafter a successful full run). Confirm no failure ingenerate:smart/api-docson Python 3.9 + macOS-stylepython3only./user-docs/and the page loads.cd docs && node scripts/generate-if-changed.mjsand confirm it exits 0.ADDITIONAL INFORMATION