Skip to content

Commit

Permalink
feat: /answers/{answerId} エンドポイント定義の追加
Browse files Browse the repository at this point in the history
  • Loading branch information
rito528 committed Jun 14, 2024
1 parent c55d550 commit 9b47fb8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
11 changes: 11 additions & 0 deletions endpoints/forms.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -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(): {
Expand Down
3 changes: 3 additions & 0 deletions models/form.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ model RealAnswer {
}

model Answer {
@visibility("read")
id: uint32;

form_id: uint32;
title: string;
answers: RealAnswer[];
Expand Down

0 comments on commit 9b47fb8

Please sign in to comment.