调试文档集成

This commit is contained in:
2025-02-16 13:06:58 +08:00
parent c3df76e94d
commit d832eef5a0
4 changed files with 25 additions and 5 deletions

View File

@ -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()
}