Skip to content

Commit d305a84

Browse files
committed
fix: surface multi-errors in Origin in cases of oneOf schema errors
1 parent 90fb641 commit d305a84

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

openapi3/schema.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1377,7 +1377,7 @@ func (schema *Schema) visitXOFOperations(settings *schemaValidationSettings, val
13771377
e.Origin = ErrOneOfConflict
13781378
e.Reason = fmt.Sprintf(`value matches more than one schema from "oneOf" (matches schemas at indices %v)`, matchedOneOfIndices)
13791379
} else {
1380-
e.Origin = fmt.Errorf("doesn't match schema due to: %w", validationErrors)
1380+
e.Origin = validationErrors
13811381
e.Reason = `value doesn't match any schema from "oneOf"`
13821382
}
13831383

0 commit comments

Comments
 (0)