Skip to content

Commit

Permalink
also handle permutation of types in JSON Schema validation
Browse files Browse the repository at this point in the history
  • Loading branch information
DocSavage committed Dec 15, 2023
1 parent 66c251c commit e3bb225
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion datatype/neuronjson/neuronjson.go
Original file line number Diff line number Diff line change
Expand Up @@ -1398,7 +1398,7 @@ func (d *Data) PutData(ctx *datastore.VersionedCtx, keyStr string, value []byte,
}
for err = sch.Validate(v); err != nil; {
if verr, ok := err.(*jsonschema.ValidationError); ok {
match, _ := regexp.MatchString(`.*expected integer.* but got string.*`, verr.Error())
match, _ := regexp.MatchString(`.*expected .*integer.* but got string.*`, verr.Error())
if !match {
return err
}
Expand Down

0 comments on commit e3bb225

Please sign in to comment.