github.com/joomcode/cue@v0.4.4-0.20221111115225-539fe3512047/encoding/jsonschema/testdata/emptyobj.txtar (about) 1 // Objects without properties should convert correctly. 2 // 3 // Issue #734 4 -- github-workflow.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.err -- 26 -- out.cue -- 27 @jsonschema(schema="http://json-schema.org/draft-07/schema") 28 _ 29 30 #obj1: null | { 31 ... 32 } 33 34 #obj2: null | { 35 ... 36 }