cuelang.org/go@v0.13.0/encoding/jsonschema/testdata/external/tests/draft2019-09/unevaluatedProperties.json (about) 1 [ 2 { 3 "description": "unevaluatedProperties true", 4 "schema": { 5 "$schema": "https://json-schema.org/draft/2019-09/schema", 6 "type": "object", 7 "unevaluatedProperties": true 8 }, 9 "skip": { 10 "v2": "extract error: keyword \"unevaluatedProperties\" not yet implemented", 11 "v3": "extract error: keyword \"unevaluatedProperties\" not yet implemented" 12 }, 13 "tests": [ 14 { 15 "description": "with no unevaluated properties", 16 "data": {}, 17 "valid": true, 18 "skip": { 19 "v2": "could not compile schema", 20 "v3": "could not compile schema" 21 } 22 }, 23 { 24 "description": "with unevaluated properties", 25 "data": { 26 "foo": "foo" 27 }, 28 "valid": true, 29 "skip": { 30 "v2": "could not compile schema", 31 "v3": "could not compile schema" 32 } 33 } 34 ] 35 }, 36 { 37 "description": "unevaluatedProperties schema", 38 "schema": { 39 "$schema": "https://json-schema.org/draft/2019-09/schema", 40 "type": "object", 41 "unevaluatedProperties": { 42 "type": "string", 43 "minLength": 3 44 } 45 }, 46 "skip": { 47 "v2": "extract error: keyword \"unevaluatedProperties\" not yet implemented", 48 "v3": "extract error: keyword \"unevaluatedProperties\" not yet implemented" 49 }, 50 "tests": [ 51 { 52 "description": "with no unevaluated properties", 53 "data": {}, 54 "valid": true, 55 "skip": { 56 "v2": "could not compile schema", 57 "v3": "could not compile schema" 58 } 59 }, 60 { 61 "description": "with valid unevaluated properties", 62 "data": { 63 "foo": "foo" 64 }, 65 "valid": true, 66 "skip": { 67 "v2": "could not compile schema", 68 "v3": "could not compile schema" 69 } 70 }, 71 { 72 "description": "with invalid unevaluated properties", 73 "data": { 74 "foo": "fo" 75 }, 76 "valid": false, 77 "skip": { 78 "v2": "could not compile schema", 79 "v3": "could not compile schema" 80 } 81 } 82 ] 83 }, 84 { 85 "description": "unevaluatedProperties false", 86 "schema": { 87 "$schema": "https://json-schema.org/draft/2019-09/schema", 88 "type": "object", 89 "unevaluatedProperties": false 90 }, 91 "skip": { 92 "v2": "extract error: keyword \"unevaluatedProperties\" not yet implemented", 93 "v3": "extract error: keyword \"unevaluatedProperties\" not yet implemented" 94 }, 95 "tests": [ 96 { 97 "description": "with no unevaluated properties", 98 "data": {}, 99 "valid": true, 100 "skip": { 101 "v2": "could not compile schema", 102 "v3": "could not compile schema" 103 } 104 }, 105 { 106 "description": "with unevaluated properties", 107 "data": { 108 "foo": "foo" 109 }, 110 "valid": false, 111 "skip": { 112 "v2": "could not compile schema", 113 "v3": "could not compile schema" 114 } 115 } 116 ] 117 }, 118 { 119 "description": "unevaluatedProperties with adjacent properties", 120 "schema": { 121 "$schema": "https://json-schema.org/draft/2019-09/schema", 122 "type": "object", 123 "properties": { 124 "foo": { 125 "type": "string" 126 } 127 }, 128 "unevaluatedProperties": false 129 }, 130 "skip": { 131 "v2": "extract error: keyword \"unevaluatedProperties\" not yet implemented", 132 "v3": "extract error: keyword \"unevaluatedProperties\" not yet implemented" 133 }, 134 "tests": [ 135 { 136 "description": "with no unevaluated properties", 137 "data": { 138 "foo": "foo" 139 }, 140 "valid": true, 141 "skip": { 142 "v2": "could not compile schema", 143 "v3": "could not compile schema" 144 } 145 }, 146 { 147 "description": "with unevaluated properties", 148 "data": { 149 "foo": "foo", 150 "bar": "bar" 151 }, 152 "valid": false, 153 "skip": { 154 "v2": "could not compile schema", 155 "v3": "could not compile schema" 156 } 157 } 158 ] 159 }, 160 { 161 "description": "unevaluatedProperties with adjacent patternProperties", 162 "schema": { 163 "$schema": "https://json-schema.org/draft/2019-09/schema", 164 "type": "object", 165 "patternProperties": { 166 "^foo": { 167 "type": "string" 168 } 169 }, 170 "unevaluatedProperties": false 171 }, 172 "skip": { 173 "v2": "extract error: keyword \"unevaluatedProperties\" not yet implemented", 174 "v3": "extract error: keyword \"unevaluatedProperties\" not yet implemented" 175 }, 176 "tests": [ 177 { 178 "description": "with no unevaluated properties", 179 "data": { 180 "foo": "foo" 181 }, 182 "valid": true, 183 "skip": { 184 "v2": "could not compile schema", 185 "v3": "could not compile schema" 186 } 187 }, 188 { 189 "description": "with unevaluated properties", 190 "data": { 191 "foo": "foo", 192 "bar": "bar" 193 }, 194 "valid": false, 195 "skip": { 196 "v2": "could not compile schema", 197 "v3": "could not compile schema" 198 } 199 } 200 ] 201 }, 202 { 203 "description": "unevaluatedProperties with adjacent additionalProperties", 204 "schema": { 205 "$schema": "https://json-schema.org/draft/2019-09/schema", 206 "type": "object", 207 "properties": { 208 "foo": { 209 "type": "string" 210 } 211 }, 212 "additionalProperties": true, 213 "unevaluatedProperties": false 214 }, 215 "skip": { 216 "v2": "extract error: keyword \"unevaluatedProperties\" not yet implemented", 217 "v3": "extract error: keyword \"unevaluatedProperties\" not yet implemented" 218 }, 219 "tests": [ 220 { 221 "description": "with no additional properties", 222 "data": { 223 "foo": "foo" 224 }, 225 "valid": true, 226 "skip": { 227 "v2": "could not compile schema", 228 "v3": "could not compile schema" 229 } 230 }, 231 { 232 "description": "with additional properties", 233 "data": { 234 "foo": "foo", 235 "bar": "bar" 236 }, 237 "valid": true, 238 "skip": { 239 "v2": "could not compile schema", 240 "v3": "could not compile schema" 241 } 242 } 243 ] 244 }, 245 { 246 "description": "unevaluatedProperties with nested properties", 247 "schema": { 248 "$schema": "https://json-schema.org/draft/2019-09/schema", 249 "type": "object", 250 "properties": { 251 "foo": { 252 "type": "string" 253 } 254 }, 255 "allOf": [ 256 { 257 "properties": { 258 "bar": { 259 "type": "string" 260 } 261 } 262 } 263 ], 264 "unevaluatedProperties": false 265 }, 266 "skip": { 267 "v2": "extract error: keyword \"unevaluatedProperties\" not yet implemented", 268 "v3": "extract error: keyword \"unevaluatedProperties\" not yet implemented" 269 }, 270 "tests": [ 271 { 272 "description": "with no additional properties", 273 "data": { 274 "foo": "foo", 275 "bar": "bar" 276 }, 277 "valid": true, 278 "skip": { 279 "v2": "could not compile schema", 280 "v3": "could not compile schema" 281 } 282 }, 283 { 284 "description": "with additional properties", 285 "data": { 286 "foo": "foo", 287 "bar": "bar", 288 "baz": "baz" 289 }, 290 "valid": false, 291 "skip": { 292 "v2": "could not compile schema", 293 "v3": "could not compile schema" 294 } 295 } 296 ] 297 }, 298 { 299 "description": "unevaluatedProperties with nested patternProperties", 300 "schema": { 301 "$schema": "https://json-schema.org/draft/2019-09/schema", 302 "type": "object", 303 "properties": { 304 "foo": { 305 "type": "string" 306 } 307 }, 308 "allOf": [ 309 { 310 "patternProperties": { 311 "^bar": { 312 "type": "string" 313 } 314 } 315 } 316 ], 317 "unevaluatedProperties": false 318 }, 319 "skip": { 320 "v2": "extract error: keyword \"unevaluatedProperties\" not yet implemented", 321 "v3": "extract error: keyword \"unevaluatedProperties\" not yet implemented" 322 }, 323 "tests": [ 324 { 325 "description": "with no additional properties", 326 "data": { 327 "foo": "foo", 328 "bar": "bar" 329 }, 330 "valid": true, 331 "skip": { 332 "v2": "could not compile schema", 333 "v3": "could not compile schema" 334 } 335 }, 336 { 337 "description": "with additional properties", 338 "data": { 339 "foo": "foo", 340 "bar": "bar", 341 "baz": "baz" 342 }, 343 "valid": false, 344 "skip": { 345 "v2": "could not compile schema", 346 "v3": "could not compile schema" 347 } 348 } 349 ] 350 }, 351 { 352 "description": "unevaluatedProperties with nested additionalProperties", 353 "schema": { 354 "$schema": "https://json-schema.org/draft/2019-09/schema", 355 "type": "object", 356 "properties": { 357 "foo": { 358 "type": "string" 359 } 360 }, 361 "allOf": [ 362 { 363 "additionalProperties": true 364 } 365 ], 366 "unevaluatedProperties": false 367 }, 368 "skip": { 369 "v2": "extract error: keyword \"unevaluatedProperties\" not yet implemented", 370 "v3": "extract error: keyword \"unevaluatedProperties\" not yet implemented" 371 }, 372 "tests": [ 373 { 374 "description": "with no additional properties", 375 "data": { 376 "foo": "foo" 377 }, 378 "valid": true, 379 "skip": { 380 "v2": "could not compile schema", 381 "v3": "could not compile schema" 382 } 383 }, 384 { 385 "description": "with additional properties", 386 "data": { 387 "foo": "foo", 388 "bar": "bar" 389 }, 390 "valid": true, 391 "skip": { 392 "v2": "could not compile schema", 393 "v3": "could not compile schema" 394 } 395 } 396 ] 397 }, 398 { 399 "description": "unevaluatedProperties with nested unevaluatedProperties", 400 "schema": { 401 "$schema": "https://json-schema.org/draft/2019-09/schema", 402 "type": "object", 403 "properties": { 404 "foo": { 405 "type": "string" 406 } 407 }, 408 "allOf": [ 409 { 410 "unevaluatedProperties": true 411 } 412 ], 413 "unevaluatedProperties": { 414 "type": "string", 415 "maxLength": 2 416 } 417 }, 418 "skip": { 419 "v2": "extract error: keyword \"unevaluatedProperties\" not yet implemented (and 1 more errors)", 420 "v3": "extract error: keyword \"unevaluatedProperties\" not yet implemented (and 1 more errors)" 421 }, 422 "tests": [ 423 { 424 "description": "with no nested unevaluated properties", 425 "data": { 426 "foo": "foo" 427 }, 428 "valid": true, 429 "skip": { 430 "v2": "could not compile schema", 431 "v3": "could not compile schema" 432 } 433 }, 434 { 435 "description": "with nested unevaluated properties", 436 "data": { 437 "foo": "foo", 438 "bar": "bar" 439 }, 440 "valid": true, 441 "skip": { 442 "v2": "could not compile schema", 443 "v3": "could not compile schema" 444 } 445 } 446 ] 447 }, 448 { 449 "description": "unevaluatedProperties with anyOf", 450 "schema": { 451 "$schema": "https://json-schema.org/draft/2019-09/schema", 452 "type": "object", 453 "properties": { 454 "foo": { 455 "type": "string" 456 } 457 }, 458 "anyOf": [ 459 { 460 "properties": { 461 "bar": { 462 "const": "bar" 463 } 464 }, 465 "required": [ 466 "bar" 467 ] 468 }, 469 { 470 "properties": { 471 "baz": { 472 "const": "baz" 473 } 474 }, 475 "required": [ 476 "baz" 477 ] 478 }, 479 { 480 "properties": { 481 "quux": { 482 "const": "quux" 483 } 484 }, 485 "required": [ 486 "quux" 487 ] 488 } 489 ], 490 "unevaluatedProperties": false 491 }, 492 "skip": { 493 "v2": "extract error: keyword \"unevaluatedProperties\" not yet implemented", 494 "v3": "extract error: keyword \"unevaluatedProperties\" not yet implemented" 495 }, 496 "tests": [ 497 { 498 "description": "when one matches and has no unevaluated properties", 499 "data": { 500 "foo": "foo", 501 "bar": "bar" 502 }, 503 "valid": true, 504 "skip": { 505 "v2": "could not compile schema", 506 "v3": "could not compile schema" 507 } 508 }, 509 { 510 "description": "when one matches and has unevaluated properties", 511 "data": { 512 "foo": "foo", 513 "bar": "bar", 514 "baz": "not-baz" 515 }, 516 "valid": false, 517 "skip": { 518 "v2": "could not compile schema", 519 "v3": "could not compile schema" 520 } 521 }, 522 { 523 "description": "when two match and has no unevaluated properties", 524 "data": { 525 "foo": "foo", 526 "bar": "bar", 527 "baz": "baz" 528 }, 529 "valid": true, 530 "skip": { 531 "v2": "could not compile schema", 532 "v3": "could not compile schema" 533 } 534 }, 535 { 536 "description": "when two match and has unevaluated properties", 537 "data": { 538 "foo": "foo", 539 "bar": "bar", 540 "baz": "baz", 541 "quux": "not-quux" 542 }, 543 "valid": false, 544 "skip": { 545 "v2": "could not compile schema", 546 "v3": "could not compile schema" 547 } 548 } 549 ] 550 }, 551 { 552 "description": "unevaluatedProperties with oneOf", 553 "schema": { 554 "$schema": "https://json-schema.org/draft/2019-09/schema", 555 "type": "object", 556 "properties": { 557 "foo": { 558 "type": "string" 559 } 560 }, 561 "oneOf": [ 562 { 563 "properties": { 564 "bar": { 565 "const": "bar" 566 } 567 }, 568 "required": [ 569 "bar" 570 ] 571 }, 572 { 573 "properties": { 574 "baz": { 575 "const": "baz" 576 } 577 }, 578 "required": [ 579 "baz" 580 ] 581 } 582 ], 583 "unevaluatedProperties": false 584 }, 585 "skip": { 586 "v2": "extract error: keyword \"unevaluatedProperties\" not yet implemented", 587 "v3": "extract error: keyword \"unevaluatedProperties\" not yet implemented" 588 }, 589 "tests": [ 590 { 591 "description": "with no unevaluated properties", 592 "data": { 593 "foo": "foo", 594 "bar": "bar" 595 }, 596 "valid": true, 597 "skip": { 598 "v2": "could not compile schema", 599 "v3": "could not compile schema" 600 } 601 }, 602 { 603 "description": "with unevaluated properties", 604 "data": { 605 "foo": "foo", 606 "bar": "bar", 607 "quux": "quux" 608 }, 609 "valid": false, 610 "skip": { 611 "v2": "could not compile schema", 612 "v3": "could not compile schema" 613 } 614 } 615 ] 616 }, 617 { 618 "description": "unevaluatedProperties with not", 619 "schema": { 620 "$schema": "https://json-schema.org/draft/2019-09/schema", 621 "type": "object", 622 "properties": { 623 "foo": { 624 "type": "string" 625 } 626 }, 627 "not": { 628 "not": { 629 "properties": { 630 "bar": { 631 "const": "bar" 632 } 633 }, 634 "required": [ 635 "bar" 636 ] 637 } 638 }, 639 "unevaluatedProperties": false 640 }, 641 "skip": { 642 "v2": "extract error: keyword \"unevaluatedProperties\" not yet implemented", 643 "v3": "extract error: keyword \"unevaluatedProperties\" not yet implemented" 644 }, 645 "tests": [ 646 { 647 "description": "with unevaluated properties", 648 "data": { 649 "foo": "foo", 650 "bar": "bar" 651 }, 652 "valid": false, 653 "skip": { 654 "v2": "could not compile schema", 655 "v3": "could not compile schema" 656 } 657 } 658 ] 659 }, 660 { 661 "description": "unevaluatedProperties with if/then/else", 662 "schema": { 663 "$schema": "https://json-schema.org/draft/2019-09/schema", 664 "type": "object", 665 "if": { 666 "properties": { 667 "foo": { 668 "const": "then" 669 } 670 }, 671 "required": [ 672 "foo" 673 ] 674 }, 675 "then": { 676 "properties": { 677 "bar": { 678 "type": "string" 679 } 680 }, 681 "required": [ 682 "bar" 683 ] 684 }, 685 "else": { 686 "properties": { 687 "baz": { 688 "type": "string" 689 } 690 }, 691 "required": [ 692 "baz" 693 ] 694 }, 695 "unevaluatedProperties": false 696 }, 697 "skip": { 698 "v2": "extract error: keyword \"unevaluatedProperties\" not yet implemented", 699 "v3": "extract error: keyword \"unevaluatedProperties\" not yet implemented" 700 }, 701 "tests": [ 702 { 703 "description": "when if is true and has no unevaluated properties", 704 "data": { 705 "foo": "then", 706 "bar": "bar" 707 }, 708 "valid": true, 709 "skip": { 710 "v2": "could not compile schema", 711 "v3": "could not compile schema" 712 } 713 }, 714 { 715 "description": "when if is true and has unevaluated properties", 716 "data": { 717 "foo": "then", 718 "bar": "bar", 719 "baz": "baz" 720 }, 721 "valid": false, 722 "skip": { 723 "v2": "could not compile schema", 724 "v3": "could not compile schema" 725 } 726 }, 727 { 728 "description": "when if is false and has no unevaluated properties", 729 "data": { 730 "baz": "baz" 731 }, 732 "valid": true, 733 "skip": { 734 "v2": "could not compile schema", 735 "v3": "could not compile schema" 736 } 737 }, 738 { 739 "description": "when if is false and has unevaluated properties", 740 "data": { 741 "foo": "else", 742 "baz": "baz" 743 }, 744 "valid": false, 745 "skip": { 746 "v2": "could not compile schema", 747 "v3": "could not compile schema" 748 } 749 } 750 ] 751 }, 752 { 753 "description": "unevaluatedProperties with if/then/else, then not defined", 754 "schema": { 755 "$schema": "https://json-schema.org/draft/2019-09/schema", 756 "type": "object", 757 "if": { 758 "properties": { 759 "foo": { 760 "const": "then" 761 } 762 }, 763 "required": [ 764 "foo" 765 ] 766 }, 767 "else": { 768 "properties": { 769 "baz": { 770 "type": "string" 771 } 772 }, 773 "required": [ 774 "baz" 775 ] 776 }, 777 "unevaluatedProperties": false 778 }, 779 "skip": { 780 "v2": "extract error: keyword \"unevaluatedProperties\" not yet implemented", 781 "v3": "extract error: keyword \"unevaluatedProperties\" not yet implemented" 782 }, 783 "tests": [ 784 { 785 "description": "when if is true and has no unevaluated properties", 786 "data": { 787 "foo": "then", 788 "bar": "bar" 789 }, 790 "valid": false, 791 "skip": { 792 "v2": "could not compile schema", 793 "v3": "could not compile schema" 794 } 795 }, 796 { 797 "description": "when if is true and has unevaluated properties", 798 "data": { 799 "foo": "then", 800 "bar": "bar", 801 "baz": "baz" 802 }, 803 "valid": false, 804 "skip": { 805 "v2": "could not compile schema", 806 "v3": "could not compile schema" 807 } 808 }, 809 { 810 "description": "when if is false and has no unevaluated properties", 811 "data": { 812 "baz": "baz" 813 }, 814 "valid": true, 815 "skip": { 816 "v2": "could not compile schema", 817 "v3": "could not compile schema" 818 } 819 }, 820 { 821 "description": "when if is false and has unevaluated properties", 822 "data": { 823 "foo": "else", 824 "baz": "baz" 825 }, 826 "valid": false, 827 "skip": { 828 "v2": "could not compile schema", 829 "v3": "could not compile schema" 830 } 831 } 832 ] 833 }, 834 { 835 "description": "unevaluatedProperties with if/then/else, else not defined", 836 "schema": { 837 "$schema": "https://json-schema.org/draft/2019-09/schema", 838 "type": "object", 839 "if": { 840 "properties": { 841 "foo": { 842 "const": "then" 843 } 844 }, 845 "required": [ 846 "foo" 847 ] 848 }, 849 "then": { 850 "properties": { 851 "bar": { 852 "type": "string" 853 } 854 }, 855 "required": [ 856 "bar" 857 ] 858 }, 859 "unevaluatedProperties": false 860 }, 861 "skip": { 862 "v2": "extract error: keyword \"unevaluatedProperties\" not yet implemented", 863 "v3": "extract error: keyword \"unevaluatedProperties\" not yet implemented" 864 }, 865 "tests": [ 866 { 867 "description": "when if is true and has no unevaluated properties", 868 "data": { 869 "foo": "then", 870 "bar": "bar" 871 }, 872 "valid": true, 873 "skip": { 874 "v2": "could not compile schema", 875 "v3": "could not compile schema" 876 } 877 }, 878 { 879 "description": "when if is true and has unevaluated properties", 880 "data": { 881 "foo": "then", 882 "bar": "bar", 883 "baz": "baz" 884 }, 885 "valid": false, 886 "skip": { 887 "v2": "could not compile schema", 888 "v3": "could not compile schema" 889 } 890 }, 891 { 892 "description": "when if is false and has no unevaluated properties", 893 "data": { 894 "baz": "baz" 895 }, 896 "valid": false, 897 "skip": { 898 "v2": "could not compile schema", 899 "v3": "could not compile schema" 900 } 901 }, 902 { 903 "description": "when if is false and has unevaluated properties", 904 "data": { 905 "foo": "else", 906 "baz": "baz" 907 }, 908 "valid": false, 909 "skip": { 910 "v2": "could not compile schema", 911 "v3": "could not compile schema" 912 } 913 } 914 ] 915 }, 916 { 917 "description": "unevaluatedProperties with dependentSchemas", 918 "schema": { 919 "$schema": "https://json-schema.org/draft/2019-09/schema", 920 "type": "object", 921 "properties": { 922 "foo": { 923 "type": "string" 924 } 925 }, 926 "dependentSchemas": { 927 "foo": { 928 "properties": { 929 "bar": { 930 "const": "bar" 931 } 932 }, 933 "required": [ 934 "bar" 935 ] 936 } 937 }, 938 "unevaluatedProperties": false 939 }, 940 "skip": { 941 "v2": "extract error: keyword \"dependentSchemas\" not yet implemented (and 1 more errors)", 942 "v3": "extract error: keyword \"dependentSchemas\" not yet implemented (and 1 more errors)" 943 }, 944 "tests": [ 945 { 946 "description": "with no unevaluated properties", 947 "data": { 948 "foo": "foo", 949 "bar": "bar" 950 }, 951 "valid": true, 952 "skip": { 953 "v2": "could not compile schema", 954 "v3": "could not compile schema" 955 } 956 }, 957 { 958 "description": "with unevaluated properties", 959 "data": { 960 "bar": "bar" 961 }, 962 "valid": false, 963 "skip": { 964 "v2": "could not compile schema", 965 "v3": "could not compile schema" 966 } 967 } 968 ] 969 }, 970 { 971 "description": "unevaluatedProperties with boolean schemas", 972 "schema": { 973 "$schema": "https://json-schema.org/draft/2019-09/schema", 974 "type": "object", 975 "properties": { 976 "foo": { 977 "type": "string" 978 } 979 }, 980 "allOf": [ 981 true 982 ], 983 "unevaluatedProperties": false 984 }, 985 "skip": { 986 "v2": "extract error: keyword \"unevaluatedProperties\" not yet implemented", 987 "v3": "extract error: keyword \"unevaluatedProperties\" not yet implemented" 988 }, 989 "tests": [ 990 { 991 "description": "with no unevaluated properties", 992 "data": { 993 "foo": "foo" 994 }, 995 "valid": true, 996 "skip": { 997 "v2": "could not compile schema", 998 "v3": "could not compile schema" 999 } 1000 }, 1001 { 1002 "description": "with unevaluated properties", 1003 "data": { 1004 "bar": "bar" 1005 }, 1006 "valid": false, 1007 "skip": { 1008 "v2": "could not compile schema", 1009 "v3": "could not compile schema" 1010 } 1011 } 1012 ] 1013 }, 1014 { 1015 "description": "unevaluatedProperties with $ref", 1016 "schema": { 1017 "$schema": "https://json-schema.org/draft/2019-09/schema", 1018 "type": "object", 1019 "$ref": "#/$defs/bar", 1020 "properties": { 1021 "foo": { 1022 "type": "string" 1023 } 1024 }, 1025 "unevaluatedProperties": false, 1026 "$defs": { 1027 "bar": { 1028 "properties": { 1029 "bar": { 1030 "type": "string" 1031 } 1032 } 1033 } 1034 } 1035 }, 1036 "skip": { 1037 "v2": "extract error: keyword \"unevaluatedProperties\" not yet implemented (and 1 more errors)", 1038 "v3": "extract error: keyword \"unevaluatedProperties\" not yet implemented (and 1 more errors)" 1039 }, 1040 "tests": [ 1041 { 1042 "description": "with no unevaluated properties", 1043 "data": { 1044 "foo": "foo", 1045 "bar": "bar" 1046 }, 1047 "valid": true, 1048 "skip": { 1049 "v2": "could not compile schema", 1050 "v3": "could not compile schema" 1051 } 1052 }, 1053 { 1054 "description": "with unevaluated properties", 1055 "data": { 1056 "foo": "foo", 1057 "bar": "bar", 1058 "baz": "baz" 1059 }, 1060 "valid": false, 1061 "skip": { 1062 "v2": "could not compile schema", 1063 "v3": "could not compile schema" 1064 } 1065 } 1066 ] 1067 }, 1068 { 1069 "description": "unevaluatedProperties before $ref", 1070 "schema": { 1071 "$schema": "https://json-schema.org/draft/2019-09/schema", 1072 "type": "object", 1073 "unevaluatedProperties": false, 1074 "properties": { 1075 "foo": { 1076 "type": "string" 1077 } 1078 }, 1079 "$ref": "#/$defs/bar", 1080 "$defs": { 1081 "bar": { 1082 "properties": { 1083 "bar": { 1084 "type": "string" 1085 } 1086 } 1087 } 1088 } 1089 }, 1090 "skip": { 1091 "v2": "extract error: keyword \"unevaluatedProperties\" not yet implemented (and 1 more errors)", 1092 "v3": "extract error: keyword \"unevaluatedProperties\" not yet implemented (and 1 more errors)" 1093 }, 1094 "tests": [ 1095 { 1096 "description": "with no unevaluated properties", 1097 "data": { 1098 "foo": "foo", 1099 "bar": "bar" 1100 }, 1101 "valid": true, 1102 "skip": { 1103 "v2": "could not compile schema", 1104 "v3": "could not compile schema" 1105 } 1106 }, 1107 { 1108 "description": "with unevaluated properties", 1109 "data": { 1110 "foo": "foo", 1111 "bar": "bar", 1112 "baz": "baz" 1113 }, 1114 "valid": false, 1115 "skip": { 1116 "v2": "could not compile schema", 1117 "v3": "could not compile schema" 1118 } 1119 } 1120 ] 1121 }, 1122 { 1123 "description": "unevaluatedProperties with $recursiveRef", 1124 "schema": { 1125 "$schema": "https://json-schema.org/draft/2019-09/schema", 1126 "$id": "https://example.com/unevaluated-properties-with-recursive-ref/extended-tree", 1127 "$recursiveAnchor": true, 1128 "$ref": "./tree", 1129 "properties": { 1130 "name": { 1131 "type": "string" 1132 } 1133 }, 1134 "$defs": { 1135 "tree": { 1136 "$id": "./tree", 1137 "$recursiveAnchor": true, 1138 "type": "object", 1139 "properties": { 1140 "node": true, 1141 "branches": { 1142 "$comment": "unevaluatedProperties comes first so it's more likely to bugs errors with implementations that are sensitive to keyword ordering", 1143 "unevaluatedProperties": false, 1144 "$recursiveRef": "#" 1145 } 1146 }, 1147 "required": [ 1148 "node" 1149 ] 1150 } 1151 } 1152 }, 1153 "skip": { 1154 "v2": "extract error: keyword \"$recursiveAnchor\" not yet implemented (and 7 more errors)", 1155 "v3": "extract error: keyword \"$recursiveAnchor\" not yet implemented (and 7 more errors)" 1156 }, 1157 "tests": [ 1158 { 1159 "description": "with no unevaluated properties", 1160 "data": { 1161 "name": "a", 1162 "node": 1, 1163 "branches": { 1164 "name": "b", 1165 "node": 2 1166 } 1167 }, 1168 "valid": true, 1169 "skip": { 1170 "v2": "could not compile schema", 1171 "v3": "could not compile schema" 1172 } 1173 }, 1174 { 1175 "description": "with unevaluated properties", 1176 "data": { 1177 "name": "a", 1178 "node": 1, 1179 "branches": { 1180 "foo": "b", 1181 "node": 2 1182 } 1183 }, 1184 "valid": false, 1185 "skip": { 1186 "v2": "could not compile schema", 1187 "v3": "could not compile schema" 1188 } 1189 } 1190 ] 1191 }, 1192 { 1193 "description": "unevaluatedProperties can't see inside cousins", 1194 "schema": { 1195 "$schema": "https://json-schema.org/draft/2019-09/schema", 1196 "allOf": [ 1197 { 1198 "properties": { 1199 "foo": true 1200 } 1201 }, 1202 { 1203 "unevaluatedProperties": false 1204 } 1205 ] 1206 }, 1207 "skip": { 1208 "v2": "extract error: keyword \"unevaluatedProperties\" not yet implemented", 1209 "v3": "extract error: keyword \"unevaluatedProperties\" not yet implemented" 1210 }, 1211 "tests": [ 1212 { 1213 "description": "always fails", 1214 "data": { 1215 "foo": 1 1216 }, 1217 "valid": false, 1218 "skip": { 1219 "v2": "could not compile schema", 1220 "v3": "could not compile schema" 1221 } 1222 } 1223 ] 1224 }, 1225 { 1226 "description": "unevaluatedProperties can't see inside cousins (reverse order)", 1227 "schema": { 1228 "$schema": "https://json-schema.org/draft/2019-09/schema", 1229 "allOf": [ 1230 { 1231 "unevaluatedProperties": false 1232 }, 1233 { 1234 "properties": { 1235 "foo": true 1236 } 1237 } 1238 ] 1239 }, 1240 "skip": { 1241 "v2": "extract error: keyword \"unevaluatedProperties\" not yet implemented", 1242 "v3": "extract error: keyword \"unevaluatedProperties\" not yet implemented" 1243 }, 1244 "tests": [ 1245 { 1246 "description": "always fails", 1247 "data": { 1248 "foo": 1 1249 }, 1250 "valid": false, 1251 "skip": { 1252 "v2": "could not compile schema", 1253 "v3": "could not compile schema" 1254 } 1255 } 1256 ] 1257 }, 1258 { 1259 "description": "nested unevaluatedProperties, outer false, inner true, properties outside", 1260 "schema": { 1261 "$schema": "https://json-schema.org/draft/2019-09/schema", 1262 "type": "object", 1263 "properties": { 1264 "foo": { 1265 "type": "string" 1266 } 1267 }, 1268 "allOf": [ 1269 { 1270 "unevaluatedProperties": true 1271 } 1272 ], 1273 "unevaluatedProperties": false 1274 }, 1275 "skip": { 1276 "v2": "extract error: keyword \"unevaluatedProperties\" not yet implemented (and 1 more errors)", 1277 "v3": "extract error: keyword \"unevaluatedProperties\" not yet implemented (and 1 more errors)" 1278 }, 1279 "tests": [ 1280 { 1281 "description": "with no nested unevaluated properties", 1282 "data": { 1283 "foo": "foo" 1284 }, 1285 "valid": true, 1286 "skip": { 1287 "v2": "could not compile schema", 1288 "v3": "could not compile schema" 1289 } 1290 }, 1291 { 1292 "description": "with nested unevaluated properties", 1293 "data": { 1294 "foo": "foo", 1295 "bar": "bar" 1296 }, 1297 "valid": true, 1298 "skip": { 1299 "v2": "could not compile schema", 1300 "v3": "could not compile schema" 1301 } 1302 } 1303 ] 1304 }, 1305 { 1306 "description": "nested unevaluatedProperties, outer false, inner true, properties inside", 1307 "schema": { 1308 "$schema": "https://json-schema.org/draft/2019-09/schema", 1309 "type": "object", 1310 "allOf": [ 1311 { 1312 "properties": { 1313 "foo": { 1314 "type": "string" 1315 } 1316 }, 1317 "unevaluatedProperties": true 1318 } 1319 ], 1320 "unevaluatedProperties": false 1321 }, 1322 "skip": { 1323 "v2": "extract error: keyword \"unevaluatedProperties\" not yet implemented (and 1 more errors)", 1324 "v3": "extract error: keyword \"unevaluatedProperties\" not yet implemented (and 1 more errors)" 1325 }, 1326 "tests": [ 1327 { 1328 "description": "with no nested unevaluated properties", 1329 "data": { 1330 "foo": "foo" 1331 }, 1332 "valid": true, 1333 "skip": { 1334 "v2": "could not compile schema", 1335 "v3": "could not compile schema" 1336 } 1337 }, 1338 { 1339 "description": "with nested unevaluated properties", 1340 "data": { 1341 "foo": "foo", 1342 "bar": "bar" 1343 }, 1344 "valid": true, 1345 "skip": { 1346 "v2": "could not compile schema", 1347 "v3": "could not compile schema" 1348 } 1349 } 1350 ] 1351 }, 1352 { 1353 "description": "nested unevaluatedProperties, outer true, inner false, properties outside", 1354 "schema": { 1355 "$schema": "https://json-schema.org/draft/2019-09/schema", 1356 "type": "object", 1357 "properties": { 1358 "foo": { 1359 "type": "string" 1360 } 1361 }, 1362 "allOf": [ 1363 { 1364 "unevaluatedProperties": false 1365 } 1366 ], 1367 "unevaluatedProperties": true 1368 }, 1369 "skip": { 1370 "v2": "extract error: keyword \"unevaluatedProperties\" not yet implemented (and 1 more errors)", 1371 "v3": "extract error: keyword \"unevaluatedProperties\" not yet implemented (and 1 more errors)" 1372 }, 1373 "tests": [ 1374 { 1375 "description": "with no nested unevaluated properties", 1376 "data": { 1377 "foo": "foo" 1378 }, 1379 "valid": false, 1380 "skip": { 1381 "v2": "could not compile schema", 1382 "v3": "could not compile schema" 1383 } 1384 }, 1385 { 1386 "description": "with nested unevaluated properties", 1387 "data": { 1388 "foo": "foo", 1389 "bar": "bar" 1390 }, 1391 "valid": false, 1392 "skip": { 1393 "v2": "could not compile schema", 1394 "v3": "could not compile schema" 1395 } 1396 } 1397 ] 1398 }, 1399 { 1400 "description": "nested unevaluatedProperties, outer true, inner false, properties inside", 1401 "schema": { 1402 "$schema": "https://json-schema.org/draft/2019-09/schema", 1403 "type": "object", 1404 "allOf": [ 1405 { 1406 "properties": { 1407 "foo": { 1408 "type": "string" 1409 } 1410 }, 1411 "unevaluatedProperties": false 1412 } 1413 ], 1414 "unevaluatedProperties": true 1415 }, 1416 "skip": { 1417 "v2": "extract error: keyword \"unevaluatedProperties\" not yet implemented (and 1 more errors)", 1418 "v3": "extract error: keyword \"unevaluatedProperties\" not yet implemented (and 1 more errors)" 1419 }, 1420 "tests": [ 1421 { 1422 "description": "with no nested unevaluated properties", 1423 "data": { 1424 "foo": "foo" 1425 }, 1426 "valid": true, 1427 "skip": { 1428 "v2": "could not compile schema", 1429 "v3": "could not compile schema" 1430 } 1431 }, 1432 { 1433 "description": "with nested unevaluated properties", 1434 "data": { 1435 "foo": "foo", 1436 "bar": "bar" 1437 }, 1438 "valid": false, 1439 "skip": { 1440 "v2": "could not compile schema", 1441 "v3": "could not compile schema" 1442 } 1443 } 1444 ] 1445 }, 1446 { 1447 "description": "cousin unevaluatedProperties, true and false, true with properties", 1448 "schema": { 1449 "$schema": "https://json-schema.org/draft/2019-09/schema", 1450 "type": "object", 1451 "allOf": [ 1452 { 1453 "properties": { 1454 "foo": { 1455 "type": "string" 1456 } 1457 }, 1458 "unevaluatedProperties": true 1459 }, 1460 { 1461 "unevaluatedProperties": false 1462 } 1463 ] 1464 }, 1465 "skip": { 1466 "v2": "extract error: keyword \"unevaluatedProperties\" not yet implemented (and 1 more errors)", 1467 "v3": "extract error: keyword \"unevaluatedProperties\" not yet implemented (and 1 more errors)" 1468 }, 1469 "tests": [ 1470 { 1471 "description": "with no nested unevaluated properties", 1472 "data": { 1473 "foo": "foo" 1474 }, 1475 "valid": false, 1476 "skip": { 1477 "v2": "could not compile schema", 1478 "v3": "could not compile schema" 1479 } 1480 }, 1481 { 1482 "description": "with nested unevaluated properties", 1483 "data": { 1484 "foo": "foo", 1485 "bar": "bar" 1486 }, 1487 "valid": false, 1488 "skip": { 1489 "v2": "could not compile schema", 1490 "v3": "could not compile schema" 1491 } 1492 } 1493 ] 1494 }, 1495 { 1496 "description": "cousin unevaluatedProperties, true and false, false with properties", 1497 "schema": { 1498 "$schema": "https://json-schema.org/draft/2019-09/schema", 1499 "type": "object", 1500 "allOf": [ 1501 { 1502 "unevaluatedProperties": true 1503 }, 1504 { 1505 "properties": { 1506 "foo": { 1507 "type": "string" 1508 } 1509 }, 1510 "unevaluatedProperties": false 1511 } 1512 ] 1513 }, 1514 "skip": { 1515 "v2": "extract error: keyword \"unevaluatedProperties\" not yet implemented (and 1 more errors)", 1516 "v3": "extract error: keyword \"unevaluatedProperties\" not yet implemented (and 1 more errors)" 1517 }, 1518 "tests": [ 1519 { 1520 "description": "with no nested unevaluated properties", 1521 "data": { 1522 "foo": "foo" 1523 }, 1524 "valid": true, 1525 "skip": { 1526 "v2": "could not compile schema", 1527 "v3": "could not compile schema" 1528 } 1529 }, 1530 { 1531 "description": "with nested unevaluated properties", 1532 "data": { 1533 "foo": "foo", 1534 "bar": "bar" 1535 }, 1536 "valid": false, 1537 "skip": { 1538 "v2": "could not compile schema", 1539 "v3": "could not compile schema" 1540 } 1541 } 1542 ] 1543 }, 1544 { 1545 "description": "property is evaluated in an uncle schema to unevaluatedProperties", 1546 "comment": "see https://stackoverflow.com/questions/66936884/deeply-nested-unevaluatedproperties-and-their-expectations", 1547 "schema": { 1548 "$schema": "https://json-schema.org/draft/2019-09/schema", 1549 "type": "object", 1550 "properties": { 1551 "foo": { 1552 "type": "object", 1553 "properties": { 1554 "bar": { 1555 "type": "string" 1556 } 1557 }, 1558 "unevaluatedProperties": false 1559 } 1560 }, 1561 "anyOf": [ 1562 { 1563 "properties": { 1564 "foo": { 1565 "properties": { 1566 "faz": { 1567 "type": "string" 1568 } 1569 } 1570 } 1571 } 1572 } 1573 ] 1574 }, 1575 "skip": { 1576 "v2": "extract error: keyword \"unevaluatedProperties\" not yet implemented", 1577 "v3": "extract error: keyword \"unevaluatedProperties\" not yet implemented" 1578 }, 1579 "tests": [ 1580 { 1581 "description": "no extra properties", 1582 "data": { 1583 "foo": { 1584 "bar": "test" 1585 } 1586 }, 1587 "valid": true, 1588 "skip": { 1589 "v2": "could not compile schema", 1590 "v3": "could not compile schema" 1591 } 1592 }, 1593 { 1594 "description": "uncle keyword evaluation is not significant", 1595 "data": { 1596 "foo": { 1597 "bar": "test", 1598 "faz": "test" 1599 } 1600 }, 1601 "valid": false, 1602 "skip": { 1603 "v2": "could not compile schema", 1604 "v3": "could not compile schema" 1605 } 1606 } 1607 ] 1608 }, 1609 { 1610 "description": "in-place applicator siblings, allOf has unevaluated", 1611 "schema": { 1612 "$schema": "https://json-schema.org/draft/2019-09/schema", 1613 "type": "object", 1614 "allOf": [ 1615 { 1616 "properties": { 1617 "foo": true 1618 }, 1619 "unevaluatedProperties": false 1620 } 1621 ], 1622 "anyOf": [ 1623 { 1624 "properties": { 1625 "bar": true 1626 } 1627 } 1628 ] 1629 }, 1630 "skip": { 1631 "v2": "extract error: keyword \"unevaluatedProperties\" not yet implemented", 1632 "v3": "extract error: keyword \"unevaluatedProperties\" not yet implemented" 1633 }, 1634 "tests": [ 1635 { 1636 "description": "base case: both properties present", 1637 "data": { 1638 "foo": 1, 1639 "bar": 1 1640 }, 1641 "valid": false, 1642 "skip": { 1643 "v2": "could not compile schema", 1644 "v3": "could not compile schema" 1645 } 1646 }, 1647 { 1648 "description": "in place applicator siblings, bar is missing", 1649 "data": { 1650 "foo": 1 1651 }, 1652 "valid": true, 1653 "skip": { 1654 "v2": "could not compile schema", 1655 "v3": "could not compile schema" 1656 } 1657 }, 1658 { 1659 "description": "in place applicator siblings, foo is missing", 1660 "data": { 1661 "bar": 1 1662 }, 1663 "valid": false, 1664 "skip": { 1665 "v2": "could not compile schema", 1666 "v3": "could not compile schema" 1667 } 1668 } 1669 ] 1670 }, 1671 { 1672 "description": "in-place applicator siblings, anyOf has unevaluated", 1673 "schema": { 1674 "$schema": "https://json-schema.org/draft/2019-09/schema", 1675 "type": "object", 1676 "allOf": [ 1677 { 1678 "properties": { 1679 "foo": true 1680 } 1681 } 1682 ], 1683 "anyOf": [ 1684 { 1685 "properties": { 1686 "bar": true 1687 }, 1688 "unevaluatedProperties": false 1689 } 1690 ] 1691 }, 1692 "skip": { 1693 "v2": "extract error: keyword \"unevaluatedProperties\" not yet implemented", 1694 "v3": "extract error: keyword \"unevaluatedProperties\" not yet implemented" 1695 }, 1696 "tests": [ 1697 { 1698 "description": "base case: both properties present", 1699 "data": { 1700 "foo": 1, 1701 "bar": 1 1702 }, 1703 "valid": false, 1704 "skip": { 1705 "v2": "could not compile schema", 1706 "v3": "could not compile schema" 1707 } 1708 }, 1709 { 1710 "description": "in place applicator siblings, bar is missing", 1711 "data": { 1712 "foo": 1 1713 }, 1714 "valid": false, 1715 "skip": { 1716 "v2": "could not compile schema", 1717 "v3": "could not compile schema" 1718 } 1719 }, 1720 { 1721 "description": "in place applicator siblings, foo is missing", 1722 "data": { 1723 "bar": 1 1724 }, 1725 "valid": true, 1726 "skip": { 1727 "v2": "could not compile schema", 1728 "v3": "could not compile schema" 1729 } 1730 } 1731 ] 1732 }, 1733 { 1734 "description": "unevaluatedProperties + single cyclic ref", 1735 "schema": { 1736 "$schema": "https://json-schema.org/draft/2019-09/schema", 1737 "type": "object", 1738 "properties": { 1739 "x": { 1740 "$ref": "#" 1741 } 1742 }, 1743 "unevaluatedProperties": false 1744 }, 1745 "skip": { 1746 "v2": "extract error: keyword \"unevaluatedProperties\" not yet implemented", 1747 "v3": "extract error: keyword \"unevaluatedProperties\" not yet implemented" 1748 }, 1749 "tests": [ 1750 { 1751 "description": "Empty is valid", 1752 "data": {}, 1753 "valid": true, 1754 "skip": { 1755 "v2": "could not compile schema", 1756 "v3": "could not compile schema" 1757 } 1758 }, 1759 { 1760 "description": "Single is valid", 1761 "data": { 1762 "x": {} 1763 }, 1764 "valid": true, 1765 "skip": { 1766 "v2": "could not compile schema", 1767 "v3": "could not compile schema" 1768 } 1769 }, 1770 { 1771 "description": "Unevaluated on 1st level is invalid", 1772 "data": { 1773 "x": {}, 1774 "y": {} 1775 }, 1776 "valid": false, 1777 "skip": { 1778 "v2": "could not compile schema", 1779 "v3": "could not compile schema" 1780 } 1781 }, 1782 { 1783 "description": "Nested is valid", 1784 "data": { 1785 "x": { 1786 "x": {} 1787 } 1788 }, 1789 "valid": true, 1790 "skip": { 1791 "v2": "could not compile schema", 1792 "v3": "could not compile schema" 1793 } 1794 }, 1795 { 1796 "description": "Unevaluated on 2nd level is invalid", 1797 "data": { 1798 "x": { 1799 "x": {}, 1800 "y": {} 1801 } 1802 }, 1803 "valid": false, 1804 "skip": { 1805 "v2": "could not compile schema", 1806 "v3": "could not compile schema" 1807 } 1808 }, 1809 { 1810 "description": "Deep nested is valid", 1811 "data": { 1812 "x": { 1813 "x": { 1814 "x": {} 1815 } 1816 } 1817 }, 1818 "valid": true, 1819 "skip": { 1820 "v2": "could not compile schema", 1821 "v3": "could not compile schema" 1822 } 1823 }, 1824 { 1825 "description": "Unevaluated on 3rd level is invalid", 1826 "data": { 1827 "x": { 1828 "x": { 1829 "x": {}, 1830 "y": {} 1831 } 1832 } 1833 }, 1834 "valid": false, 1835 "skip": { 1836 "v2": "could not compile schema", 1837 "v3": "could not compile schema" 1838 } 1839 } 1840 ] 1841 }, 1842 { 1843 "description": "unevaluatedProperties + ref inside allOf / oneOf", 1844 "schema": { 1845 "$schema": "https://json-schema.org/draft/2019-09/schema", 1846 "$defs": { 1847 "one": { 1848 "properties": { 1849 "a": true 1850 } 1851 }, 1852 "two": { 1853 "required": [ 1854 "x" 1855 ], 1856 "properties": { 1857 "x": true 1858 } 1859 } 1860 }, 1861 "allOf": [ 1862 { 1863 "$ref": "#/$defs/one" 1864 }, 1865 { 1866 "properties": { 1867 "b": true 1868 } 1869 }, 1870 { 1871 "oneOf": [ 1872 { 1873 "$ref": "#/$defs/two" 1874 }, 1875 { 1876 "required": [ 1877 "y" 1878 ], 1879 "properties": { 1880 "y": true 1881 } 1882 } 1883 ] 1884 } 1885 ], 1886 "unevaluatedProperties": false 1887 }, 1888 "skip": { 1889 "v2": "extract error: keyword \"unevaluatedProperties\" not yet implemented (and 1 more errors)", 1890 "v3": "extract error: keyword \"unevaluatedProperties\" not yet implemented (and 1 more errors)" 1891 }, 1892 "tests": [ 1893 { 1894 "description": "Empty is invalid (no x or y)", 1895 "data": {}, 1896 "valid": false, 1897 "skip": { 1898 "v2": "could not compile schema", 1899 "v3": "could not compile schema" 1900 } 1901 }, 1902 { 1903 "description": "a and b are invalid (no x or y)", 1904 "data": { 1905 "a": 1, 1906 "b": 1 1907 }, 1908 "valid": false, 1909 "skip": { 1910 "v2": "could not compile schema", 1911 "v3": "could not compile schema" 1912 } 1913 }, 1914 { 1915 "description": "x and y are invalid", 1916 "data": { 1917 "x": 1, 1918 "y": 1 1919 }, 1920 "valid": false, 1921 "skip": { 1922 "v2": "could not compile schema", 1923 "v3": "could not compile schema" 1924 } 1925 }, 1926 { 1927 "description": "a and x are valid", 1928 "data": { 1929 "a": 1, 1930 "x": 1 1931 }, 1932 "valid": true, 1933 "skip": { 1934 "v2": "could not compile schema", 1935 "v3": "could not compile schema" 1936 } 1937 }, 1938 { 1939 "description": "a and y are valid", 1940 "data": { 1941 "a": 1, 1942 "y": 1 1943 }, 1944 "valid": true, 1945 "skip": { 1946 "v2": "could not compile schema", 1947 "v3": "could not compile schema" 1948 } 1949 }, 1950 { 1951 "description": "a and b and x are valid", 1952 "data": { 1953 "a": 1, 1954 "b": 1, 1955 "x": 1 1956 }, 1957 "valid": true, 1958 "skip": { 1959 "v2": "could not compile schema", 1960 "v3": "could not compile schema" 1961 } 1962 }, 1963 { 1964 "description": "a and b and y are valid", 1965 "data": { 1966 "a": 1, 1967 "b": 1, 1968 "y": 1 1969 }, 1970 "valid": true, 1971 "skip": { 1972 "v2": "could not compile schema", 1973 "v3": "could not compile schema" 1974 } 1975 }, 1976 { 1977 "description": "a and b and x and y are invalid", 1978 "data": { 1979 "a": 1, 1980 "b": 1, 1981 "x": 1, 1982 "y": 1 1983 }, 1984 "valid": false, 1985 "skip": { 1986 "v2": "could not compile schema", 1987 "v3": "could not compile schema" 1988 } 1989 } 1990 ] 1991 }, 1992 { 1993 "description": "dynamic evalation inside nested refs", 1994 "schema": { 1995 "$schema": "https://json-schema.org/draft/2019-09/schema", 1996 "$defs": { 1997 "one": { 1998 "oneOf": [ 1999 { 2000 "$ref": "#/$defs/two" 2001 }, 2002 { 2003 "required": [ 2004 "b" 2005 ], 2006 "properties": { 2007 "b": true 2008 } 2009 }, 2010 { 2011 "required": [ 2012 "xx" 2013 ], 2014 "patternProperties": { 2015 "x": true 2016 } 2017 }, 2018 { 2019 "required": [ 2020 "all" 2021 ], 2022 "unevaluatedProperties": true 2023 } 2024 ] 2025 }, 2026 "two": { 2027 "oneOf": [ 2028 { 2029 "required": [ 2030 "c" 2031 ], 2032 "properties": { 2033 "c": true 2034 } 2035 }, 2036 { 2037 "required": [ 2038 "d" 2039 ], 2040 "properties": { 2041 "d": true 2042 } 2043 } 2044 ] 2045 } 2046 }, 2047 "oneOf": [ 2048 { 2049 "$ref": "#/$defs/one" 2050 }, 2051 { 2052 "required": [ 2053 "a" 2054 ], 2055 "properties": { 2056 "a": true 2057 } 2058 } 2059 ], 2060 "unevaluatedProperties": false 2061 }, 2062 "skip": { 2063 "v2": "extract error: keyword \"unevaluatedProperties\" not yet implemented (and 3 more errors)", 2064 "v3": "extract error: keyword \"unevaluatedProperties\" not yet implemented (and 3 more errors)" 2065 }, 2066 "tests": [ 2067 { 2068 "description": "Empty is invalid", 2069 "data": {}, 2070 "valid": false, 2071 "skip": { 2072 "v2": "could not compile schema", 2073 "v3": "could not compile schema" 2074 } 2075 }, 2076 { 2077 "description": "a is valid", 2078 "data": { 2079 "a": 1 2080 }, 2081 "valid": true, 2082 "skip": { 2083 "v2": "could not compile schema", 2084 "v3": "could not compile schema" 2085 } 2086 }, 2087 { 2088 "description": "b is valid", 2089 "data": { 2090 "b": 1 2091 }, 2092 "valid": true, 2093 "skip": { 2094 "v2": "could not compile schema", 2095 "v3": "could not compile schema" 2096 } 2097 }, 2098 { 2099 "description": "c is valid", 2100 "data": { 2101 "c": 1 2102 }, 2103 "valid": true, 2104 "skip": { 2105 "v2": "could not compile schema", 2106 "v3": "could not compile schema" 2107 } 2108 }, 2109 { 2110 "description": "d is valid", 2111 "data": { 2112 "d": 1 2113 }, 2114 "valid": true, 2115 "skip": { 2116 "v2": "could not compile schema", 2117 "v3": "could not compile schema" 2118 } 2119 }, 2120 { 2121 "description": "a + b is invalid", 2122 "data": { 2123 "a": 1, 2124 "b": 1 2125 }, 2126 "valid": false, 2127 "skip": { 2128 "v2": "could not compile schema", 2129 "v3": "could not compile schema" 2130 } 2131 }, 2132 { 2133 "description": "a + c is invalid", 2134 "data": { 2135 "a": 1, 2136 "c": 1 2137 }, 2138 "valid": false, 2139 "skip": { 2140 "v2": "could not compile schema", 2141 "v3": "could not compile schema" 2142 } 2143 }, 2144 { 2145 "description": "a + d is invalid", 2146 "data": { 2147 "a": 1, 2148 "d": 1 2149 }, 2150 "valid": false, 2151 "skip": { 2152 "v2": "could not compile schema", 2153 "v3": "could not compile schema" 2154 } 2155 }, 2156 { 2157 "description": "b + c is invalid", 2158 "data": { 2159 "b": 1, 2160 "c": 1 2161 }, 2162 "valid": false, 2163 "skip": { 2164 "v2": "could not compile schema", 2165 "v3": "could not compile schema" 2166 } 2167 }, 2168 { 2169 "description": "b + d is invalid", 2170 "data": { 2171 "b": 1, 2172 "d": 1 2173 }, 2174 "valid": false, 2175 "skip": { 2176 "v2": "could not compile schema", 2177 "v3": "could not compile schema" 2178 } 2179 }, 2180 { 2181 "description": "c + d is invalid", 2182 "data": { 2183 "c": 1, 2184 "d": 1 2185 }, 2186 "valid": false, 2187 "skip": { 2188 "v2": "could not compile schema", 2189 "v3": "could not compile schema" 2190 } 2191 }, 2192 { 2193 "description": "xx is valid", 2194 "data": { 2195 "xx": 1 2196 }, 2197 "valid": true, 2198 "skip": { 2199 "v2": "could not compile schema", 2200 "v3": "could not compile schema" 2201 } 2202 }, 2203 { 2204 "description": "xx + foox is valid", 2205 "data": { 2206 "xx": 1, 2207 "foox": 1 2208 }, 2209 "valid": true, 2210 "skip": { 2211 "v2": "could not compile schema", 2212 "v3": "could not compile schema" 2213 } 2214 }, 2215 { 2216 "description": "xx + foo is invalid", 2217 "data": { 2218 "xx": 1, 2219 "foo": 1 2220 }, 2221 "valid": false, 2222 "skip": { 2223 "v2": "could not compile schema", 2224 "v3": "could not compile schema" 2225 } 2226 }, 2227 { 2228 "description": "xx + a is invalid", 2229 "data": { 2230 "xx": 1, 2231 "a": 1 2232 }, 2233 "valid": false, 2234 "skip": { 2235 "v2": "could not compile schema", 2236 "v3": "could not compile schema" 2237 } 2238 }, 2239 { 2240 "description": "xx + b is invalid", 2241 "data": { 2242 "xx": 1, 2243 "b": 1 2244 }, 2245 "valid": false, 2246 "skip": { 2247 "v2": "could not compile schema", 2248 "v3": "could not compile schema" 2249 } 2250 }, 2251 { 2252 "description": "xx + c is invalid", 2253 "data": { 2254 "xx": 1, 2255 "c": 1 2256 }, 2257 "valid": false, 2258 "skip": { 2259 "v2": "could not compile schema", 2260 "v3": "could not compile schema" 2261 } 2262 }, 2263 { 2264 "description": "xx + d is invalid", 2265 "data": { 2266 "xx": 1, 2267 "d": 1 2268 }, 2269 "valid": false, 2270 "skip": { 2271 "v2": "could not compile schema", 2272 "v3": "could not compile schema" 2273 } 2274 }, 2275 { 2276 "description": "all is valid", 2277 "data": { 2278 "all": 1 2279 }, 2280 "valid": true, 2281 "skip": { 2282 "v2": "could not compile schema", 2283 "v3": "could not compile schema" 2284 } 2285 }, 2286 { 2287 "description": "all + foo is valid", 2288 "data": { 2289 "all": 1, 2290 "foo": 1 2291 }, 2292 "valid": true, 2293 "skip": { 2294 "v2": "could not compile schema", 2295 "v3": "could not compile schema" 2296 } 2297 }, 2298 { 2299 "description": "all + a is invalid", 2300 "data": { 2301 "all": 1, 2302 "a": 1 2303 }, 2304 "valid": false, 2305 "skip": { 2306 "v2": "could not compile schema", 2307 "v3": "could not compile schema" 2308 } 2309 } 2310 ] 2311 }, 2312 { 2313 "description": "non-object instances are valid", 2314 "schema": { 2315 "$schema": "https://json-schema.org/draft/2019-09/schema", 2316 "unevaluatedProperties": false 2317 }, 2318 "skip": { 2319 "v2": "extract error: keyword \"unevaluatedProperties\" not yet implemented", 2320 "v3": "extract error: keyword \"unevaluatedProperties\" not yet implemented" 2321 }, 2322 "tests": [ 2323 { 2324 "description": "ignores booleans", 2325 "data": true, 2326 "valid": true, 2327 "skip": { 2328 "v2": "could not compile schema", 2329 "v3": "could not compile schema" 2330 } 2331 }, 2332 { 2333 "description": "ignores integers", 2334 "data": 123, 2335 "valid": true, 2336 "skip": { 2337 "v2": "could not compile schema", 2338 "v3": "could not compile schema" 2339 } 2340 }, 2341 { 2342 "description": "ignores floats", 2343 "data": 1.0, 2344 "valid": true, 2345 "skip": { 2346 "v2": "could not compile schema", 2347 "v3": "could not compile schema" 2348 } 2349 }, 2350 { 2351 "description": "ignores arrays", 2352 "data": [], 2353 "valid": true, 2354 "skip": { 2355 "v2": "could not compile schema", 2356 "v3": "could not compile schema" 2357 } 2358 }, 2359 { 2360 "description": "ignores strings", 2361 "data": "foo", 2362 "valid": true, 2363 "skip": { 2364 "v2": "could not compile schema", 2365 "v3": "could not compile schema" 2366 } 2367 }, 2368 { 2369 "description": "ignores null", 2370 "data": null, 2371 "valid": true, 2372 "skip": { 2373 "v2": "could not compile schema", 2374 "v3": "could not compile schema" 2375 } 2376 } 2377 ] 2378 }, 2379 { 2380 "description": "unevaluatedProperties with null valued instance properties", 2381 "schema": { 2382 "$schema": "https://json-schema.org/draft/2019-09/schema", 2383 "unevaluatedProperties": { 2384 "type": "null" 2385 } 2386 }, 2387 "skip": { 2388 "v2": "extract error: keyword \"unevaluatedProperties\" not yet implemented", 2389 "v3": "extract error: keyword \"unevaluatedProperties\" not yet implemented" 2390 }, 2391 "tests": [ 2392 { 2393 "description": "allows null valued properties", 2394 "data": { 2395 "foo": null 2396 }, 2397 "valid": true, 2398 "skip": { 2399 "v2": "could not compile schema", 2400 "v3": "could not compile schema" 2401 } 2402 } 2403 ] 2404 }, 2405 { 2406 "description": "unevaluatedProperties not affected by propertyNames", 2407 "schema": { 2408 "$schema": "https://json-schema.org/draft/2019-09/schema", 2409 "propertyNames": { 2410 "maxLength": 1 2411 }, 2412 "unevaluatedProperties": { 2413 "type": "number" 2414 } 2415 }, 2416 "skip": { 2417 "v2": "extract error: keyword \"unevaluatedProperties\" not yet implemented", 2418 "v3": "extract error: keyword \"unevaluatedProperties\" not yet implemented" 2419 }, 2420 "tests": [ 2421 { 2422 "description": "allows only number properties", 2423 "data": { 2424 "a": 1 2425 }, 2426 "valid": true, 2427 "skip": { 2428 "v2": "could not compile schema", 2429 "v3": "could not compile schema" 2430 } 2431 }, 2432 { 2433 "description": "string property is invalid", 2434 "data": { 2435 "a": "b" 2436 }, 2437 "valid": false, 2438 "skip": { 2439 "v2": "could not compile schema", 2440 "v3": "could not compile schema" 2441 } 2442 } 2443 ] 2444 }, 2445 { 2446 "description": "unevaluatedProperties can see annotations from if without then and else", 2447 "schema": { 2448 "$schema": "https://json-schema.org/draft/2019-09/schema", 2449 "if": { 2450 "patternProperties": { 2451 "foo": { 2452 "type": "string" 2453 } 2454 } 2455 }, 2456 "unevaluatedProperties": false 2457 }, 2458 "skip": { 2459 "v2": "extract error: keyword \"unevaluatedProperties\" not yet implemented", 2460 "v3": "extract error: keyword \"unevaluatedProperties\" not yet implemented" 2461 }, 2462 "tests": [ 2463 { 2464 "description": "valid in case if is evaluated", 2465 "data": { 2466 "foo": "a" 2467 }, 2468 "valid": true, 2469 "skip": { 2470 "v2": "could not compile schema", 2471 "v3": "could not compile schema" 2472 } 2473 }, 2474 { 2475 "description": "invalid in case if is evaluated", 2476 "data": { 2477 "bar": "a" 2478 }, 2479 "valid": false, 2480 "skip": { 2481 "v2": "could not compile schema", 2482 "v3": "could not compile schema" 2483 } 2484 } 2485 ] 2486 }, 2487 { 2488 "description": "dependentSchemas with unevaluatedProperties", 2489 "schema": { 2490 "$schema": "https://json-schema.org/draft/2019-09/schema", 2491 "properties": { 2492 "foo2": {} 2493 }, 2494 "dependentSchemas": { 2495 "foo": {}, 2496 "foo2": { 2497 "properties": { 2498 "bar": {} 2499 } 2500 } 2501 }, 2502 "unevaluatedProperties": false 2503 }, 2504 "skip": { 2505 "v2": "extract error: keyword \"dependentSchemas\" not yet implemented (and 1 more errors)", 2506 "v3": "extract error: keyword \"dependentSchemas\" not yet implemented (and 1 more errors)" 2507 }, 2508 "tests": [ 2509 { 2510 "description": "unevaluatedProperties doesn't consider dependentSchemas", 2511 "data": { 2512 "foo": "" 2513 }, 2514 "valid": false, 2515 "skip": { 2516 "v2": "could not compile schema", 2517 "v3": "could not compile schema" 2518 } 2519 }, 2520 { 2521 "description": "unevaluatedProperties doesn't see bar when foo2 is absent", 2522 "data": { 2523 "bar": "" 2524 }, 2525 "valid": false, 2526 "skip": { 2527 "v2": "could not compile schema", 2528 "v3": "could not compile schema" 2529 } 2530 }, 2531 { 2532 "description": "unevaluatedProperties sees bar when foo2 is present", 2533 "data": { 2534 "foo2": "", 2535 "bar": "" 2536 }, 2537 "valid": true, 2538 "skip": { 2539 "v2": "could not compile schema", 2540 "v3": "could not compile schema" 2541 } 2542 } 2543 ] 2544 } 2545 ]