The documenteer.ext.openapi and sphinxcontrib.redoc extensions are included by default with the Documenteer user guide configuration (documenteer[guide])
The docs advocate setting up a stub page to add the redoc HTML page to the Sphinx toctree; this stub gets overwritten by the sphinxcontrib.redoc extension. This solution removes the need to an API landing page.
This PR provides support for embedding a Redoc site for FastAPI apps and other projects that have OpenAPI specifications.
documenteer.ext.openapi
Sphinx extension can generate the OpenAPI specification during the Sphinx build by running a user-specified function. See the docs at https://documenteer.lsst.io/v/DM-37525/sphinx-extensions/openapi.htmldocumenteer.ext.openapi
andsphinxcontrib.redoc
extensions are included by default with the Documenteer user guide configuration (documenteer[guide]
)[project.openapi]
table in thedocumenteer.toml
configuration file. See the docs at https://documenteer.lsst.io/v/DM-37525/guides/openapi.htmlsphinxcontrib.redoc
extension. This solution removes the need to an API landing page.For a working demo see https://github.com/lsst-sqre/squarebot/pull/18 and https://squarebot.lsst.io/v/DM-37525/index.html