From 9b47fb80e6f59097d6435aebe73a4c0caf531b49 Mon Sep 17 00:00:00 2001 From: rito528 <39003544+rito528@users.noreply.github.com> Date: Fri, 14 Jun 2024 15:39:26 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20/answers/{answerId}=20=E3=82=A8?= =?UTF-8?q?=E3=83=B3=E3=83=89=E3=83=9D=E3=82=A4=E3=83=B3=E3=83=88=E5=AE=9A?= =?UTF-8?q?=E7=BE=A9=E3=81=AE=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- endpoints/forms.tsp | 11 +++++++++++ models/form.tsp | 3 +++ 2 files changed, 14 insertions(+) diff --git a/endpoints/forms.tsp b/endpoints/forms.tsp index f9fc0a2..57db0a7 100644 --- a/endpoints/forms.tsp +++ b/endpoints/forms.tsp @@ -190,6 +190,17 @@ 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(): { diff --git a/models/form.tsp b/models/form.tsp index 1ac5cdb..b23e531 100644 --- a/models/form.tsp +++ b/models/form.tsp @@ -74,6 +74,9 @@ model RealAnswer { } model Answer { + @visibility("read") + id: uint32; + form_id: uint32; title: string; answers: RealAnswer[];