cuelang.org/go@v0.13.0/encoding/jsonschema/testdata/txtar/oneof_with_unconstrained-2.txtar (about)

     1  Issue 3586, second test case.
     2  
     3  -- schema.json --
     4  {
     5      "oneOf": [
     6          {
     7              "type": "string"
     8          },
     9          {
    10              "type": [
    11                  "string",
    12                  "number"
    13              ]
    14          }
    15      ]
    16  }
    17  -- out/decode/extract --
    18  matchN(1, [string, number | string])
    19  -- test/err-string.json --
    20  "something"
    21  -- out/decode/testerr/err-string --
    22  invalid value "something" (does not satisfy matchN): 2 matched, expected 1:
    23      generated.cue:1:1
    24      generated.cue:1:8
    25      test/err-string.json:1:1