接口逻辑函数返回值严格校验时, 校验不通过, 由忽略接口注册修改为panic

This commit is contained in:
2025-02-07 17:25:25 +08:00
parent 1b1964881f
commit cb4718a269
2 changed files with 11 additions and 13 deletions

View File

@ -20,7 +20,7 @@ func (t TestController) Logic(ctx *gin.Context, formData *TestForm) (any, error)
}
type TestForm struct {
Meta `tag:"测试表单" path:"/a/b/c/d" desc:"测试接口" method:"get" strict:"true"`
Meta `tag:"测试表单" path:"/a/b/c/d" desc:"测试接口" method:"get"`
Age int `json:"age" form:"age" binding:"min=20"`
Name string `json:"name" form:"name"`
Test *Test `json:"test" form:"test"`