-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
优化脚本 handlergen.sh
- 调整
interface
中方法注释,新增@Tags
、@Router
; - 生成的方法中,新增
swagger
注释信息;
例如:
type Handler interface {
// Create 创建用户
// @Tags User
// @Router /user/create [post]
Create() core.HandlerFunc
}
生成的方法注释如下:
// 创建用户
// @Summary 创建用户
// @Description 创建用户
// @Tags User
// @Accept json
// @Produce json
// @Param Request body createRequest true "请求信息"
// @Success 200 {object} createResponse
// @Failure 400 {object} code.Failure
// @Router /user/create [post]
func (h *handler) Create() core.HandlerFunc {}
Metadata
Metadata
Assignees
Labels
No labels