Align several more bits of schema-schema json with the drifts made by the programatic type construction.
The gap between these isn't within the reach of this test to probe.
(Yet.  We'll get there.  It's not terribly much further.)
@@ -40,7 +40,7 @@ func TestSchemaSchemaParse(t *testing.T) {
"SchemaMap": {
"map": {
"keyType": "TypeName",
- "valueType": "Type"
+ "valueType": "TypeDefn"
}
},
"AdvancedDataLayoutName": {
@@ -67,12 +67,10 @@ func TestSchemaSchemaParse(t *testing.T) {
}
}
},
- "Type": {
+ "TypeDefn": {
"union": {
"representation": {
- "inline": {
- "discriminantKey": "kind",
- "discriminantTable": {
+ "keyed": {
"bool": "TypeBool",
"string": "TypeString",
"bytes": "TypeBytes",
@@ -88,7 +86,6 @@ func TestSchemaSchemaParse(t *testing.T) {
}
}
}
- }
},
"TypeKind": {
"enum": {
@@ -217,7 +214,7 @@ func TestSchemaSchemaParse(t *testing.T) {
"type": "TypeName"
},
"valueType": {
- "type": "TypeTerm"
+ "type": "TypeNameOrInlineDefn"
},
"valueNullable": {
"type": "Bool"
@@ -284,7 +281,7 @@ func TestSchemaSchemaParse(t *testing.T) {
"struct": {
"fields": {
"valueType": {
- "type": "TypeTerm"
+ "type": "TypeNameOrInlineDefn"
},
"valueNullable": {
"type": "Bool"
@@ -464,7 +461,7 @@ func TestSchemaSchemaParse(t *testing.T) {
"struct": {
"fields": {
"type": {
- "type": "TypeTerm"
+ "type": "TypeNameOrInlineDefn"
},
"optional": {
"type": "Bool"
@@ -487,28 +484,25 @@ func TestSchemaSchemaParse(t *testing.T) {
}
}
},
- "TypeTerm": {
+ "TypeNameOrInlineDefn": {
"union": {
"representation": {
"kinded": {
"string": "TypeName",
- "map": "InlineDefn"
+ "map": "TypeDefnInline"
}
}
}
},
- "InlineDefn": {
+ "TypeDefnInline": {
"union": {
"representation": {
- "inline": {
- "discriminantKey": "kind",
- "discriminantTable": {
+ "keyed": {
"map": "TypeMap",
"list": "TypeList"
}
}
}
- }
},
"StructRepresentation": {
"union": {
@@ -625,7 +619,7 @@ func TestSchemaSchemaParse(t *testing.T) {
"type": {
"map": {
"keyType": "EnumValue",
- "valueType": "Null"
+ "valueType": "Unit"
}
}
},
