diff options
author | Stephen Finucane <stephen@that.guru> | 2018-10-27 01:31:43 +0100 |
---|---|---|
committer | Stephen Finucane <stephen@that.guru> | 2019-01-29 09:35:08 +0000 |
commit | 806f1086bf649383e53095220599fd9f564b117b (patch) | |
tree | 32f7ba097cdaac31a567071fcd42f13f5f55b012 /docs/api | |
parent | f825f207e91c2bf88e802e81cdfb1ee72114b2db (diff) | |
download | patchwork-806f1086bf649383e53095220599fd9f564b117b.tar patchwork-806f1086bf649383e53095220599fd9f564b117b.tar.gz |
docs: Integrate API schema into docs
This takes advantage of the sphinxcontrib-openapi Sphinx extension,
which allows us to embed the REST API documentation into our docs quite
nicely.
Signed-off-by: Stephen Finucane <stephen@that.guru>
Diffstat (limited to 'docs/api')
-rw-r--r-- | docs/api/rest/index.rst | 14 | ||||
-rw-r--r-- | docs/api/rest/schemas/index.rst | 13 | ||||
-rw-r--r-- | docs/api/rest/schemas/v1.0.rst | 5 | ||||
-rw-r--r-- | docs/api/rest/schemas/v1.1.rst | 5 |
4 files changed, 37 insertions, 0 deletions
diff --git a/docs/api/rest/index.rst b/docs/api/rest/index.rst index befd709..dd2a9e7 100644 --- a/docs/api/rest/index.rst +++ b/docs/api/rest/index.rst @@ -12,6 +12,8 @@ exposed by the API, refer to the web browsable API. This can be found at: where `patchwork.example.com` refers to the URL of your Patchwork instance. +If all you want is reference guides, skip straight to :ref:`rest-api-schemas`. + .. important:: The REST API can be enabled/disabled by the administrator: it may not be @@ -265,6 +267,18 @@ Supported Versions Further information about this and more can typically be found in :doc:`the release notes </releases/index>`. +.. _rest-api-schemas: + +Schemas +------- + +Auto-generated schema documentation is provided below. + +.. toctree:: + + /api/rest/schemas/v1.0 + /api/rest/schemas/v1.1 + .. Links .. _curl: https://curl.haxx.se/ diff --git a/docs/api/rest/schemas/index.rst b/docs/api/rest/schemas/index.rst new file mode 100644 index 0000000..bff0dd4 --- /dev/null +++ b/docs/api/rest/schemas/index.rst @@ -0,0 +1,13 @@ +:orphan: + +Schemas +======= + +The APIs for the :doc:`REST API </api/rest/index>` are listed below. For +further information, refer to the :doc:`REST API overview </api/rest/index>`. + +.. toctree:: + :maxdepth: 2 + + /api/rest/schemas/v1.0 + /api/rest/schemas/v1.1 diff --git a/docs/api/rest/schemas/v1.0.rst b/docs/api/rest/schemas/v1.0.rst new file mode 100644 index 0000000..a9add8e --- /dev/null +++ b/docs/api/rest/schemas/v1.0.rst @@ -0,0 +1,5 @@ +API v1.0 +======== + +.. openapi:: ../../schemas/v1.0/patchwork.yaml + :examples: diff --git a/docs/api/rest/schemas/v1.1.rst b/docs/api/rest/schemas/v1.1.rst new file mode 100644 index 0000000..e18f813 --- /dev/null +++ b/docs/api/rest/schemas/v1.1.rst @@ -0,0 +1,5 @@ +API v1.1 (latest) +================= + +.. openapi:: ../../schemas/v1.1/patchwork.yaml + :examples: |