Today the validation code in the openapi3filter package short circuits on the first error encountered. We have a use case where we would like to audit all fields that fail, and the reasons for which they failed. Opening this ticket in search of feedback and feasibility.
One way we might accomplish this is with a custom error type that tracks fields + reasons along with an option to enable this feature (similar to the fast flag, I'd imagine), e.g.
type MultiError struct {
Issues map[string][]error // could be "fast" error or *SchemaError
}
func (me *MultiError) Error() string { ... }
Today the validation code in the
openapi3filterpackage short circuits on the first error encountered. We have a use case where we would like to audit all fields that fail, and the reasons for which they failed. Opening this ticket in search of feedback and feasibility.One way we might accomplish this is with a custom error type that tracks fields + reasons along with an option to enable this feature (similar to the fast flag, I'd imagine), e.g.