1
0
mirror of https://github.com/rancher/steve.git synced 2025-09-20 02:51:11 +00:00

Adjust output to match request in issue, update tests to match reality

This commit is contained in:
Chad Roberts
2025-01-29 07:09:36 -05:00
parent b7afe7bdb3
commit cd74bc3deb
3 changed files with 17 additions and 16 deletions

View File

@@ -108,7 +108,7 @@ func TestSchemaFieldVisitor(t *testing.T) {
inputSchema: &protoMap,
wantDefinitions: map[string]definition{},
wantField: definitionField{
Type: "map[string]string",
Type: "map[string]",
Description: protoMap.Description,
},
},
@@ -151,7 +151,7 @@ func TestSchemaFieldVisitor(t *testing.T) {
Required: true,
},
"protoMap": {
Type: "map[" + protoPrimitive.Type + "]string",
Type: "map[" + protoPrimitive.Type + "]",
Description: protoMap.Description,
},
"protoPrimitive": {
@@ -194,7 +194,7 @@ func TestSchemaFieldVisitor(t *testing.T) {
Required: true,
},
"protoMap": {
Type: "map[string]string",
Type: "map[string]",
Description: protoMap.Description,
},
"protoPrimitive": {
@@ -237,7 +237,7 @@ func TestSchemaFieldVisitor(t *testing.T) {
Required: true,
},
"protoMap": {
Type: "map[string]string",
Type: "map[string]",
Description: protoMap.Description,
},
"protoPrimitive": {
@@ -255,7 +255,7 @@ func TestSchemaFieldVisitor(t *testing.T) {
},
},
wantField: definitionField{
Type: "map[string]io.cattle.test",
Type: "map[io.cattle.test]",
Description: protoNestedMap.Description,
},
},
@@ -279,7 +279,7 @@ func TestSchemaFieldVisitor(t *testing.T) {
},
wantDefinitions: map[string]definition{},
wantField: definitionField{
Type: "map[string]array[map[string]string]",
Type: "map[array[map[string]]]",
Description: "multi-level nested structure",
},
},