递归生成参数结构

This commit is contained in:
2024-04-23 15:54:06 +08:00
parent 4ef4e5ae3b
commit c46e7ee8de
2 changed files with 49 additions and 3 deletions

View File

@ -61,6 +61,30 @@ func TestGenerate(t *testing.T) {
Required: true,
EnumList: []interface{}{"man", "woman", "other"},
},
&define.SwaggerParameterInput{
Type: consts.DataTypeString,
Description: "性别",
Name: "person.job.list.[]",
In: "body",
Required: true,
EnumList: nil,
},
&define.SwaggerParameterInput{
Type: consts.DataTypeInt,
Description: "年份",
Name: "person.job.year.[]",
In: "body",
Required: true,
EnumList: nil,
},
&define.SwaggerParameterInput{
Type: consts.DataTypeInt,
Description: "测试工作",
Name: "person.job.test",
In: "body",
Required: true,
EnumList: nil,
},
&define.SwaggerParameterInput{
Type: consts.DataTypeInt,
Description: "年龄",