cuelang.org/go@v0.10.1/encoding/jsonschema/testdata/type.txtar (about) 1 -- type.json -- 2 { 3 "type": "object", 4 "title": "Main schema", 5 6 "properties": { 7 "intString": { 8 "description": "an integer or string.", 9 "type": [ "string", "integer", "boolean", "array", "null" ] 10 }, 11 "object": { 12 "type": "object", 13 "default": { 14 "foo": "bar", 15 "baz": 1.3 16 } 17 }, 18 "numOrList": { 19 "oneOf": [ 20 { "type": "number" }, 21 { 22 "type": "array", 23 "items": { "type": "number" } 24 } 25 ], 26 "default": [ 1, 2, 3 ] 27 } 28 }, 29 "additionalProperties": false 30 } 31 32 -- out/decode/cue -- 33 // Main schema 34 intString?: null | bool | int | string | [...] 35 object?: { 36 ... 37 } | *{ 38 foo: "bar" 39 baz: 1.3 40 ... 41 } 42 numOrList?: number | [...number] | *[1, 2, 3]