Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
Signed-off-by: Pierre Fenoll <[email protected]>
  • Loading branch information
fenollp committed Aug 31, 2021
1 parent c253192 commit 840d080
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions openapi3/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -824,8 +824,7 @@ func (schema *Schema) visitSetOperations(settings *schemaValidationSettings, val
if v == nil {
return foundUnresolvedRef(ref.Ref)
}
err := v.visitJSON(settings, value)
if err == nil {
if err := v.visitJSON(settings, value); err == nil {
if settings.failfast {
return errSchema
}
Expand Down Expand Up @@ -865,8 +864,7 @@ func (schema *Schema) visitSetOperations(settings *schemaValidationSettings, val
continue
}

err := v.visitJSON(settings, value)
if err != nil {
if err := v.visitJSON(settings, value); err != nil {
validationErrors = append(validationErrors, err)
continue
}
Expand Down Expand Up @@ -910,8 +908,7 @@ func (schema *Schema) visitSetOperations(settings *schemaValidationSettings, val
if v == nil {
return foundUnresolvedRef(item.Ref)
}
err := v.visitJSON(settings, value)
if err == nil {
if err := v.visitJSON(settings, value); err == nil {
ok = true
break
}
Expand All @@ -933,8 +930,7 @@ func (schema *Schema) visitSetOperations(settings *schemaValidationSettings, val
if v == nil {
return foundUnresolvedRef(item.Ref)
}
err := v.visitJSON(settings, value)
if err != nil {
if err := v.visitJSON(settings, value); err != nil {
if settings.failfast {
return errSchema
}
Expand Down

0 comments on commit 840d080

Please sign in to comment.