Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix tests after merge train #686

Merged
merged 2 commits into from
Nov 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion openapi3filter/issue641_test.go
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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