mirror of
https://github.com/rancher/steve.git
synced 2025-09-20 02:51:11 +00:00
Add test for deeper nesting of maps and arrays
This commit is contained in:
@@ -253,6 +253,30 @@ func TestSchemaFieldVisitor(t *testing.T) {
|
||||
Description: protoNestedMap.Description,
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "multi-level nested maps and arrays",
|
||||
inputSchema: &proto.Map{
|
||||
BaseSchema: proto.BaseSchema{
|
||||
Description: "multi-level nested structure",
|
||||
},
|
||||
SubType: &proto.Array{
|
||||
BaseSchema: proto.BaseSchema{
|
||||
Description: "nested array",
|
||||
},
|
||||
SubType: &proto.Map{
|
||||
BaseSchema: proto.BaseSchema{
|
||||
Description: "deeply nested map",
|
||||
},
|
||||
SubType: &protoPrimitive,
|
||||
},
|
||||
},
|
||||
},
|
||||
wantDefinitions: map[string]definition{},
|
||||
wantField: definitionField{
|
||||
Type: "map[string]array[map[string]string]",
|
||||
Description: "multi-level nested structure",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
|
Reference in New Issue
Block a user