From 4f2cef3a5c959965e337a765605c07165b81eaee Mon Sep 17 00:00:00 2001 From: rito528 <39003544+rito528@users.noreply.github.com> Date: Thu, 14 Sep 2023 00:12:31 +0900 Subject: [PATCH 1/2] =?UTF-8?q?docs:=20=E3=83=95=E3=82=A9=E3=83=BC?= =?UTF-8?q?=E3=83=A0=E3=81=AE=E5=9B=9E=E7=AD=94=E3=82=92=E3=81=99=E3=81=B9?= =?UTF-8?q?=E3=81=A6=E5=8F=96=E5=BE=97=E3=81=99=E3=82=8B=E3=82=A8=E3=83=B3?= =?UTF-8?q?=E3=83=88=E3=83=AA=E3=83=9D=E3=82=A4=E3=83=B3=E3=83=88=E3=81=AE?= =?UTF-8?q?=E5=AE=9A=E7=BE=A9=E3=82=92=E8=A8=98=E8=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- schema/paths/forms/answers/index.yml | 21 ++++++++++++++++++++- schema/types/forms/definitions.yml | 12 ++++++++++-- 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/schema/paths/forms/answers/index.yml b/schema/paths/forms/answers/index.yml index adc3e87..364bd3e 100644 --- a/schema/paths/forms/answers/index.yml +++ b/schema/paths/forms/answers/index.yml @@ -1,3 +1,22 @@ +get: + operationId: getFormAnswers + summary: フォームの回答をすべて取得する + responses: + "200": + description: 指定されたフォームIDの情報取得に成功 + content: + application/json: + schema: + $ref: "../../../types/forms/definitions.yml#/definitions/answers" + "400": + $ref: "../../../errors/errorResponses.yml#/components/responses/syntaxError" + "401": + $ref: "../../../errors/errorResponses.yml#/components/responses/unauthorized" + "404": + $ref: "../../../errors/errorResponses.yml#/components/responses/notFound" + "500": + $ref: "../../../errors/errorResponses.yml#/components/responses/internalServerError" + post: operationId: postFormAnswers summary: 指定フォームに対して回答する @@ -7,7 +26,7 @@ post: content: application/json: schema: - $ref: "../../../types/forms/definitions.yml#/definitions/answers" + $ref: "../../../types/forms/definitions.yml#/definitions/batch_answers" responses: "200": description: 回答に成功 diff --git a/schema/types/forms/definitions.yml b/schema/types/forms/definitions.yml index 0a23f52..4c8eec4 100644 --- a/schema/types/forms/definitions.yml +++ b/schema/types/forms/definitions.yml @@ -47,8 +47,9 @@ definitions: $ref: "./components.yml#/components/schemas/id" required: - id - answers: - description: 回答の配列 + batch_answers: + description: ひとまとまりの回答 + type: object properties: uuid: $ref: "../users/components.yml#/components/schemas/uuid" @@ -66,6 +67,13 @@ definitions: minItems: 0 items: $ref: "./components.yml#/components/schemas/answer" + answers: + description: batch_answersの配列 + type: array + uniqueItems: true + minItems: 0 + items: + $ref: "#/definitions/batch_answers" kind_of_labels: type: object properties: From 0d55777b47c3024e21c24c757fa078951f52f07a Mon Sep 17 00:00:00 2001 From: rito528 <39003544+rito528@users.noreply.github.com> Date: Thu, 14 Sep 2023 00:16:50 +0900 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20operationId=E3=81=8C=E8=A2=AB?= =?UTF-8?q?=E3=81=A3=E3=81=A6=E3=81=84=E3=81=9F=E3=81=AE=E3=81=A7=E7=9B=B4?= =?UTF-8?q?=E3=81=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- schema/paths/forms/answers/index.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema/paths/forms/answers/index.yml b/schema/paths/forms/answers/index.yml index 364bd3e..f2fef4d 100644 --- a/schema/paths/forms/answers/index.yml +++ b/schema/paths/forms/answers/index.yml @@ -1,5 +1,5 @@ get: - operationId: getFormAnswers + operationId: getAllAnswers summary: フォームの回答をすべて取得する responses: "200":