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[];