{ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "Outer", "type": "object", "properties": { "int": { "type": "integer", "format": "int32", "examples": [ 8, null ] }, "values": { "type": "object", "additionalProperties": true }, "value": true, "inner": { "anyOf": [ { "$ref": "#/$defs/Inner" }, { "type": "null" } ] }, "tuples": { "type": "array", "items": { "type": "array", "prefixItems": [ { "type": "integer", "format": "uint8", "minimum": 0 }, { "type": "integer", "format": "int64" } ], "minItems": 2, "maxItems": 2 } } }, "required": [ "int", "values", "value", "tuples" ], "$defs": { "Inner": { "oneOf": [ { "type": "string", "enum": [ "UndocumentedUnit1", "UndocumentedUnit2" ] }, { "description": "This is a documented unit variant", "type": "string", "const": "DocumentedUnit" }, { "type": "object", "properties": { "ValueNewType": true }, "required": [ "ValueNewType" ], "additionalProperties": false } ] } } }