Skip to content
This repository has been archived by the owner on Mar 18, 2022. It is now read-only.

Latest commit

 

History

History
61 lines (38 loc) · 1.14 KB

README.rst

File metadata and controls

61 lines (38 loc) · 1.14 KB

README for Sphinx OpenAPI Builder

This is a Sphinx extension to build and write OpenAPI files.

It's meant to be used together with autohttp from sphinxcontrib.httpdomain.

Requirements

  • Sphinx 3.5
  • Python 3.5

Installing

Using pip

pip install sphinxcontrib-openapibuilder

Manual

git clone https://github.com/phyramid/sphinxcontrib-openapibuilder.git
cd sphinxcontrib-openapibuilder
python setup.py install

Usage

  • 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
    

Configuration

There are no configuration options yet, but adding an option to indicate whether to output YAML or JSON would probably be a good idea.

Acknowledgements

Built at Phyramid by:

Partly based on builder and writer code by the Sphinx contributors.