mirror of
https://gitee.com/johng/gf
synced 2026-06-06 16:21:40 +08:00
feat: update dependent redoc js for swagger ui (#3217)
This commit is contained in:
@ -8,17 +8,21 @@ import (
|
||||
"github.com/gogf/gf/v2/net/ghttp"
|
||||
)
|
||||
|
||||
// HelloReq hello request
|
||||
type HelloReq struct {
|
||||
g.Meta `path:"/hello" method:"get" sort:"1"`
|
||||
Name string `v:"required" dc:"Your name"`
|
||||
}
|
||||
|
||||
// HelloRes hello response
|
||||
type HelloRes struct {
|
||||
Reply string `dc:"Reply content"`
|
||||
}
|
||||
|
||||
// Hello Controller
|
||||
type Hello struct{}
|
||||
|
||||
// Say function
|
||||
func (Hello) Say(ctx context.Context, req *HelloReq) (res *HelloRes, err error) {
|
||||
g.Log().Debugf(ctx, `receive say: %+v`, req)
|
||||
res = &HelloRes{
|
||||
|
||||
Reference in New Issue
Block a user