Skip to content

Commit

Permalink
feat: /tag/list /tag/show
Browse files Browse the repository at this point in the history
  • Loading branch information
w8385 committed May 2, 2024
1 parent 43f8d60 commit 1c3e8c6
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/operations/_barrel.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ import "./search/_barrel.tsp";
import "./site/_barrel.tsp";
import "./user/_barrel.tsp";
import "./post/_barrel.tsp";
import "./tag/_barrel.tsp";
2 changes: 2 additions & 0 deletions src/operations/tag/_barrel.tsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import "./list.tsp";
import "./show.tsp";
30 changes: 30 additions & 0 deletions src/operations/tag/list.tsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using TypeSpec.Http;
using TypeSpec.OpenAPI;

namespace SolvedAC;

/**
* 태그 목록을 가져옵니다.
*
* @return
* 태그 목록을 가져옵니다.
*/
@summary("태그 목록 가져오기")
@tag("tag")
@get
@route("/tag/list")
op getTagList(
/**
* 페이지
*/
@query
page?: uint32,
): GetTagList.Ok;

namespace GetTagList {
@extension(XInternal, true)
model Ok {
@statusCode status: 200;
@body data: PaginatedList<ProblemTag>;
}
}
30 changes: 30 additions & 0 deletions src/operations/tag/show.tsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using TypeSpec.Http;
using TypeSpec.OpenAPI;

namespace SolvedAC;

/**
* 태그 ID로 태그 정보를 가져옵니다.
*
* @return
* 태그 정보를 가져옵니다.
*/
@summary("태그 ID로 태그 정보 가져오기")
@tag("tag")
@get
@route("/tag/show")
op getTagByKey(
/**
* 태그 ID
*/
@query
key: string,
): GetTagByKey.Ok;

namespace GetTagByKey {
@extension(XInternal, true)
model Ok {
@statusCode status: 200;
@body tag: ProblemTag;
}
}

0 comments on commit 1c3e8c6

Please sign in to comment.