@@ -1011,6 +1011,82 @@ func TestValidateMainWorkflowFrontmatterWithSchema(t *testing.T) {
10111011 wantErr : true ,
10121012 errContains : "minItems" ,
10131013 },
1014+ {
1015+ name : "valid: workflow_dispatch with 25 inputs (max allowed)" ,
1016+ frontmatter : map [string ]any {
1017+ "on" : map [string ]any {
1018+ "workflow_dispatch" : map [string ]any {
1019+ "inputs" : map [string ]any {
1020+ "input1" : map [string ]any {"description" : "Input 1" , "type" : "string" },
1021+ "input2" : map [string ]any {"description" : "Input 2" , "type" : "string" },
1022+ "input3" : map [string ]any {"description" : "Input 3" , "type" : "string" },
1023+ "input4" : map [string ]any {"description" : "Input 4" , "type" : "string" },
1024+ "input5" : map [string ]any {"description" : "Input 5" , "type" : "string" },
1025+ "input6" : map [string ]any {"description" : "Input 6" , "type" : "string" },
1026+ "input7" : map [string ]any {"description" : "Input 7" , "type" : "string" },
1027+ "input8" : map [string ]any {"description" : "Input 8" , "type" : "string" },
1028+ "input9" : map [string ]any {"description" : "Input 9" , "type" : "string" },
1029+ "input10" : map [string ]any {"description" : "Input 10" , "type" : "string" },
1030+ "input11" : map [string ]any {"description" : "Input 11" , "type" : "string" },
1031+ "input12" : map [string ]any {"description" : "Input 12" , "type" : "string" },
1032+ "input13" : map [string ]any {"description" : "Input 13" , "type" : "string" },
1033+ "input14" : map [string ]any {"description" : "Input 14" , "type" : "string" },
1034+ "input15" : map [string ]any {"description" : "Input 15" , "type" : "string" },
1035+ "input16" : map [string ]any {"description" : "Input 16" , "type" : "string" },
1036+ "input17" : map [string ]any {"description" : "Input 17" , "type" : "string" },
1037+ "input18" : map [string ]any {"description" : "Input 18" , "type" : "string" },
1038+ "input19" : map [string ]any {"description" : "Input 19" , "type" : "string" },
1039+ "input20" : map [string ]any {"description" : "Input 20" , "type" : "string" },
1040+ "input21" : map [string ]any {"description" : "Input 21" , "type" : "string" },
1041+ "input22" : map [string ]any {"description" : "Input 22" , "type" : "string" },
1042+ "input23" : map [string ]any {"description" : "Input 23" , "type" : "string" },
1043+ "input24" : map [string ]any {"description" : "Input 24" , "type" : "string" },
1044+ "input25" : map [string ]any {"description" : "Input 25" , "type" : "string" },
1045+ },
1046+ },
1047+ },
1048+ },
1049+ wantErr : false ,
1050+ },
1051+ {
1052+ name : "invalid: workflow_dispatch with 26 inputs (exceeds max)" ,
1053+ frontmatter : map [string ]any {
1054+ "on" : map [string ]any {
1055+ "workflow_dispatch" : map [string ]any {
1056+ "inputs" : map [string ]any {
1057+ "input1" : map [string ]any {"description" : "Input 1" , "type" : "string" },
1058+ "input2" : map [string ]any {"description" : "Input 2" , "type" : "string" },
1059+ "input3" : map [string ]any {"description" : "Input 3" , "type" : "string" },
1060+ "input4" : map [string ]any {"description" : "Input 4" , "type" : "string" },
1061+ "input5" : map [string ]any {"description" : "Input 5" , "type" : "string" },
1062+ "input6" : map [string ]any {"description" : "Input 6" , "type" : "string" },
1063+ "input7" : map [string ]any {"description" : "Input 7" , "type" : "string" },
1064+ "input8" : map [string ]any {"description" : "Input 8" , "type" : "string" },
1065+ "input9" : map [string ]any {"description" : "Input 9" , "type" : "string" },
1066+ "input10" : map [string ]any {"description" : "Input 10" , "type" : "string" },
1067+ "input11" : map [string ]any {"description" : "Input 11" , "type" : "string" },
1068+ "input12" : map [string ]any {"description" : "Input 12" , "type" : "string" },
1069+ "input13" : map [string ]any {"description" : "Input 13" , "type" : "string" },
1070+ "input14" : map [string ]any {"description" : "Input 14" , "type" : "string" },
1071+ "input15" : map [string ]any {"description" : "Input 15" , "type" : "string" },
1072+ "input16" : map [string ]any {"description" : "Input 16" , "type" : "string" },
1073+ "input17" : map [string ]any {"description" : "Input 17" , "type" : "string" },
1074+ "input18" : map [string ]any {"description" : "Input 18" , "type" : "string" },
1075+ "input19" : map [string ]any {"description" : "Input 19" , "type" : "string" },
1076+ "input20" : map [string ]any {"description" : "Input 20" , "type" : "string" },
1077+ "input21" : map [string ]any {"description" : "Input 21" , "type" : "string" },
1078+ "input22" : map [string ]any {"description" : "Input 22" , "type" : "string" },
1079+ "input23" : map [string ]any {"description" : "Input 23" , "type" : "string" },
1080+ "input24" : map [string ]any {"description" : "Input 24" , "type" : "string" },
1081+ "input25" : map [string ]any {"description" : "Input 25" , "type" : "string" },
1082+ "input26" : map [string ]any {"description" : "Input 26" , "type" : "string" },
1083+ },
1084+ },
1085+ },
1086+ },
1087+ wantErr : true ,
1088+ errContains : "maxProperties" ,
1089+ },
10141090 }
10151091
10161092 for _ , tt := range tests {
@@ -1256,6 +1332,74 @@ func TestValidateIncludedFileFrontmatterWithSchema(t *testing.T) {
12561332 wantErr : true ,
12571333 errContains : "additional properties 'invalid_option' not allowed" ,
12581334 },
1335+ {
1336+ name : "valid: included file with 25 inputs (max allowed)" ,
1337+ frontmatter : map [string ]any {
1338+ "inputs" : map [string ]any {
1339+ "input1" : map [string ]any {"description" : "Input 1" , "type" : "string" },
1340+ "input2" : map [string ]any {"description" : "Input 2" , "type" : "string" },
1341+ "input3" : map [string ]any {"description" : "Input 3" , "type" : "string" },
1342+ "input4" : map [string ]any {"description" : "Input 4" , "type" : "string" },
1343+ "input5" : map [string ]any {"description" : "Input 5" , "type" : "string" },
1344+ "input6" : map [string ]any {"description" : "Input 6" , "type" : "string" },
1345+ "input7" : map [string ]any {"description" : "Input 7" , "type" : "string" },
1346+ "input8" : map [string ]any {"description" : "Input 8" , "type" : "string" },
1347+ "input9" : map [string ]any {"description" : "Input 9" , "type" : "string" },
1348+ "input10" : map [string ]any {"description" : "Input 10" , "type" : "string" },
1349+ "input11" : map [string ]any {"description" : "Input 11" , "type" : "string" },
1350+ "input12" : map [string ]any {"description" : "Input 12" , "type" : "string" },
1351+ "input13" : map [string ]any {"description" : "Input 13" , "type" : "string" },
1352+ "input14" : map [string ]any {"description" : "Input 14" , "type" : "string" },
1353+ "input15" : map [string ]any {"description" : "Input 15" , "type" : "string" },
1354+ "input16" : map [string ]any {"description" : "Input 16" , "type" : "string" },
1355+ "input17" : map [string ]any {"description" : "Input 17" , "type" : "string" },
1356+ "input18" : map [string ]any {"description" : "Input 18" , "type" : "string" },
1357+ "input19" : map [string ]any {"description" : "Input 19" , "type" : "string" },
1358+ "input20" : map [string ]any {"description" : "Input 20" , "type" : "string" },
1359+ "input21" : map [string ]any {"description" : "Input 21" , "type" : "string" },
1360+ "input22" : map [string ]any {"description" : "Input 22" , "type" : "string" },
1361+ "input23" : map [string ]any {"description" : "Input 23" , "type" : "string" },
1362+ "input24" : map [string ]any {"description" : "Input 24" , "type" : "string" },
1363+ "input25" : map [string ]any {"description" : "Input 25" , "type" : "string" },
1364+ },
1365+ },
1366+ wantErr : false ,
1367+ },
1368+ {
1369+ name : "invalid: included file with 26 inputs (exceeds max)" ,
1370+ frontmatter : map [string ]any {
1371+ "inputs" : map [string ]any {
1372+ "input1" : map [string ]any {"description" : "Input 1" , "type" : "string" },
1373+ "input2" : map [string ]any {"description" : "Input 2" , "type" : "string" },
1374+ "input3" : map [string ]any {"description" : "Input 3" , "type" : "string" },
1375+ "input4" : map [string ]any {"description" : "Input 4" , "type" : "string" },
1376+ "input5" : map [string ]any {"description" : "Input 5" , "type" : "string" },
1377+ "input6" : map [string ]any {"description" : "Input 6" , "type" : "string" },
1378+ "input7" : map [string ]any {"description" : "Input 7" , "type" : "string" },
1379+ "input8" : map [string ]any {"description" : "Input 8" , "type" : "string" },
1380+ "input9" : map [string ]any {"description" : "Input 9" , "type" : "string" },
1381+ "input10" : map [string ]any {"description" : "Input 10" , "type" : "string" },
1382+ "input11" : map [string ]any {"description" : "Input 11" , "type" : "string" },
1383+ "input12" : map [string ]any {"description" : "Input 12" , "type" : "string" },
1384+ "input13" : map [string ]any {"description" : "Input 13" , "type" : "string" },
1385+ "input14" : map [string ]any {"description" : "Input 14" , "type" : "string" },
1386+ "input15" : map [string ]any {"description" : "Input 15" , "type" : "string" },
1387+ "input16" : map [string ]any {"description" : "Input 16" , "type" : "string" },
1388+ "input17" : map [string ]any {"description" : "Input 17" , "type" : "string" },
1389+ "input18" : map [string ]any {"description" : "Input 18" , "type" : "string" },
1390+ "input19" : map [string ]any {"description" : "Input 19" , "type" : "string" },
1391+ "input20" : map [string ]any {"description" : "Input 20" , "type" : "string" },
1392+ "input21" : map [string ]any {"description" : "Input 21" , "type" : "string" },
1393+ "input22" : map [string ]any {"description" : "Input 22" , "type" : "string" },
1394+ "input23" : map [string ]any {"description" : "Input 23" , "type" : "string" },
1395+ "input24" : map [string ]any {"description" : "Input 24" , "type" : "string" },
1396+ "input25" : map [string ]any {"description" : "Input 25" , "type" : "string" },
1397+ "input26" : map [string ]any {"description" : "Input 26" , "type" : "string" },
1398+ },
1399+ },
1400+ wantErr : true ,
1401+ errContains : "maxProperties" ,
1402+ },
12591403 }
12601404
12611405 for _ , tt := range tests {
0 commit comments