]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
docs: Bump API version in docs to 1.3
authorStephen Finucane <stephen@that.guru>
Fri, 15 Jul 2022 16:02:36 +0000 (17:02 +0100)
committerStephen Finucane <stephen@that.guru>
Fri, 15 Jul 2022 16:05:07 +0000 (17:05 +0100)
We also need to add missing API documentation pages for this new API
version. These should have been added in commit 5b03443c ("api: add
auto-generated OpenAPI schema files")

Signed-off-by: Stephen Finucane <stephen@that.guru>
docs/api/rest/index.rst
docs/api/rest/schemas/v1.2.rst
docs/api/rest/schemas/v1.3.rst [new file with mode: 0644]

index 48645da5f35e2b16143229dfbf4899524406e5af..67022e6f3f07734d97512f7a56117bab22a64c28 100644 (file)
@@ -8,7 +8,7 @@ This guide provides an overview of how one can interact with the REST API. For
 detailed information on type and response format of the various resources
 exposed by the API, refer to the web browsable API. This can be found at:
 
-    https://patchwork.example.com/api/1.2/
+    https://patchwork.example.com/api/1.3/
 
 where `patchwork.example.com` refers to the URL of your Patchwork instance.
 
@@ -38,6 +38,11 @@ If all you want is reference guides, skip straight to :ref:`rest-api-schemas`.
    The API version was bumped to v1.2 in Patchwork v2.2. The older APIs are
    still supported. For more information, refer to :ref:`rest-api-versions`.
 
+.. versionchanged:: 3.1
+
+   The API version was bumped to v1.3 in Patchwork v3.1. The older APIs are
+   still supported. For more information, refer to :ref:`rest-api-versions`.
+
 Getting Started
 ---------------
 
@@ -52,16 +57,16 @@ Patchwork instance hosted at `patchwork.example.com`, run:
 
 .. code-block:: shell
 
-    $ curl -s 'https://patchwork.example.com/api/1.2/' | python -m json.tool
+    $ curl -s 'https://patchwork.example.com/api/1.3/' | python -m json.tool
     {
-        "bundles": "https://patchwork.example.com/api/1.2/bundles/",
-        "covers": "https://patchwork.example.com/api/1.2/covers/",
-        "events": "https://patchwork.example.com/api/1.2/events/",
-        "patches": "https://patchwork.example.com/api/1.2/patches/",
-        "people": "https://patchwork.example.com/api/1.2/people/",
-        "projects": "https://patchwork.example.com/api/1.2/projects/",
-        "series": "https://patchwork.example.com/api/1.2/series/",
-        "users": "https://patchwork.example.com/api/1.2/users/"
+        "bundles": "https://patchwork.example.com/api/1.3/bundles/",
+        "covers": "https://patchwork.example.com/api/1.3/covers/",
+        "events": "https://patchwork.example.com/api/1.3/events/",
+        "patches": "https://patchwork.example.com/api/1.3/patches/",
+        "people": "https://patchwork.example.com/api/1.3/people/",
+        "projects": "https://patchwork.example.com/api/1.3/projects/",
+        "series": "https://patchwork.example.com/api/1.3/series/",
+        "users": "https://patchwork.example.com/api/1.3/users/"
     }
 
 
@@ -74,17 +79,17 @@ well-supported. To repeat the above example using `requests`:, run
     $ python
     >>> import json
     >>> import requests
-    >>> r = requests.get('https://patchwork.example.com/api/1.2/')
+    >>> r = requests.get('https://patchwork.example.com/api/1.3/')
     >>> print(json.dumps(r.json(), indent=2))
     {
-        "bundles": "https://patchwork.example.com/api/1.2/bundles/",
-        "covers": "https://patchwork.example.com/api/1.2/covers/",
-        "events": "https://patchwork.example.com/api/1.2/events/",
-        "patches": "https://patchwork.example.com/api/1.2/patches/",
-        "people": "https://patchwork.example.com/api/1.2/people/",
-        "projects": "https://patchwork.example.com/api/1.2/projects/",
-        "series": "https://patchwork.example.com/api/1.2/series/",
-        "users": "https://patchwork.example.com/api/1.2/users/"
+        "bundles": "https://patchwork.example.com/api/1.3/bundles/",
+        "covers": "https://patchwork.example.com/api/1.3/covers/",
+        "events": "https://patchwork.example.com/api/1.3/events/",
+        "patches": "https://patchwork.example.com/api/1.3/patches/",
+        "people": "https://patchwork.example.com/api/1.3/people/",
+        "projects": "https://patchwork.example.com/api/1.3/projects/",
+        "series": "https://patchwork.example.com/api/1.3/series/",
+        "users": "https://patchwork.example.com/api/1.3/users/"
     }
 
 Tools like `curl` and libraries like `requests` can be used to build anything
@@ -103,7 +108,7 @@ Versioning
 ----------
 
 By default, all requests will receive the latest version of the API: currently
-``1.2``:
+``1.3``:
 
 .. code-block:: http
 
@@ -114,7 +119,7 @@ changes breaking your application:
 
 .. code-block:: http
 
-    GET /api/1.2 HTTP/1.1
+    GET /api/1.3 HTTP/1.1
 
 Older API versions will be deprecated and removed over time. For more
 information, refer to :ref:`rest-api-versions`.
@@ -269,6 +274,7 @@ Supported Versions
    1.0, 2.0, ✓
    1.1, 2.1, ✓
    1.2, 2.2, ✓
+   1.3, 3.1, ✓
 
 Further information about this and more can typically be found in
 :doc:`the release notes </releases/index>`.
@@ -285,6 +291,7 @@ Auto-generated schema documentation is provided below.
    /api/rest/schemas/v1.0
    /api/rest/schemas/v1.1
    /api/rest/schemas/v1.2
+   /api/rest/schemas/v1.3
 
 .. Links
 
index 8a96519b73569024a03addceeb55c55e8ffacaf1..e5e4d6b6b7f764bfcd7ea3e670928e71c1a69d7d 100644 (file)
@@ -1,5 +1,5 @@
-API v1.2 (latest)
-=================
+API v1.2
+========
 
 .. openapi:: ../../schemas/v1.2/patchwork.yaml
    :examples:
diff --git a/docs/api/rest/schemas/v1.3.rst b/docs/api/rest/schemas/v1.3.rst
new file mode 100644 (file)
index 0000000..17a4421
--- /dev/null
@@ -0,0 +1,5 @@
+API v1.3 (latest)
+=================
+
+.. openapi:: ../../schemas/v1.3/patchwork.yaml
+   :examples: