support for multiple routing response docs

This commit is contained in:
cuisaihang
2022-10-11 18:18:20 +08:00
parent 3ff75d22a5
commit dc7397c7c2
6 changed files with 98 additions and 3 deletions

View File

@ -36,6 +36,11 @@ type (
UserSearchReq {
KeyWord string `form:"keyWord"` // 关键词
}
ErrorResponse {
Code string `json:"code"`
Message string `json:"message"`
}
)
@server(
@ -59,6 +64,13 @@ service user-api {
summary: 获取用户信息
)
@handler getUserInfo
/*
@respdoc-400 (
100101: out of authority
100102: user not exist
) // Error code list
*/
/* @respdoc-500 (ErrorResponse) // Server Error */
get /user/:id (UserInfoReq) returns (UserInfoReply)
@doc(