From c3d73a00536ff92e65639b912eaeddd462b7cbc3 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 16 Apr 2020 14:03:54 +0100 Subject: [PATCH] docs: Resolve issues with 'relations' 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 --- docs/api/schemas/latest/patchwork.yaml | 4 ++-- docs/api/schemas/patchwork.j2 | 4 ++-- docs/api/schemas/v1.2/patchwork.yaml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/api/schemas/latest/patchwork.yaml b/docs/api/schemas/latest/patchwork.yaml index 9fcafd0a..20ca90e3 100644 --- a/docs/api/schemas/latest/patchwork.yaml +++ b/docs/api/schemas/latest/patchwork.yaml @@ -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: diff --git a/docs/api/schemas/patchwork.j2 b/docs/api/schemas/patchwork.j2 index e587cd74..1ec3848a 100644 --- a/docs/api/schemas/patchwork.j2 +++ b/docs/api/schemas/patchwork.j2 @@ -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 diff --git a/docs/api/schemas/v1.2/patchwork.yaml b/docs/api/schemas/v1.2/patchwork.yaml index 9bab3780..65454931 100644 --- a/docs/api/schemas/v1.2/patchwork.yaml +++ b/docs/api/schemas/v1.2/patchwork.yaml @@ -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: -- 2.47.3