File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ [
2+ {
3+ "description" : " check index in error" ,
4+ "schema" : {
5+ "$schema" : " https://json-schema.org/draft/2020-12/schema" ,
6+ "prefixItems" : [
7+ { "type" : " string" },
8+ { "type" : " string" }
9+ ],
10+ "items" : {
11+ "type" : " boolean"
12+ }
13+ },
14+ "tests" : [
15+ {
16+ "description" : " with fraction" ,
17+ "data" : [ " a" , " b" , " c" ],
18+ "valid" : false ,
19+ "errors" : [
20+ " at '/2' [S#/items/type]: got string, want boolean"
21+ ]
22+ }
23+ ]
24+ }
25+ ]
Original file line number Diff line number Diff line change @@ -390,7 +390,7 @@ func (vd *validator) arrValidate(arr []any) {
390390 // items2020 --
391391 if s .Items2020 != nil {
392392 for i , item := range arr [evaluated :] {
393- vd .addErr (vd .validateVal (s .Items2020 , item , strconv .Itoa (i )))
393+ vd .addErr (vd .validateVal (s .Items2020 , item , strconv .Itoa (evaluated + i )))
394394 }
395395 }
396396 }
You can’t perform that action at this time.
0 commit comments