sphinxcontrib-openapi is a Sphinx extension to generate APIs docs from OpenAPI (fka Swagger) spec. It depends on sphinxcontrib-httpdomain that provides an HTTP domain for describing RESTful HTTP APIs, so we don't need to reinvent the wheel.
$ python3 -m pip install sphinxcontrib-openapiPass sphinxcontrib-openapi to extensions list in Sphinx's conf.py
extensions = [
...
'sphinxcontrib.openapi',
]and feel free to use the openapi directive to render OpenAPI specs
.. openapi:: path/to/openapi.yml- Documentation: https://sphinxcontrib-openapi.readthedocs.org/
- Source: https://github.com/sphinx-contrib/openapi
- Bugs: https://github.com/sphinx-contrib/openapi/issues