diff --git a/src/endpoints/forms.tsp b/src/endpoints/forms.tsp index 4a08d6e..a0fc063 100644 --- a/src/endpoints/forms.tsp +++ b/src/endpoints/forms.tsp @@ -253,6 +253,21 @@ namespace Forms { @statusCode statusCode: 400 | 401 | 403 | 404 | 500; @body body: Error; }; + + @route("/labels") + @put + @summary("回答についているラベルの置き換え") + op replace( + @path answerId: uint32, + @body body: { + labels: Label[]; + }, + ): { + @statusCode statusCode: 200; + } | { + @statusCode statusCode: 400 | 401 | 403 | 500; + @body body: Error; + }; } @route("/comment") diff --git a/src/models/form.tsp b/src/models/form.tsp index 3679a6c..c441d1e 100644 --- a/src/models/form.tsp +++ b/src/models/form.tsp @@ -87,6 +87,7 @@ model Answer { timestamp: utcDateTime; commented_by: User; }[]; + labels: Label[]; } model Label {