Skip to content

feat: mintlify poc server python - #179

Open
rmad17 wants to merge 21 commits into
mainfrom
feat/mintlify-poc-server-python
Open

rmad17 wants to merge 21 commits into
mainfrom
feat/mintlify-poc-server-python

Conversation

@rmad17

@rmad17 rmad17 commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR adds a Sphinx setup to the SDK repo. One command builds a browsable API reference from the docstrings we already have, and a second builds the Sphinx JSON that Mintlify's Sphinx converter reads.

Nothing in the SDK itself changes: no source code and no public API.

How it works

  1. sphinx-autoapi reads src/ and writes a reference page for every module. It parses the code as text, so the SDK is not imported.
  2. sphinx.ext.napoleon understands our Google-style docstrings.
  3. make html builds a normal Sphinx site with the default theme. AutoAPI's own table of contents gives a nested sidebar, with the packages as folders and the modules inside them.
  4. make json builds Sphinx's JSON output (.fjson), which Mintlify's sphinx SDK format can read.

Additions to Sphinx Config

  • Import block at the top of each module page (17 lines in _templates/autoapi/python/module.rst).
  • [source] links to the definition on GitHub (sphinx.ext.linkcode, about 34 lines in conf.py).
  • Clickable types in signatures: intersphinx links built-ins to the Python docs, and a small missing-reference handler (about 20 lines in conf.py) maps auth0_server_python.x.Y annotations to AutoAPI's x.Y pages.
  • Small settings: short signatures (add_module_names = False), skipping Pydantic Config classes, and reading the version from .version.

Changes

File What it does
sphinx/conf.py Sphinx and AutoAPI setup plus the customizations above
sphinx/_templates/autoapi/python/module.rst Template override that adds the Import block
sphinx/index.rst, sphinx/Makefile Entry page and the build targets
sphinx/requirements.txt, pyproject.toml, poetry.lock New docs dependency group with sphinx and sphinx-autoapi only
.gitignore Ignores sphinx/_build and sphinx/reference

Running it

poetry install --with docs
cd sphinx
make html    # site in _build/html
make json    # Sphinx JSON in dist/

Add O=-E to either command to make Sphinx re-read every file. The output folders are not committed.

Testing

No SDK source changed, so there are no new unit tests. poetry run pytest passes (877 tests) and ruff check . is clean.

@rmad17
rmad17 marked this pull request as ready for review October 6, 2026 05:54
@rmad17
rmad17 requested a review from a team as a code owner October 6, 2026 05:54
@rmad17 rmad17 changed the title Feat/mintlify poc server python feat: mintlify poc server python Oct 17, 2026
Comment thread sphinx/conf.py
author = "Auth0"
copyright = "2024, Auth0"
with open(os.path.join(os.path.abspath(".."), ".version")) as _version_file:
release = _version_file.read().strip()

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.

2 participants