File tree Expand file tree Collapse file tree 4 files changed +388
-0
lines changed Expand file tree Collapse file tree 4 files changed +388
-0
lines changed Original file line number Diff line number Diff line change 433
433
"valid" : false
434
434
}
435
435
]
436
+ },
437
+ {
438
+ "description" : " item is evaluated in an uncle schema to unevaluatedItems" ,
439
+ "schema" : {
440
+ "type" : " object" ,
441
+ "properties" : {
442
+ "foo" : {
443
+ "type" : " array" ,
444
+ "items" : [
445
+ {
446
+ "type" : " string"
447
+ }
448
+ ],
449
+ "unevaluatedItems" : false
450
+ }
451
+ },
452
+ "anyOf" : [
453
+ {
454
+ "properties" : {
455
+ "foo" : {
456
+ "items" : [
457
+ true ,
458
+ {
459
+ "type" : " string"
460
+ }
461
+ ]
462
+ }
463
+ }
464
+ }
465
+ ]
466
+ },
467
+ "tests" : [
468
+ {
469
+ "description" : " no extra items" ,
470
+ "data" : {
471
+ "foo" : [
472
+ " test"
473
+ ]
474
+ },
475
+ "valid" : true
476
+ },
477
+ {
478
+ "description" : " uncle keyword evaluation is not significant" ,
479
+ "data" : {
480
+ "foo" : [
481
+ " test" ,
482
+ " test"
483
+ ]
484
+ },
485
+ "valid" : false
486
+ }
487
+ ]
436
488
}
437
489
]
Original file line number Diff line number Diff line change 809
809
"valid" : false
810
810
}
811
811
]
812
+ },
813
+ {
814
+ "description" : " property is evaluated in an uncle schema to unevaluatedProperties" ,
815
+ "comment" : " see https://stackoverflow.com/questions/66936884/deeply-nested-unevaluatedproperties-and-their-expectations" ,
816
+ "schema" : {
817
+ "type" : " object" ,
818
+ "properties" : {
819
+ "foo" : {
820
+ "type" : " object" ,
821
+ "properties" : {
822
+ "bar" : {
823
+ "type" : " string"
824
+ }
825
+ },
826
+ "unevaluatedProperties" : false
827
+ }
828
+ },
829
+ "anyOf" : [
830
+ {
831
+ "properties" : {
832
+ "foo" : {
833
+ "properties" : {
834
+ "faz" : {
835
+ "type" : " string"
836
+ }
837
+ }
838
+ }
839
+ }
840
+ }
841
+ ]
842
+ },
843
+ "tests" : [
844
+ {
845
+ "description" : " no extra properties" ,
846
+ "data" : {
847
+ "foo" : {
848
+ "bar" : " test"
849
+ }
850
+ },
851
+ "valid" : true
852
+ },
853
+ {
854
+ "description" : " uncle keyword evaluation is not significant" ,
855
+ "data" : {
856
+ "foo" : {
857
+ "bar" : " test" ,
858
+ "faz" : " test"
859
+ }
860
+ },
861
+ "valid" : false
862
+ }
863
+ ]
864
+ },
865
+ {
866
+ "description" : " in-place applicator siblings, allOf has unevaluated" ,
867
+ "schema" : {
868
+ "type" : " object" ,
869
+ "allOf" : [
870
+ {
871
+ "properties" : {
872
+ "foo" : true
873
+ },
874
+ "unevaluatedProperties" : false
875
+ }
876
+ ],
877
+ "anyOf" : [
878
+ {
879
+ "properties" : {
880
+ "bar" : true
881
+ }
882
+ }
883
+ ]
884
+ },
885
+ "tests" : [
886
+ {
887
+ "description" : " base case: both properties present" ,
888
+ "data" : {
889
+ "foo" : 1 ,
890
+ "bar" : 1
891
+ },
892
+ "valid" : false
893
+ },
894
+ {
895
+ "description" : " in place applicator siblings, bar is missing" ,
896
+ "data" : {
897
+ "foo" : 1
898
+ },
899
+ "valid" : true
900
+ },
901
+ {
902
+ "description" : " in place applicator siblings, foo is missing" ,
903
+ "data" : {
904
+ "bar" : 1
905
+ },
906
+ "valid" : false
907
+ }
908
+ ]
909
+ },
910
+ {
911
+ "description" : " in-place applicator siblings, anyOf has unevaluated" ,
912
+ "schema" : {
913
+ "type" : " object" ,
914
+ "allOf" : [
915
+ {
916
+ "properties" : {
917
+ "foo" : true
918
+ }
919
+ }
920
+ ],
921
+ "anyOf" : [
922
+ {
923
+ "properties" : {
924
+ "bar" : true
925
+ },
926
+ "unevaluatedProperties" : false
927
+ }
928
+ ]
929
+ },
930
+ "tests" : [
931
+ {
932
+ "description" : " base case: both properties present" ,
933
+ "data" : {
934
+ "foo" : 1 ,
935
+ "bar" : 1
936
+ },
937
+ "valid" : false
938
+ },
939
+ {
940
+ "description" : " in place applicator siblings, bar is missing" ,
941
+ "data" : {
942
+ "foo" : 1
943
+ },
944
+ "valid" : false
945
+ },
946
+ {
947
+ "description" : " in place applicator siblings, foo is missing" ,
948
+ "data" : {
949
+ "bar" : 1
950
+ },
951
+ "valid" : true
952
+ }
953
+ ]
812
954
}
813
955
]
Original file line number Diff line number Diff line change 433
433
"valid" : false
434
434
}
435
435
]
436
+ },
437
+ {
438
+ "description" : " item is evaluated in an uncle schema to unevaluatedItems" ,
439
+ "schema" : {
440
+ "type" : " object" ,
441
+ "properties" : {
442
+ "foo" : {
443
+ "type" : " array" ,
444
+ "prefixItems" : [
445
+ {
446
+ "type" : " string"
447
+ }
448
+ ],
449
+ "unevaluatedItems" : false
450
+ }
451
+ },
452
+ "anyOf" : [
453
+ {
454
+ "properties" : {
455
+ "foo" : {
456
+ "prefixItems" : [
457
+ true ,
458
+ {
459
+ "type" : " string"
460
+ }
461
+ ]
462
+ }
463
+ }
464
+ }
465
+ ]
466
+ },
467
+ "tests" : [
468
+ {
469
+ "description" : " no extra items" ,
470
+ "data" : {
471
+ "foo" : [
472
+ " test"
473
+ ]
474
+ },
475
+ "valid" : true
476
+ },
477
+ {
478
+ "description" : " uncle keyword evaluation is not significant" ,
479
+ "data" : {
480
+ "foo" : [
481
+ " test" ,
482
+ " test"
483
+ ]
484
+ },
485
+ "valid" : false
486
+ }
487
+ ]
436
488
}
437
489
]
You can’t perform that action at this time.
0 commit comments