add swagger demo

This commit is contained in:
wangchuxiao
2022-06-24 17:45:33 +08:00
parent db7ef3ac4b
commit 99062805ec
16 changed files with 367 additions and 50 deletions
+9
View File
@@ -195,6 +195,14 @@ func GetUsersInfo(c *gin.Context) {
c.JSON(http.StatusOK, resp)
}
// @Summary 更新用户信息
// @Description 向你说Hello
// @Tags 测试
// @Accept json
// @Param who query string true "人名"
// @Success 200 {string} string "{"msg": "hello Razeen"}"
// @Failure 400 {string} string "{"msg": "who are you"}"
// @Router /update_user_info [post]
func UpdateUserInfo(c *gin.Context) {
params := api.UpdateSelfUserInfoReq{}
if err := c.BindJSON(&params); err != nil {
@@ -233,6 +241,7 @@ func UpdateUserInfo(c *gin.Context) {
log.NewInfo(req.OperationID, "UpdateUserInfo api return ", resp)
c.JSON(http.StatusOK, resp)
}
func SetGlobalRecvMessageOpt(c *gin.Context) {
params := api.SetGlobalRecvMessageOptReq{}
if err := c.BindJSON(&params); err != nil {