{ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "Adjacent", "oneOf": [ { "type": "object", "properties": { "t": { "type": "string", "enum": [ "UnitOne" ] } }, "required": [ "t" ], "additionalProperties": false }, { "type": "object", "properties": { "t": { "type": "string", "enum": [ "StringMap" ] }, "c": { "type": "object", "additionalProperties": { "type": "string" } } }, "required": [ "t", "c" ], "additionalProperties": false }, { "type": "object", "properties": { "t": { "type": "string", "enum": [ "UnitStructNewType" ] }, "c": { "$ref": "#/$defs/UnitStruct" } }, "required": [ "t", "c" ], "additionalProperties": false }, { "type": "object", "properties": { "t": { "type": "string", "enum": [ "StructNewType" ] }, "c": { "$ref": "#/$defs/Struct" } }, "required": [ "t", "c" ], "additionalProperties": false }, { "type": "object", "properties": { "t": { "type": "string", "enum": [ "Struct" ] }, "c": { "type": "object", "properties": { "foo": { "type": "integer", "format": "int32" }, "bar": { "type": "boolean" } }, "additionalProperties": false, "required": [ "foo", "bar" ] } }, "required": [ "t", "c" ], "additionalProperties": false }, { "type": "object", "properties": { "t": { "type": "string", "enum": [ "Tuple" ] }, "c": { "type": "array", "prefixItems": [ { "type": "integer", "format": "int32" }, { "type": "boolean" } ], "minItems": 2, "maxItems": 2 } }, "required": [ "t", "c" ], "additionalProperties": false }, { "type": "object", "properties": { "t": { "type": "string", "enum": [ "UnitTwo" ] } }, "required": [ "t" ], "additionalProperties": false }, { "type": "object", "properties": { "t": { "type": "string", "enum": [ "WithInt" ] }, "c": { "type": "integer", "format": "int32" } }, "required": [ "t", "c" ], "additionalProperties": false } ], "$defs": { "UnitStruct": { "type": "null" }, "Struct": { "type": "object", "properties": { "foo": { "type": "integer", "format": "int32" }, "bar": { "type": "boolean" } }, "required": [ "foo", "bar" ] } } }