Skip to content

feat: mintlify poc server python - #179

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

rmad17 wants to merge 18 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 docs build to the SDK repo. Run one command and it turns our docstrings, README and guides into a folder of ready-to-publish pages, plus a navigation file that describes the sidebar. We commit that folder as docs/dist/, so a docs site can pick it up and publish it as it is.

The repo owns both the content and the structure. The sidebar follows the real package layout, and every page is generated from what is already in the code and the Markdown files, so adding a module or a guide needs no extra setup.

There are no changes to the SDK source code or public API.

How it works

  1. sphinx-autoapi reads src/ and writes a reference page for every public module, using the docstrings we already have.
  2. Sphinx's JSON builder renders those pages. The Python source is never imported to do this.
  3. A small extension, docs/mintlify_export/, finishes the job when the build ends:
    • turns each reference page into an MDX page
    • turns README.md, CONTRIBUTING.md and examples/*.md into MDX pages
    • writes navigation.json
  4. Everything lands in docs/dist/, which we commit so the output can be published as is.

The extension uses only the standard library and imports nothing from the SDK or from conf.py. Every project-specific value is a mintlify_* setting in docs/conf.py, so the folder can be moved to another repo unchanged. Its own README.md explains the settings.

Nothing needs editing when docs grow. A new module appears in the reference and the sidebar on the next build. A new file in examples/ appears as a new guide.

What gets published

docs/dist/
  navigation.json              sidebar tree
  overview.mdx                 README
  CONTRIBUTING.mdx
  examples/*.mdx               Guides
  reference/<package>/<module>/index.mdx    reference pages

The sidebar follows the real package layout. A package or subpackage is a folder, a module is a page, and folders sort before pages. The Guides section starts collapsed and API Reference starts open.

Each reference page opens with an Import block, for example from auth0_server_python.auth_server.anonymous.client import AnonymousClient, followed by the module's classes and functions with a [source] link to the definition on GitHub. The colors for signatures and code blocks are embedded in the pages, so the artifact needs no stylesheet.

In the guides, GitHub alerts become callouts. A link to another guide opens that guide's page and is followed by a GitHub link.

Changes

File What it does
docs/conf.py Sphinx and AutoAPI setup, plus the mintlify_* settings and the sidebar skeleton
docs/mintlify_export/ The extension: guides.py (Markdown to MDX), reference.py (reference pages), navigation.py (sidebar tree), style.py (colors and icons)
docs/_templates/autoapi/ Template overrides: the Import block, no duplicate summary tables, no wrapper pages
docs/index.rst, docs/Makefile Sphinx entry point. make json writes the artifact and make html gives a local preview
pyproject.toml, docs/requirements.txt, poetry.lock New docs dependency group with sphinx and sphinx-autoapi
.gitignore Keeps Sphinx scratch files out and commits docs/dist/
docs/dist/ The committed artifact described above

Pydantic Config inner classes are skipped, since they are implementation noise.

Running it

poetry install --with docs
cd docs
make json O=-E

O=-E makes Sphinx re-read every file, so the output is the same every time. If docs/dist/ was committed up to date, git status shows no changes afterwards.

Testing

No SDK source changed, so there are no new unit tests. The existing suite still passes: poetry run pytest reports 745 passed.

What is checked on the generated output:

  • All 33 pages compile with @mdx-js/mdx.
  • Every entry in navigation.json has a matching page.
  • Every name in the Import blocks imports successfully.
  • The pages look right in a local preview of a docs site (screenshots, light mode), and clicking the copy button puts the import line on the clipboard.

Things to know

  • make json prints about 34 Sphinx warnings from RST formatting in existing docstrings, such as indented lists and Markdown fences. They predate this PR and are not touched here.
  • Source and guide links point at main, which suits docs for the latest version. Versioned docs would need them pinned to a tag.
  • A link to a guide on GitHub returns 404 until that guide is merged to main.

Checklist

@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

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