This is a Sphinx extension to build and write OpenAPI files.
It's meant to be used together with autohttp from sphinxcontrib.httpdomain.
- Sphinx 3.5
- Python 3.5
pip install sphinxcontrib-openapibuilder
git clone https://github.com/phyramid/sphinxcontrib-openapibuilder.git cd sphinxcontrib-openapibuilder python setup.py install
Set the builder as a extension in
conf.py
:extensions = ['sphinxcontrib.openapibuilder']
Run sphinx-build with target
openapi
:sphinx-build -b openapi -c . build/openapi
There are no configuration options yet, but adding an option to indicate whether to output YAML or JSON would probably be a good idea.
Built at Phyramid by:
- Vlad-Stefan Harbuz <[email protected]>
- Ana-Maria-Adina Soare <[email protected]>
Partly based on builder and writer code by the Sphinx contributors.