]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
docs: Resolve issues with 'relations'
authorStephen Finucane <stephen@that.guru>
Thu, 16 Apr 2020 13:03:54 +0000 (14:03 +0100)
committerStephen Finucane <stephen@that.guru>
Sat, 18 Apr 2020 10:57:28 +0000 (11:57 +0100)
Two issues here:

- 'PATCH /patches/{id}' and 'PUT /patches/{id}' expect a list of
  integers on the 'related' field - not strings
- 'GET /patches' and 'GET /patches/{id}' return a list of embedded patch
  objects on the 'related' field - not strings

Signed-off-by: Stephen Finucane <stephen@that.guru>
docs/api/schemas/latest/patchwork.yaml
docs/api/schemas/patchwork.j2
docs/api/schemas/v1.2/patchwork.yaml

index 9fcafd0a1a84163117088dfb6c6fa0f0b811786e..20ca90e3a8e8e6835bba1edee93daf94068c6658 100644 (file)
@@ -1887,7 +1887,7 @@ components:
           title: Relations
           type: array
           items:
-            type: string
+            $ref: '#/components/schemas/PatchEmbedded'
     PatchDetail:
       allOf:
         - $ref: '#/components/schemas/PatchList'
@@ -1948,7 +1948,7 @@ components:
           title: Relations
           type: array
           items:
-            type: string
+            type: integer
     Person:
       type: object
       properties:
index e587cd7402680127eae28cfda36f7d59fc0fde8e..1ec3848a3f3e85339a80bb0fb14c658a8a0d1435 100644 (file)
@@ -1964,7 +1964,7 @@ components:
           title: Relations
           type: array
           items:
-            type: string
+            $ref: '#/components/schemas/PatchEmbedded'
 {% endif %}
     PatchDetail:
       allOf:
@@ -2027,7 +2027,7 @@ components:
           title: Relations
           type: array
           items:
-            type: string
+            type: integer
 {% endif %}
     Person:
       type: object
index 9bab378042d4a9ed3ca052fb7c4b631c40745964..654549310853b2f932baf8790d2d3ab9a0adea71 100644 (file)
@@ -1887,7 +1887,7 @@ components:
           title: Relations
           type: array
           items:
-            type: string
+            $ref: '#/components/schemas/PatchEmbedded'
     PatchDetail:
       allOf:
         - $ref: '#/components/schemas/PatchList'
@@ -1948,7 +1948,7 @@ components:
           title: Relations
           type: array
           items:
-            type: string
+            type: integer
     Person:
       type: object
       properties: