this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

encoding/jsonschema: handle items keyword correctly in draft2020-12

In JSON Schema draft2020-12, when prefixItems is present, the items
keyword behaves like additionalItems from older drafts: it constrains
only elements beyond the prefix, not all elements.

Previously, constraintItems always created [...elem] which applied to
all items. With items: false and prefixItems, this incorrectly
disallowed even the prefix items themselves.

Fix this by:
- Moving prefixItems to phase 1 so it is always processed before
items (phase 2).
- In constraintItems, when s.list is already set (by prefixItems),
modifying the existing list's ellipsis via a shared
setAdditionalItems helper instead of creating a new constraint.

Signed-off-by: Roger Peppe <rogpeppe@gmail.com>
Change-Id: I9ff46e282c7bfc00a38c0430340732c008f83f21
Reviewed-on: https://cue.gerrithub.io/c/cue-lang/cue/+/1232503
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>

+46 -91
+1 -1
encoding/jsonschema/constraints.go
··· 114 114 p3("oneOf", constraintOneOf, allVersions|openAPILike), 115 115 p2("pattern", constraintPattern, allVersions|openAPILike), 116 116 p3("patternProperties", constraintPatternProperties, allVersions), 117 - p2("prefixItems", constraintPrefixItems, vfrom(VersionDraft2020_12)), 117 + p1("prefixItems", constraintPrefixItems, vfrom(VersionDraft2020_12)), 118 118 p2("properties", constraintProperties, allVersions|openAPILike), 119 119 p2("propertyNames", constraintPropertyNames, vfrom(VersionDraft6)), 120 120 px("readOnly", constraintTODO, vfrom(VersionDraft7)|openAPI),
+17 -2
encoding/jsonschema/constraints_array.go
··· 40 40 // If there's no "items" keyword or its value is not an array "additionalItems" doesn't apply. 41 41 return 42 42 } 43 + setAdditionalItems(elem, s) 44 + } 45 + 46 + // setAdditionalItems modifies the ellipsis in s.list to constrain 47 + // additional items beyond the prefix. It handles the "additionalItems" 48 + // keyword (pre-2020-12) and the "items" keyword (2020-12+) when 49 + // prefixItems is present. 50 + func setAdditionalItems(elem ast.Expr, s *state) { 43 51 if len(s.list.Elts) == 0 { 44 - // Should never happen because "items" always adds an ellipsis 52 + // Should never happen because prefixItems always adds an ellipsis 45 53 panic("no elements in list") 46 54 } 47 55 last := s.list.Elts[len(s.list.Elts)-1].(*ast.Ellipsis) ··· 105 113 case cue.StructKind, cue.BoolKind: 106 114 elem := s.schema(n) 107 115 ast.SetRelPos(elem, token.NoRelPos) 108 - s.add(n, arrayType, ast.NewList(&ast.Ellipsis{Type: elem})) 116 + if s.list != nil { 117 + // In draft2020-12, when prefixItems is present, "items" applies 118 + // only to elements beyond the prefix, like "additionalItems" 119 + // did in earlier versions. 120 + setAdditionalItems(elem, s) 121 + } else { 122 + s.add(n, arrayType, ast.NewList(&ast.Ellipsis{Type: elem})) 123 + } 109 124 s.hasItems = true 110 125 111 126 case cue.ListKind:
+6 -6
encoding/jsonschema/external_teststats.txt
··· 3 3 Core tests: 4 4 5 5 v3: 6 - schema extract (pass / total): 1072 / 1363 = 78.7% 7 - tests (pass / total): 3917 / 4803 = 81.6% 8 - tests on extracted schemas (pass / total): 3917 / 4041 = 96.9% 6 + schema extract (pass / total): 1073 / 1363 = 78.7% 7 + tests (pass / total): 3931 / 4803 = 81.8% 8 + tests on extracted schemas (pass / total): 3931 / 4047 = 97.1% 9 9 10 10 v3-roundtrip: 11 - schema extract (pass / total): 240 / 1363 = 17.6% 12 - tests (pass / total): 860 / 4803 = 17.9% 13 - tests on extracted schemas (pass / total): 860 / 920 = 93.5% 11 + schema extract (pass / total): 241 / 1363 = 17.7% 12 + tests (pass / total): 874 / 4803 = 18.2% 13 + tests on extracted schemas (pass / total): 874 / 926 = 94.4% 14 14 15 15 Optional tests: 16 16
+16 -52
encoding/jsonschema/testdata/external/tests/draft2020-12/items.json
··· 126 126 } 127 127 ] 128 128 }, 129 - "skip": { 130 - "v3": "extract error: cannot compile resulting schema: #item.0: disallowed:\n generated.cue:10:12\n", 131 - "v3-roundtrip": "inital extract failed" 132 - }, 133 129 "tests": [ 134 130 { 135 131 "description": "valid items", ··· 159 155 } 160 156 ] 161 157 ], 162 - "valid": true, 163 - "skip": { 164 - "v3": "could not extract schema", 165 - "v3-roundtrip": "could not extract schema" 166 - } 158 + "valid": true 167 159 }, 168 160 { 169 161 "description": "too many items", ··· 201 193 } 202 194 ] 203 195 ], 204 - "valid": false, 205 - "skip": { 206 - "v3": "could not extract schema", 207 - "v3-roundtrip": "could not extract schema" 208 - } 196 + "valid": false 209 197 }, 210 198 { 211 199 "description": "too many sub-items", ··· 238 226 } 239 227 ] 240 228 ], 241 - "valid": false, 242 - "skip": { 243 - "v3": "could not extract schema", 244 - "v3-roundtrip": "could not extract schema" 245 - } 229 + "valid": false 246 230 }, 247 231 { 248 232 "description": "wrong item", ··· 267 251 } 268 252 ] 269 253 ], 270 - "valid": false, 271 - "skip": { 272 - "v3": "could not extract schema", 273 - "v3-roundtrip": "could not extract schema" 274 - } 254 + "valid": false 275 255 }, 276 256 { 277 257 "description": "wrong sub-item", ··· 299 279 } 300 280 ] 301 281 ], 302 - "valid": false, 303 - "skip": { 304 - "v3": "could not extract schema", 305 - "v3-roundtrip": "could not extract schema" 306 - } 282 + "valid": false 307 283 }, 308 284 { 309 285 "description": "fewer items is valid", ··· 321 297 ], 322 298 "valid": true, 323 299 "skip": { 324 - "v3": "could not extract schema", 325 - "v3-roundtrip": "could not extract schema" 300 + "v3": "incompatible list lengths (2 and 3):\n generated.cue:3:1\n0: incompatible list lengths (1 and 2):\n generated.cue:10:8\n", 301 + "v3-roundtrip": "incompatible list lengths (2 and 4)\n0: incompatible list lengths (1 and 3)\n" 326 302 } 327 303 } 328 304 ] ··· 461 437 "data": [], 462 438 "valid": true, 463 439 "skip": { 464 - "v3": "7 errors in empty disjunction:\nconflicting values [] and bool (mismatched types list and bool):\n generated.cue:3:1\n generated.cue:3:8\n instance.json:1:1\nconflicting values [] and null (mismatched types list and null):\n generated.cue:3:1\n instance.json:1:1\nconflicting values [] and number (mismatched types list and number):\n generated.cue:3:1\n generated.cue:3:15\n instance.json:1:1\nconflicting values [] and string (mismatched types list and string):\n generated.cue:3:1\n generated.cue:3:24\n instance.json:1:1\nconflicting values [] and {...} (mismatched types list and struct):\n generated.cue:3:1\n generated.cue:3:77\n instance.json:1:1\nincompatible list lengths (0 and 4):\n generated.cue:3:33\n0: disallowed:\n generated.cue:3:54\n", 465 - "v3-roundtrip": "conflicting values bool and [] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [] (mismatched types string and list):\n instance.json:1:1\nconflicting values {...} and [] (mismatched types struct and list):\n instance.json:1:1\nincompatible list lengths (0 and 4)\ninvalid value [] (does not satisfy matchN): 1 matched, expected 2:\n instance.json:1:1\ninvalid value [] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 440 + "v3": "6 errors in empty disjunction:\nconflicting values [] and bool (mismatched types list and bool):\n generated.cue:3:1\n generated.cue:3:8\n instance.json:1:1\nconflicting values [] and null (mismatched types list and null):\n generated.cue:3:1\n instance.json:1:1\nconflicting values [] and number (mismatched types list and number):\n generated.cue:3:1\n generated.cue:3:15\n instance.json:1:1\nconflicting values [] and string (mismatched types list and string):\n generated.cue:3:1\n generated.cue:3:24\n instance.json:1:1\nconflicting values [] and {...} (mismatched types list and struct):\n generated.cue:3:1\n generated.cue:3:45\n instance.json:1:1\nincompatible list lengths (0 and 3):\n generated.cue:3:33\n", 441 + "v3-roundtrip": "conflicting values bool and [] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [] (mismatched types string and list):\n instance.json:1:1\nconflicting values {...} and [] (mismatched types struct and list):\n instance.json:1:1\nincompatible list lengths (0 and 4)\ninvalid value [] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 466 442 } 467 443 }, 468 444 { ··· 472 448 ], 473 449 "valid": true, 474 450 "skip": { 475 - "v3": "7 errors in empty disjunction:\nconflicting values [1] and bool (mismatched types list and bool):\n generated.cue:3:1\n generated.cue:3:8\n instance.json:1:1\nconflicting values [1] and null (mismatched types list and null):\n generated.cue:3:1\n instance.json:1:1\nconflicting values [1] and number (mismatched types list and number):\n generated.cue:3:1\n generated.cue:3:15\n instance.json:1:1\nconflicting values [1] and string (mismatched types list and string):\n generated.cue:3:1\n generated.cue:3:24\n instance.json:1:1\nconflicting values [1] and {...} (mismatched types list and struct):\n generated.cue:3:1\n generated.cue:3:77\n instance.json:1:1\nincompatible list lengths (1 and 4):\n generated.cue:3:33\n0: disallowed:\n generated.cue:3:54\n", 476 - "v3-roundtrip": "conflicting values bool and [1] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [1] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [1] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [1] (mismatched types string and list):\n instance.json:1:1\nconflicting values {...} and [1] (mismatched types struct and list):\n instance.json:1:1\nincompatible list lengths (1 and 4)\ninvalid value [1] (does not satisfy matchN): 0 matched, expected 2:\n instance.json:1:1\n0: disallowed:\n instance.json:1:1\ninvalid value [1] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 451 + "v3": "6 errors in empty disjunction:\nconflicting values [1] and bool (mismatched types list and bool):\n generated.cue:3:1\n generated.cue:3:8\n instance.json:1:1\nconflicting values [1] and null (mismatched types list and null):\n generated.cue:3:1\n instance.json:1:1\nconflicting values [1] and number (mismatched types list and number):\n generated.cue:3:1\n generated.cue:3:15\n instance.json:1:1\nconflicting values [1] and string (mismatched types list and string):\n generated.cue:3:1\n generated.cue:3:24\n instance.json:1:1\nconflicting values [1] and {...} (mismatched types list and struct):\n generated.cue:3:1\n generated.cue:3:45\n instance.json:1:1\nincompatible list lengths (1 and 3):\n generated.cue:3:33\n", 452 + "v3-roundtrip": "conflicting values bool and [1] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [1] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [1] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [1] (mismatched types string and list):\n instance.json:1:1\nconflicting values {...} and [1] (mismatched types struct and list):\n instance.json:1:1\nincompatible list lengths (1 and 4)\ninvalid value [1] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 477 453 } 478 454 }, 479 455 { ··· 484 460 ], 485 461 "valid": true, 486 462 "skip": { 487 - "v3": "7 errors in empty disjunction:\nconflicting values [1,2] and bool (mismatched types list and bool):\n generated.cue:3:1\n generated.cue:3:8\n instance.json:1:1\nconflicting values [1,2] and null (mismatched types list and null):\n generated.cue:3:1\n instance.json:1:1\nconflicting values [1,2] and number (mismatched types list and number):\n generated.cue:3:1\n generated.cue:3:15\n instance.json:1:1\nconflicting values [1,2] and string (mismatched types list and string):\n generated.cue:3:1\n generated.cue:3:24\n instance.json:1:1\nconflicting values [1,2] and {...} (mismatched types list and struct):\n generated.cue:3:1\n generated.cue:3:77\n instance.json:1:1\nincompatible list lengths (2 and 4):\n generated.cue:3:33\n0: disallowed:\n generated.cue:3:54\n", 488 - "v3-roundtrip": "conflicting values bool and [1,2] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [1,2] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [1,2] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [1,2] (mismatched types string and list):\n instance.json:1:1\nconflicting values {...} and [1,2] (mismatched types struct and list):\n instance.json:1:1\nincompatible list lengths (2 and 4)\ninvalid value [1,2] (does not satisfy matchN): 0 matched, expected 2:\n instance.json:1:1\n0: disallowed:\n instance.json:1:1\ninvalid value [1,2] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 463 + "v3": "6 errors in empty disjunction:\nconflicting values [1,2] and bool (mismatched types list and bool):\n generated.cue:3:1\n generated.cue:3:8\n instance.json:1:1\nconflicting values [1,2] and null (mismatched types list and null):\n generated.cue:3:1\n instance.json:1:1\nconflicting values [1,2] and number (mismatched types list and number):\n generated.cue:3:1\n generated.cue:3:15\n instance.json:1:1\nconflicting values [1,2] and string (mismatched types list and string):\n generated.cue:3:1\n generated.cue:3:24\n instance.json:1:1\nconflicting values [1,2] and {...} (mismatched types list and struct):\n generated.cue:3:1\n generated.cue:3:45\n instance.json:1:1\nincompatible list lengths (2 and 3):\n generated.cue:3:33\n", 464 + "v3-roundtrip": "conflicting values bool and [1,2] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [1,2] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [1,2] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [1,2] (mismatched types string and list):\n instance.json:1:1\nconflicting values {...} and [1,2] (mismatched types struct and list):\n instance.json:1:1\nincompatible list lengths (2 and 4)\ninvalid value [1,2] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 489 465 } 490 466 }, 491 467 { ··· 495 471 2, 496 472 3 497 473 ], 498 - "valid": true, 499 - "skip": { 500 - "v3": "0: disallowed:\n generated.cue:3:54\n generated.cue:3:1\n instance.json:1:1\n", 501 - "v3-roundtrip": "conflicting values bool and [1,2,3] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [1,2,3] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [1,2,3] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [1,2,3] (mismatched types string and list):\n instance.json:1:1\nconflicting values {...} and [1,2,3] (mismatched types struct and list):\n instance.json:1:1\ninvalid value [1,2,3] (does not satisfy matchN): 1 matched, expected 2:\n instance.json:1:1\n0: disallowed:\n instance.json:1:1\ninvalid value [1,2,3] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 502 - } 474 + "valid": true 503 475 }, 504 476 { 505 477 "description": "additional items are not permitted", ··· 570 542 2, 571 543 3 572 544 ], 573 - "valid": true, 574 - "skip": { 575 - "v3": "6 errors in empty disjunction:\nconflicting values \"x\" and int (mismatched types string and int):\n generated.cue:3:1\n generated.cue:3:53\n instance.json:1:2\nconflicting values [\"x\",2,3] and bool (mismatched types list and bool):\n generated.cue:3:1\n generated.cue:3:8\n instance.json:1:1\nconflicting values [\"x\",2,3] and null (mismatched types list and null):\n generated.cue:3:1\n instance.json:1:1\nconflicting values [\"x\",2,3] and number (mismatched types list and number):\n generated.cue:3:1\n generated.cue:3:15\n instance.json:1:1\nconflicting values [\"x\",2,3] and string (mismatched types list and string):\n generated.cue:3:1\n generated.cue:3:24\n instance.json:1:1\nconflicting values [\"x\",2,3] and {...} (mismatched types list and struct):\n generated.cue:3:1\n generated.cue:3:60\n instance.json:1:1\n", 576 - "v3-roundtrip": "5 errors in empty disjunction:\nconflicting values \"x\" and int (mismatched types string and int):\n instance.json:1:2\nconflicting values [\"x\",2,3] and bool (mismatched types list and bool):\n instance.json:1:1\nconflicting values [\"x\",2,3] and null (mismatched types list and null):\n instance.json:1:1\nconflicting values [\"x\",2,3] and number (mismatched types list and number):\n instance.json:1:1\nconflicting values [\"x\",2,3] and {...} (mismatched types list and struct):\n instance.json:1:1\nconflicting values bool and [\"x\",2,3] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [\"x\",2,3] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [\"x\",2,3] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [\"x\",2,3] (mismatched types string and list):\n instance.json:1:1\nconflicting values {...} and [\"x\",2,3] (mismatched types struct and list):\n instance.json:1:1\ninvalid value [\"x\",2,3] (does not satisfy matchN): 1 matched, expected 2:\n instance.json:1:1\ninvalid value [\"x\",2,3] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 577 - } 545 + "valid": true 578 546 }, 579 547 { 580 548 "description": "wrong type of second item", ··· 610 578 "data": [ 611 579 null 612 580 ], 613 - "valid": true, 614 - "skip": { 615 - "v3": "0: disallowed:\n generated.cue:3:48\n generated.cue:3:1\n instance.json:1:1\n", 616 - "v3-roundtrip": "conflicting values bool and [null] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [null] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [null] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [null] (mismatched types string and list):\n instance.json:1:1\nconflicting values {...} and [null] (mismatched types struct and list):\n instance.json:1:1\ninvalid value [null] (does not satisfy matchN): 1 matched, expected 2:\n instance.json:1:1\n0: disallowed:\n instance.json:1:1\ninvalid value [null] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 617 - } 581 + "valid": true 618 582 } 619 583 ] 620 584 },
+6 -30
encoding/jsonschema/testdata/external/tests/draft2020-12/uniqueItems.json
··· 460 460 false, 461 461 true 462 462 ], 463 - "valid": true, 464 - "skip": { 465 - "v3": "0: disallowed:\n generated.cue:5:78\n generated.cue:5:1\n instance.json:1:1\n", 466 - "v3-roundtrip": "conflicting values bool and [false,true] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [false,true] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [false,true] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [false,true] (mismatched types string and list):\n instance.json:1:1\nconflicting values {...} and [false,true] (mismatched types struct and list):\n instance.json:1:1\ninvalid value [false,true] (does not satisfy matchN): 1 matched, expected 2:\n instance.json:1:1\n0: disallowed:\n instance.json:1:1\ninvalid value [false,true] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 467 - } 463 + "valid": true 468 464 }, 469 465 { 470 466 "description": "[true, false] from items array is valid", ··· 472 468 true, 473 469 false 474 470 ], 475 - "valid": true, 476 - "skip": { 477 - "v3": "0: disallowed:\n generated.cue:5:78\n generated.cue:5:1\n instance.json:1:1\n", 478 - "v3-roundtrip": "conflicting values bool and [true,false] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [true,false] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [true,false] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [true,false] (mismatched types string and list):\n instance.json:1:1\nconflicting values {...} and [true,false] (mismatched types struct and list):\n instance.json:1:1\ninvalid value [true,false] (does not satisfy matchN): 1 matched, expected 2:\n instance.json:1:1\n0: disallowed:\n instance.json:1:1\ninvalid value [true,false] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 479 - } 471 + "valid": true 480 472 }, 481 473 { 482 474 "description": "[false, false] from items array is not valid", ··· 797 789 false, 798 790 true 799 791 ], 800 - "valid": true, 801 - "skip": { 802 - "v3": "0: disallowed:\n generated.cue:3:57\n generated.cue:3:1\n instance.json:1:1\n", 803 - "v3-roundtrip": "conflicting values bool and [false,true] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [false,true] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [false,true] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [false,true] (mismatched types string and list):\n instance.json:1:1\nconflicting values {...} and [false,true] (mismatched types struct and list):\n instance.json:1:1\ninvalid value [false,true] (does not satisfy matchN): 1 matched, expected 2:\n instance.json:1:1\n0: disallowed:\n instance.json:1:1\ninvalid value [false,true] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 804 - } 792 + "valid": true 805 793 }, 806 794 { 807 795 "description": "[true, false] from items array is valid", ··· 809 797 true, 810 798 false 811 799 ], 812 - "valid": true, 813 - "skip": { 814 - "v3": "0: disallowed:\n generated.cue:3:57\n generated.cue:3:1\n instance.json:1:1\n", 815 - "v3-roundtrip": "conflicting values bool and [true,false] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [true,false] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [true,false] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [true,false] (mismatched types string and list):\n instance.json:1:1\nconflicting values {...} and [true,false] (mismatched types struct and list):\n instance.json:1:1\ninvalid value [true,false] (does not satisfy matchN): 1 matched, expected 2:\n instance.json:1:1\n0: disallowed:\n instance.json:1:1\ninvalid value [true,false] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 816 - } 800 + "valid": true 817 801 }, 818 802 { 819 803 "description": "[false, false] from items array is valid", ··· 821 805 false, 822 806 false 823 807 ], 824 - "valid": true, 825 - "skip": { 826 - "v3": "0: disallowed:\n generated.cue:3:57\n generated.cue:3:1\n instance.json:1:1\n", 827 - "v3-roundtrip": "conflicting values bool and [false,false] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [false,false] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [false,false] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [false,false] (mismatched types string and list):\n instance.json:1:1\nconflicting values {...} and [false,false] (mismatched types struct and list):\n instance.json:1:1\ninvalid value [false,false] (does not satisfy matchN): 1 matched, expected 2:\n instance.json:1:1\n0: disallowed:\n instance.json:1:1\ninvalid value [false,false] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 828 - } 808 + "valid": true 829 809 }, 830 810 { 831 811 "description": "[true, true] from items array is valid", ··· 833 813 true, 834 814 true 835 815 ], 836 - "valid": true, 837 - "skip": { 838 - "v3": "0: disallowed:\n generated.cue:3:57\n generated.cue:3:1\n instance.json:1:1\n", 839 - "v3-roundtrip": "conflicting values bool and [true,true] (mismatched types bool and list):\n instance.json:1:1\nconflicting values null and [true,true] (mismatched types null and list):\n instance.json:1:1\nconflicting values number and [true,true] (mismatched types number and list):\n instance.json:1:1\nconflicting values string and [true,true] (mismatched types string and list):\n instance.json:1:1\nconflicting values {...} and [true,true] (mismatched types struct and list):\n instance.json:1:1\ninvalid value [true,true] (does not satisfy matchN): 1 matched, expected 2:\n instance.json:1:1\n0: disallowed:\n instance.json:1:1\ninvalid value [true,true] (does not satisfy matchN): 0 matched, expected \u003e=1:\n instance.json:1:1\n" 840 - } 816 + "valid": true 841 817 }, 842 818 { 843 819 "description": "extra items are invalid even if unique",