Skip to content

docs: sphinx integration for mintlify docs - #169

Draft
rmad17 wants to merge 1 commit into
mainfrom
mintlify-poc
Draft

rmad17 wants to merge 1 commit into
mainfrom
mintlify-poc

Conversation

@rmad17

@rmad17 rmad17 commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Adds Sphinx-based API reference documentation infrastructure for the auth0-fastapi SDK. The generated JSON artifact is consumed by the auth0.com/docs Mintlify site to render the SDK reference at /docs/sdk/python/fastapi.

Changes made

Sphinx docs setup (docs/)

  • conf.py — Sphinx configuration using sphinx-autoapi (AST-based, no import required), furo theme with Auth0 brand colors, Napoleon for Google-style docstrings, intersphinx mapping to Python and Pydantic docs. Includes a autoapi-skip-member hook to suppress Pydantic internals (BaseModel.Config, auto-generated __init__ docstrings) from the output.
  • index.rst — Root document pointing to the autoapi-generated reference.
  • Makefile — Build targets: html (local preview), json (Mintlify artifact), clean.
  • requirements.txt — Pinned build dependencies: sphinx, sphinx-autoapi, furo.
  • _static/auth0.css — Auth0 brand colors and Pydantic-style parameter block styling for local HTML preview.
  • _templates/autoapi/python/module.rst — Custom page title template that uses the module's short name (e.g. "Auth Client") instead of the full dotted path.

Source changes

  • src/auth0_fastapi/__init__.py — Added empty init to ensure autoapi resolves modules as auth0_fastapi.* rather than src.auth0_fastapi.*.
  • src/auth0_fastapi/auth/auth_client.py — Improved docstrings for DX:
    • RFC 8693 references converted to RST hyperlinks pointing to rfc-editor.org.
    • Return types (TokenExchangeResponse, LoginWithCustomTokenExchangeResult, SessionTransferTokenResult) marked up with :class: for cross-linking.
    • Exception names in Raises sections (CustomTokenExchangeError, InvalidArgumentError, MissingRequiredArgumentError, ValueError) marked up with :exc:.
    • Inline parameter names wrapped in double backticks for monospace rendering.

.gitignore

  • Replaced the broad docs ignore with targeted entries (docs/_build/, docs/reference/) so the Sphinx source files are tracked while build output is not.

Generating the artifact

cd docs
pip install -r requirements.txt
make json
# Output: _build/json/ — copy to docs-v2/main/sdk-artifacts/auth0-fastapi/

Testing

- Run make json and verify _build/json/ is produced with no errors.
- Run make html and open _build/html/index.html for a local preview (Auth0 colors, clean sidebar, RFC hyperlinks, cross-referenced types).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant