Skip to content

Commit

Permalink
feat: 回答のメタデータを編集するエンドポイントの定義
Browse files Browse the repository at this point in the history
  • Loading branch information
rito528 committed Jun 23, 2024
1 parent ae99c3a commit 47a0dc4
Showing 1 changed file with 26 additions and 11 deletions.
37 changes: 26 additions & 11 deletions endpoints/forms.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -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(): {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 47a0dc4

Please sign in to comment.