Skip to content

Commit

Permalink
fix tests after merge train (#686)
Browse files Browse the repository at this point in the history
  • Loading branch information
fenollp committed Nov 29, 2022
1 parent c793660 commit 834a791
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion openapi3filter/issue641_test.go
Expand Up @@ -69,7 +69,7 @@ paths:
name: "failed allof pattern",
spec: allOfSpec,
req: `/items?test=999999`,
errStr: `parameter "test" in query has an error: string doesn't match the regular expression`,
errStr: `parameter "test" in query has an error: string "999999" doesn't match the regular expression "^[0-9]{1,4}$"`,
},
}

Expand Down
3 changes: 1 addition & 2 deletions openapi3filter/options_test.go
Expand Up @@ -41,8 +41,7 @@ paths:
panic(err)
}

err = doc.Validate(loader.Context)
if err != nil {
if err = doc.Validate(loader.Context); err != nil {
panic(err)
}

Expand Down
3 changes: 1 addition & 2 deletions openapi3filter/req_resp_decoder.go
Expand Up @@ -579,8 +579,7 @@ func (d *urlValuesDecoder) parseValue(v string, schema *openapi3.SchemaRef) (int
var value interface{}
var err error
for _, sr := range schema.Value.AnyOf {
value, err = d.parseValue(v, sr)
if err == nil {
if value, err = d.parseValue(v, sr); err == nil {
return value, nil
}
}
Expand Down

0 comments on commit 834a791

Please sign in to comment.