sphinxcontrib-openapi 0.8.4


pip install sphinxcontrib-openapi

  Latest version

Released: Feb 13, 2024


Meta
Author: Ihor Kalnytskyi
Requires Python: >=3.7

Classifiers

Topic
  • Documentation
  • Documentation :: Sphinx

License
  • OSI Approved :: BSD License

Environment
  • Console

Intended Audience
  • Developers

Operating System
  • OS Independent

Programming Language
  • Python
  • Python :: 3
  • Python :: 3 :: Only
  • Python :: Implementation :: CPython

Framework
  • Setuptools Plugin
  • Sphinx
  • Sphinx :: Extension

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-openapi

Usage

Pass 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
Extras: None
Dependencies:
sphinx (>=2.0)
sphinxcontrib-httpdomain (>=1.5.0)
PyYAML (>=3.12)
jsonschema (>=2.5.1)
sphinx-mdinclude (>=0.5.2)
picobox (>=2.2)
deepmerge (>=0.1)
importlib-metadata