cuelang.org/go@v0.13.0/encoding/jsonschema/testdata/txtar/emptyobj.txtar (about) 1 // Objects without properties should convert correctly. 2 // 3 // Issue #734 4 -- schema.json -- 5 { 6 "$schema": "http://json-schema.org/draft-07/schema#", 7 "definitions": { 8 "obj1": { 9 "oneOf": [ 10 { 11 "type": "object" 12 }, 13 { 14 "type": "null" 15 } 16 ], 17 "additionalProperties": true 18 }, 19 "obj2": { 20 "type": [ "object", "null" ], 21 "additionalProperties": true 22 } 23 } 24 } 25 -- out/decode/extract -- 26 @jsonschema(schema="http://json-schema.org/draft-07/schema#") 27 28 _ 29 30 #obj1: null | { 31 ... 32 } 33 34 #obj2: null | { 35 ... 36 }