增加你名字端处理

This commit is contained in:
2025-02-17 22:04:23 +08:00
parent f6810bafbd
commit 0fc52fe51b
2 changed files with 12 additions and 2 deletions

View File

@ -25,10 +25,15 @@ type Meta struct {
//
// Date : 17:55 2024/7/19
func Test_parser_Openapi3(t *testing.T) {
type UserExt struct {
Job string `json:"job" dc:"job" binding:"required"`
Height string `json:"height" dc:"height" binding:"required"`
}
type User struct {
Meta `json:"-" deprecated:"false" path:"/user/detail" method:"POST" desc:"测试接口" tag:"用户,搜索" content_type:"application/json" output_content_type:"application/json"`
Name *string `json:"name" d:"zhang" desc:"用户姓名" binding:"required"`
Age string `json:"age" d:"18" desc:"年龄" binding:"required,oneof=12 13 18 90"`
UserExt
}
type UserDelete struct {
Meta `json:"-" deprecated:"false" path:"/user/detail" method:"DELETE" desc:"测试接口" tag:"用户,搜索" content_type:"application/json" output_content_type:"application/json"`