File: README.rst

package info (click to toggle)
sphinxcontrib-openapi 0.8.4-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 876 kB
  • sloc: python: 7,575; makefile: 15
file content (44 lines) | stat: -rw-r--r-- 1,079 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
=====================
sphinxcontrib-openapi
=====================

**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.

.. code:: bash

   $ python3 -m pip install sphinxcontrib-openapi


Usage
=====

Pass ``sphinxcontrib-openapi`` to ``extensions`` list in  Sphinx's ``conf.py``

.. code:: python

   extensions = [
      ...
      'sphinxcontrib.openapi',
   ]

and feel free to use the ``openapi`` directive to render OpenAPI specs

.. code:: restructuredtext

   .. openapi:: path/to/openapi.yml


Links
=====

* Documentation: https://sphinxcontrib-openapi.readthedocs.org/
* Source: https://github.com/sphinx-contrib/openapi
* Bugs: https://github.com/sphinx-contrib/openapi/issues


.. _Sphinx: https://www.sphinx-doc.org/en/master/
.. _OpenAPI: https://github.com/OAI/OpenAPI-Specification
.. _sphinxcontrib-httpdomain: https://sphinxcontrib-httpdomain.readthedocs.io/