cuelang.org/go@v0.10.1/encoding/jsonschema/testdata/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            "$schema": "http://json-schema.org/draft-07/schema#",
     8            "$id": "https://1.test.example/string",
     9            "type": "string"
    10        },
    11        {
    12            "$schema": "http://json-schema.org/draft-07/schema#",
    13            "$id": "https://2.test.example/object",
    14            "type": "object"
    15        }
    16    ]
    17  }
    18  
    19  -- out/decode/cue --
    20  @jsonschema(schema="http://json-schema.org/draft-07/schema#")
    21  @jsonschema(id="https://test.example/foo")
    22  {
    23  	@jsonschema(id="https://1.test.example/string")
    24  	string
    25  } | {
    26  	@jsonschema(id="https://2.test.example/object")
    27  	...
    28  }