cuelang.org/go@v0.13.0/encoding/jsonschema/testdata/txtar/typedis.txtar (about) 1 -- schema.json -- 2 { 3 "type": "object", 4 "title": "Main schema", 5 6 "properties": { 7 "intOrString1": { 8 "type": [ "string", "integer" ] 9 }, 10 "intOrString2": { 11 "oneOf": [ 12 { "type": "integer" }, 13 { "type": "string" } 14 ] 15 }, 16 "intOrString3": { 17 "anyOf": [ 18 { "type": "integer" }, 19 { "type": "string" } 20 ] 21 }, 22 23 "disjunction": { 24 "oneOf": [ 25 { 26 "anyOf": [ 27 { "type": "integer" }, 28 { "type": "string" } 29 ] 30 }, 31 { 32 "type": "integer", 33 "minimum": 3 34 } 35 ] 36 } 37 } 38 } 39 -- out/decode/extract -- 40 // Main schema 41 intOrString1?: int | string 42 intOrString2?: matchN(1, [int, string]) 43 intOrString3?: matchN(>=1, [int, string]) 44 disjunction?: matchN(1, [matchN(>=1, [int, string]), int & >=3]) 45 ...