From 47a0dc46e2bd8cd9642168772db8883537ae8402 Mon Sep 17 00:00:00 2001 From: rito528 <39003544+rito528@users.noreply.github.com> Date: Sun, 23 Jun 2024 16:35:18 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=9B=9E=E7=AD=94=E3=81=AE=E3=83=A1?= =?UTF-8?q?=E3=82=BF=E3=83=87=E3=83=BC=E3=82=BF=E3=82=92=E7=B7=A8=E9=9B=86?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=82=A8=E3=83=B3=E3=83=89=E3=83=9D=E3=82=A4?= =?UTF-8?q?=E3=83=B3=E3=83=88=E3=81=AE=E5=AE=9A=E7=BE=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- endpoints/forms.tsp | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/endpoints/forms.tsp b/endpoints/forms.tsp index d6f8c55..814e257 100644 --- a/endpoints/forms.tsp +++ b/endpoints/forms.tsp @@ -191,17 +191,6 @@ namespace Forms { @route("/answers") namespace Answers { - @get - @summary("回答の取得") - @route("/{answerId}") - op get(@path answerId: uint32): { - @statusCode statusCode: 200; - @body body: Answer; - } | { - @statusCode statusCode: 400 | 401 | 403 | 404 | 500; - @body body: Error; - }; - @get @summary("回答の一覧取得") op list(): { @@ -232,6 +221,32 @@ namespace Forms { @body body: Error; }; + @route("/{answerId}") + namespace IndividualAnswer { + @get + @summary("回答の取得") + op get(@path answerId: uint32): { + @statusCode statusCode: 200; + @body body: Answer; + } | { + @statusCode statusCode: 400 | 401 | 403 | 404 | 500; + @body body: Error; + }; + + /** + * 回答のメタデータを編集します。 + * このエンドポイントでは、回答自体を編集することはできません。 + */ + @patch + @summary("回答のメタデータを編集する") + op update(@path answerId: uint32, @query title?: string): { + @statusCode statusCode: 200; + } | { + @statusCode statusCode: 400 | 401 | 403 | 404 | 500; + @body body: Error; + }; + } + @route("/labels") namespace Labels { @post