{ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "MyStruct", "type": "object", "properties": { "range": { "$ref": "#/$defs/Range_of_uint" }, "inclusive": { "$ref": "#/$defs/Range_of_double" }, "bound": { "$ref": "#/$defs/Bound_of_string" } }, "required": [ "range", "inclusive", "bound" ], "$defs": { "Range_of_uint": { "type": "object", "properties": { "start": { "type": "integer", "format": "uint", "minimum": 0 }, "end": { "type": "integer", "format": "uint", "minimum": 0 } }, "required": [ "start", "end" ] }, "Range_of_double": { "type": "object", "properties": { "start": { "type": "number", "format": "double" }, "end": { "type": "number", "format": "double" } }, "required": [ "start", "end" ] }, "Bound_of_string": { "oneOf": [ { "type": "object", "properties": { "Included": { "type": "string" } }, "required": [ "Included" ] }, { "type": "object", "properties": { "Excluded": { "type": "string" } }, "required": [ "Excluded" ] }, { "type": "string", "const": "Unbounded" } ] } } }