@@ -431,7 +431,7 @@ def rule():
431
431
"properties" ,
432
432
"States" ,
433
433
"patternProperties" ,
434
- "^.{1,128 }$" ,
434
+ "^.{1,80 }$" ,
435
435
"required" ,
436
436
]
437
437
),
@@ -446,7 +446,7 @@ def rule():
446
446
"properties" ,
447
447
"States" ,
448
448
"patternProperties" ,
449
- "^.{1,128 }$" ,
449
+ "^.{1,80 }$" ,
450
450
"allOf" ,
451
451
0 ,
452
452
"then" ,
@@ -464,7 +464,7 @@ def rule():
464
464
"properties" ,
465
465
"States" ,
466
466
"patternProperties" ,
467
- "^.{1,128 }$" ,
467
+ "^.{1,80 }$" ,
468
468
"allOf" ,
469
469
3 ,
470
470
"then" ,
@@ -496,7 +496,7 @@ def rule():
496
496
"properties" ,
497
497
"States" ,
498
498
"patternProperties" ,
499
- "^.{1,128 }$" ,
499
+ "^.{1,80 }$" ,
500
500
"required" ,
501
501
]
502
502
),
@@ -578,7 +578,7 @@ def rule():
578
578
"properties" ,
579
579
"States" ,
580
580
"patternProperties" ,
581
- "^.{1,128 }$" ,
581
+ "^.{1,80 }$" ,
582
582
"allOf" ,
583
583
5 ,
584
584
"then" ,
@@ -598,7 +598,7 @@ def rule():
598
598
"properties" ,
599
599
"States" ,
600
600
"patternProperties" ,
601
- "^.{1,128 }$" ,
601
+ "^.{1,80 }$" ,
602
602
"allOf" ,
603
603
5 ,
604
604
"then" ,
@@ -674,7 +674,7 @@ def rule():
674
674
"properties" ,
675
675
"States" ,
676
676
"patternProperties" ,
677
- "^.{1,128 }$" ,
677
+ "^.{1,80 }$" ,
678
678
"allOf" ,
679
679
5 ,
680
680
"then" ,
@@ -774,7 +774,12 @@ def rule():
774
774
{
775
775
"Condition" : "BatchJobNotification" ,
776
776
"Next" : "Notify Success" ,
777
- }
777
+ },
778
+ {
779
+ "Variable" : "$.value" ,
780
+ "NumericLessThan" : 0 ,
781
+ # missing next
782
+ },
778
783
],
779
784
"Next" : "Notify Success" ,
780
785
},
@@ -822,7 +827,7 @@ def rule():
822
827
"properties" ,
823
828
"States" ,
824
829
"patternProperties" ,
825
- "^.{1,128 }$" ,
830
+ "^.{1,80 }$" ,
826
831
"allOf" ,
827
832
5 ,
828
833
"then" ,
@@ -848,7 +853,7 @@ def rule():
848
853
"properties" ,
849
854
"States" ,
850
855
"patternProperties" ,
851
- "^.{1,128 }$" ,
856
+ "^.{1,80 }$" ,
852
857
"allOf" ,
853
858
5 ,
854
859
"then" ,
@@ -874,7 +879,7 @@ def rule():
874
879
"properties" ,
875
880
"States" ,
876
881
"patternProperties" ,
877
- "^.{1,128 }$" ,
882
+ "^.{1,80 }$" ,
878
883
"allOf" ,
879
884
5 ,
880
885
"then" ,
@@ -911,7 +916,7 @@ def rule():
911
916
"properties" ,
912
917
"States" ,
913
918
"patternProperties" ,
914
- "^.{1,128 }$" ,
919
+ "^.{1,80 }$" ,
915
920
"allOf" ,
916
921
0 ,
917
922
"then" ,
@@ -926,6 +931,30 @@ def rule():
926
931
),
927
932
path = deque (["Definition" , "States" , "Choices2" , "Choices" , 0 ]),
928
933
),
934
+ ValidationError (
935
+ ("'Next' is a required property" ),
936
+ rule = StateMachineDefinition (),
937
+ validator = "required" ,
938
+ schema_path = deque (
939
+ [
940
+ "properties" ,
941
+ "States" ,
942
+ "patternProperties" ,
943
+ "^.{1,80}$" ,
944
+ "allOf" ,
945
+ 0 ,
946
+ "then" ,
947
+ "allOf" ,
948
+ 1 ,
949
+ "then" ,
950
+ "properties" ,
951
+ "Choices" ,
952
+ "items" ,
953
+ "required" ,
954
+ ]
955
+ ),
956
+ path = deque (["Definition" , "States" , "Choices2" , "Choices" , 1 ]),
957
+ ),
929
958
ValidationError (
930
959
("'Condition' is a required property" ),
931
960
rule = StateMachineDefinition (),
@@ -935,7 +964,7 @@ def rule():
935
964
"properties" ,
936
965
"States" ,
937
966
"patternProperties" ,
938
- "^.{1,128 }$" ,
967
+ "^.{1,80 }$" ,
939
968
"allOf" ,
940
969
0 ,
941
970
"then" ,
@@ -1067,7 +1096,7 @@ def rule():
1067
1096
"properties" ,
1068
1097
"States" ,
1069
1098
"patternProperties" ,
1070
- "^.{1,128 }$" ,
1099
+ "^.{1,80 }$" ,
1071
1100
"allOf" ,
1072
1101
5 ,
1073
1102
"then" ,
@@ -1093,7 +1122,7 @@ def rule():
1093
1122
"properties" ,
1094
1123
"States" ,
1095
1124
"patternProperties" ,
1096
- "^.{1,128 }$" ,
1125
+ "^.{1,80 }$" ,
1097
1126
"allOf" ,
1098
1127
5 ,
1099
1128
"then" ,
@@ -1118,7 +1147,7 @@ def rule():
1118
1147
"properties" ,
1119
1148
"States" ,
1120
1149
"patternProperties" ,
1121
- "^.{1,128 }$" ,
1150
+ "^.{1,80 }$" ,
1122
1151
"allOf" ,
1123
1152
5 ,
1124
1153
"then" ,
@@ -1141,7 +1170,7 @@ def rule():
1141
1170
"properties" ,
1142
1171
"States" ,
1143
1172
"patternProperties" ,
1144
- "^.{1,128 }$" ,
1173
+ "^.{1,80 }$" ,
1145
1174
"allOf" ,
1146
1175
0 ,
1147
1176
"then" ,
@@ -1164,7 +1193,7 @@ def rule():
1164
1193
"properties" ,
1165
1194
"States" ,
1166
1195
"patternProperties" ,
1167
- "^.{1,128 }$" ,
1196
+ "^.{1,80 }$" ,
1168
1197
"allOf" ,
1169
1198
0 ,
1170
1199
"then" ,
@@ -1191,7 +1220,7 @@ def rule():
1191
1220
"properties" ,
1192
1221
"States" ,
1193
1222
"patternProperties" ,
1194
- "^.{1,128 }$" ,
1223
+ "^.{1,80 }$" ,
1195
1224
"allOf" ,
1196
1225
5 ,
1197
1226
"then" ,
@@ -1217,10 +1246,4 @@ def test_validate(
1217
1246
validator ,
1218
1247
):
1219
1248
errs = list (rule .validate (validator , {}, instance , {}))
1220
- for i , err in enumerate (errs ):
1221
- print (i )
1222
- print (err .message , err .message == expected [i ].message )
1223
- print (err .path , err .path == expected [i ].path )
1224
- print (err .schema_path , err .schema_path == expected [i ].schema_path )
1225
- print (err .validator , err .validator == expected [i ].validator )
1226
1249
assert errs == expected , f"{ name !r} test failed with { errs !r} "
0 commit comments