修复对象数组文档生成的BUg

This commit is contained in:
2024-04-23 16:53:40 +08:00
parent c46e7ee8de
commit a3038b693e
2 changed files with 46 additions and 14 deletions

View File

@ -93,6 +93,22 @@ func TestGenerate(t *testing.T) {
Required: true,
EnumList: []interface{}{18, 19, 20},
},
&define.SwaggerParameterInput{
Type: consts.DataTypeInt,
Description: "年龄",
Name: "test_list.[].age",
In: "body",
Required: true,
EnumList: []interface{}{18, 19, 20},
},
&define.SwaggerParameterInput{
Type: consts.DataTypeString,
Description: "年龄",
Name: "test_list.[].name",
In: "body",
Required: true,
EnumList: nil,
},
},
ResponseList: []*define.SwaggerResponseInput{
&define.SwaggerResponseInput{