feat: 完善后端脚手架基础能力
This commit is contained in:
@@ -20,7 +20,12 @@ func NewExampleController() *ExampleController {
|
||||
}
|
||||
}
|
||||
|
||||
// Hello 示例接口
|
||||
// Hello godoc
|
||||
// @Summary 返回示例消息
|
||||
// @Tags example
|
||||
// @Produce json
|
||||
// @Success 200 {object} utils.APIResponse{data=HelloResponse}
|
||||
// @Router /example/hello [get]
|
||||
func (c *ExampleController) Hello(ctx *gin.Context) {
|
||||
ctx.JSON(http.StatusOK, utils.Success(c.service.Hello()))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user