File tree Expand file tree Collapse file tree 3 files changed +318
-0
lines changed Expand file tree Collapse file tree 3 files changed +318
-0
lines changed Original file line number Diff line number Diff line change 491
491
}
492
492
]
493
493
},
494
+ {
495
+ "description" : " unevaluatedProperties with if/then/else, then not defined" ,
496
+ "schema" : {
497
+ "type" : " object" ,
498
+ "if" : {
499
+ "properties" : {
500
+ "foo" : { "const" : " then" }
501
+ },
502
+ "required" : [" foo" ]
503
+ },
504
+ "else" : {
505
+ "properties" : {
506
+ "baz" : { "type" : " string" }
507
+ },
508
+ "required" : [" baz" ]
509
+ },
510
+ "unevaluatedProperties" : false
511
+ },
512
+ "tests" : [
513
+ {
514
+ "description" : " when if is true and has no unevaluated properties" ,
515
+ "data" : {
516
+ "foo" : " then" ,
517
+ "bar" : " bar"
518
+ },
519
+ "valid" : false
520
+ },
521
+ {
522
+ "description" : " when if is true and has unevaluated properties" ,
523
+ "data" : {
524
+ "foo" : " then" ,
525
+ "bar" : " bar" ,
526
+ "baz" : " baz"
527
+ },
528
+ "valid" : false
529
+ },
530
+ {
531
+ "description" : " when if is false and has no unevaluated properties" ,
532
+ "data" : {
533
+ "baz" : " baz"
534
+ },
535
+ "valid" : true
536
+ },
537
+ {
538
+ "description" : " when if is false and has unevaluated properties" ,
539
+ "data" : {
540
+ "foo" : " else" ,
541
+ "baz" : " baz"
542
+ },
543
+ "valid" : false
544
+ }
545
+ ]
546
+ },
547
+ {
548
+ "description" : " unevaluatedProperties with if/then/else, else not defined" ,
549
+ "schema" : {
550
+ "type" : " object" ,
551
+ "if" : {
552
+ "properties" : {
553
+ "foo" : { "const" : " then" }
554
+ },
555
+ "required" : [" foo" ]
556
+ },
557
+ "then" : {
558
+ "properties" : {
559
+ "bar" : { "type" : " string" }
560
+ },
561
+ "required" : [" bar" ]
562
+ },
563
+ "unevaluatedProperties" : false
564
+ },
565
+ "tests" : [
566
+ {
567
+ "description" : " when if is true and has no unevaluated properties" ,
568
+ "data" : {
569
+ "foo" : " then" ,
570
+ "bar" : " bar"
571
+ },
572
+ "valid" : true
573
+ },
574
+ {
575
+ "description" : " when if is true and has unevaluated properties" ,
576
+ "data" : {
577
+ "foo" : " then" ,
578
+ "bar" : " bar" ,
579
+ "baz" : " baz"
580
+ },
581
+ "valid" : false
582
+ },
583
+ {
584
+ "description" : " when if is false and has no unevaluated properties" ,
585
+ "data" : {
586
+ "baz" : " baz"
587
+ },
588
+ "valid" : false
589
+ },
590
+ {
591
+ "description" : " when if is false and has unevaluated properties" ,
592
+ "data" : {
593
+ "foo" : " else" ,
594
+ "baz" : " baz"
595
+ },
596
+ "valid" : false
597
+ }
598
+ ]
599
+ },
494
600
{
495
601
"description" : " unevaluatedProperties with dependentSchemas" ,
496
602
"schema" : {
Original file line number Diff line number Diff line change 491
491
}
492
492
]
493
493
},
494
+ {
495
+ "description" : " unevaluatedProperties with if/then/else, then not defined" ,
496
+ "schema" : {
497
+ "type" : " object" ,
498
+ "if" : {
499
+ "properties" : {
500
+ "foo" : { "const" : " then" }
501
+ },
502
+ "required" : [" foo" ]
503
+ },
504
+ "else" : {
505
+ "properties" : {
506
+ "baz" : { "type" : " string" }
507
+ },
508
+ "required" : [" baz" ]
509
+ },
510
+ "unevaluatedProperties" : false
511
+ },
512
+ "tests" : [
513
+ {
514
+ "description" : " when if is true and has no unevaluated properties" ,
515
+ "data" : {
516
+ "foo" : " then" ,
517
+ "bar" : " bar"
518
+ },
519
+ "valid" : false
520
+ },
521
+ {
522
+ "description" : " when if is true and has unevaluated properties" ,
523
+ "data" : {
524
+ "foo" : " then" ,
525
+ "bar" : " bar" ,
526
+ "baz" : " baz"
527
+ },
528
+ "valid" : false
529
+ },
530
+ {
531
+ "description" : " when if is false and has no unevaluated properties" ,
532
+ "data" : {
533
+ "baz" : " baz"
534
+ },
535
+ "valid" : true
536
+ },
537
+ {
538
+ "description" : " when if is false and has unevaluated properties" ,
539
+ "data" : {
540
+ "foo" : " else" ,
541
+ "baz" : " baz"
542
+ },
543
+ "valid" : false
544
+ }
545
+ ]
546
+ },
547
+ {
548
+ "description" : " unevaluatedProperties with if/then/else, else not defined" ,
549
+ "schema" : {
550
+ "type" : " object" ,
551
+ "if" : {
552
+ "properties" : {
553
+ "foo" : { "const" : " then" }
554
+ },
555
+ "required" : [" foo" ]
556
+ },
557
+ "then" : {
558
+ "properties" : {
559
+ "bar" : { "type" : " string" }
560
+ },
561
+ "required" : [" bar" ]
562
+ },
563
+ "unevaluatedProperties" : false
564
+ },
565
+ "tests" : [
566
+ {
567
+ "description" : " when if is true and has no unevaluated properties" ,
568
+ "data" : {
569
+ "foo" : " then" ,
570
+ "bar" : " bar"
571
+ },
572
+ "valid" : true
573
+ },
574
+ {
575
+ "description" : " when if is true and has unevaluated properties" ,
576
+ "data" : {
577
+ "foo" : " then" ,
578
+ "bar" : " bar" ,
579
+ "baz" : " baz"
580
+ },
581
+ "valid" : false
582
+ },
583
+ {
584
+ "description" : " when if is false and has no unevaluated properties" ,
585
+ "data" : {
586
+ "baz" : " baz"
587
+ },
588
+ "valid" : false
589
+ },
590
+ {
591
+ "description" : " when if is false and has unevaluated properties" ,
592
+ "data" : {
593
+ "foo" : " else" ,
594
+ "baz" : " baz"
595
+ },
596
+ "valid" : false
597
+ }
598
+ ]
599
+ },
494
600
{
495
601
"description" : " unevaluatedProperties with dependentSchemas" ,
496
602
"schema" : {
Original file line number Diff line number Diff line change 491
491
}
492
492
]
493
493
},
494
+ {
495
+ "description" : " unevaluatedProperties with if/then/else, then not defined" ,
496
+ "schema" : {
497
+ "type" : " object" ,
498
+ "if" : {
499
+ "properties" : {
500
+ "foo" : { "const" : " then" }
501
+ },
502
+ "required" : [" foo" ]
503
+ },
504
+ "else" : {
505
+ "properties" : {
506
+ "baz" : { "type" : " string" }
507
+ },
508
+ "required" : [" baz" ]
509
+ },
510
+ "unevaluatedProperties" : false
511
+ },
512
+ "tests" : [
513
+ {
514
+ "description" : " when if is true and has no unevaluated properties" ,
515
+ "data" : {
516
+ "foo" : " then" ,
517
+ "bar" : " bar"
518
+ },
519
+ "valid" : false
520
+ },
521
+ {
522
+ "description" : " when if is true and has unevaluated properties" ,
523
+ "data" : {
524
+ "foo" : " then" ,
525
+ "bar" : " bar" ,
526
+ "baz" : " baz"
527
+ },
528
+ "valid" : false
529
+ },
530
+ {
531
+ "description" : " when if is false and has no unevaluated properties" ,
532
+ "data" : {
533
+ "baz" : " baz"
534
+ },
535
+ "valid" : true
536
+ },
537
+ {
538
+ "description" : " when if is false and has unevaluated properties" ,
539
+ "data" : {
540
+ "foo" : " else" ,
541
+ "baz" : " baz"
542
+ },
543
+ "valid" : false
544
+ }
545
+ ]
546
+ },
547
+ {
548
+ "description" : " unevaluatedProperties with if/then/else, else not defined" ,
549
+ "schema" : {
550
+ "type" : " object" ,
551
+ "if" : {
552
+ "properties" : {
553
+ "foo" : { "const" : " then" }
554
+ },
555
+ "required" : [" foo" ]
556
+ },
557
+ "then" : {
558
+ "properties" : {
559
+ "bar" : { "type" : " string" }
560
+ },
561
+ "required" : [" bar" ]
562
+ },
563
+ "unevaluatedProperties" : false
564
+ },
565
+ "tests" : [
566
+ {
567
+ "description" : " when if is true and has no unevaluated properties" ,
568
+ "data" : {
569
+ "foo" : " then" ,
570
+ "bar" : " bar"
571
+ },
572
+ "valid" : true
573
+ },
574
+ {
575
+ "description" : " when if is true and has unevaluated properties" ,
576
+ "data" : {
577
+ "foo" : " then" ,
578
+ "bar" : " bar" ,
579
+ "baz" : " baz"
580
+ },
581
+ "valid" : false
582
+ },
583
+ {
584
+ "description" : " when if is false and has no unevaluated properties" ,
585
+ "data" : {
586
+ "baz" : " baz"
587
+ },
588
+ "valid" : false
589
+ },
590
+ {
591
+ "description" : " when if is false and has unevaluated properties" ,
592
+ "data" : {
593
+ "foo" : " else" ,
594
+ "baz" : " baz"
595
+ },
596
+ "valid" : false
597
+ }
598
+ ]
599
+ },
494
600
{
495
601
"description" : " unevaluatedProperties with dependentSchemas" ,
496
602
"schema" : {
You can’t perform that action at this time.
0 commit comments