cuelang.org/go@v0.13.0/encoding/jsonschema/testdata/txtar/id_in_oneOf.txtar (about) 1 -- schema.json -- 2 { 3 "$schema": "http://json-schema.org/draft-07/schema#", 4 "$id": "https://test.example/foo", 5 "oneOf": [ 6 { 7 "$id": "https://1.test.example/string", 8 "type": "string" 9 }, 10 { 11 "$id": "https://2.test.example/object", 12 "type": "object" 13 } 14 ] 15 } 16 17 -- out/decode/extract -- 18 @jsonschema(schema="http://json-schema.org/draft-07/schema#") 19 @jsonschema(id="https://test.example/foo") 20 matchN(1, [_#defs."/oneOf/0", _#defs."/oneOf/1"]) 21 22 _#defs: "/oneOf/0": { 23 @jsonschema(id="https://1.test.example/string") 24 string 25 } 26 27 _#defs: "/oneOf/1": { 28 @jsonschema(id="https://2.test.example/object") 29 ... 30 }