调试文档集成
This commit is contained in:
@ -30,7 +30,7 @@ type TestOut struct {
|
||||
}
|
||||
|
||||
type TestForm struct {
|
||||
Meta `tag:"测试表单" path:"/a/b/c/d" desc:"测试接口" method:"get"`
|
||||
Meta `tag:"测试表单" path:"/a/b/c/d" desc:"测试接口" method:"GET"`
|
||||
Age int `json:"age" form:"age" binding:"min=20" err_msg:"年龄不能小于20"`
|
||||
Name string `json:"name" form:"name"`
|
||||
Test *Test `json:"test" form:"test"`
|
||||
@ -42,7 +42,7 @@ type Test struct {
|
||||
|
||||
func Test_parseController(t *testing.T) {
|
||||
SetValidateErrTag("err_msg")
|
||||
s := NewServer(8080, nil)
|
||||
s := NewServer(8888, nil)
|
||||
s.Group("test", nil, TestController{})
|
||||
s.Start()
|
||||
}
|
||||
|
Reference in New Issue
Block a user