cuelang.org/go@v0.10.1/encoding/jsonschema/testdata/num.txtar (about) 1 -- type.json -- 2 { 3 "type": "object", 4 5 "properties": { 6 "constant": { "const": 2 }, 7 "several": { 8 "enum": [ 1, 2, 3, 4 ] 9 }, 10 "inclusive": { 11 "type": "number", 12 "minimum": 2, 13 "maximum": 3 14 }, 15 "exclusive": { 16 "type": "integer", 17 "exclusiveMinimum": 2, 18 "exclusiveMaximum": 3 19 }, 20 "multi": { 21 "type": [ "integer", "string" ], 22 "minimum": 2, 23 "maximum": 3, 24 "maxLength": 5 25 }, 26 "legacy": { 27 "type": "number", 28 "exclusiveMinimum": true, 29 "minimum": 2, 30 "exclusiveMaximum": true, 31 "maximum": 3 32 }, 33 "cents": { 34 "type": "number", 35 "multipleOf": 0.05 36 } 37 }, 38 "additionalProperties": false 39 } 40 -- out/decode/cue -- 41 import ( 42 "strings" 43 "math" 44 ) 45 46 constant?: 2 47 several?: 1 | 2 | 3 | 4 48 inclusive?: >=2 & <=3 49 exclusive?: int & >2 & <3 50 multi?: int & >=2 & <=3 | strings.MaxRunes(5) 51 legacy?: >2 & <3 52 cents?: math.MultipleOf(0.05)