cuelang.org/go@v0.10.1/encoding/jsonschema/testdata/issue3176.txtar (about) 1 -- definition.json -- 2 { 3 "oneOf": [ 4 { 5 "type": "object" 6 }, 7 { 8 "maxLength": 3, 9 "type": "string" 10 } 11 ], 12 "patternProperties": { 13 "^x-": { 14 "type": "string" 15 } 16 } 17 } 18 -- out/decode/cue -- 19 import "strings" 20 21 ({ 22 ... 23 } | strings.MaxRunes(3)) & (string | { 24 {[=~"^x-" & !~"^()$"]: string} 25 ... 26 })