Skip to content

Commit

Permalink
fix: add Unwrap method to SecurityRequirementsError
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholas Jackson committed Feb 8, 2024
1 parent 55bc380 commit 16c404e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/docs/openapi3filter.txt
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,8 @@ type SecurityRequirementsError struct {

func (err *SecurityRequirementsError) Error() string

func (err SecurityRequirementsError) Unwrap() []error

type StatusCoder interface {
StatusCode() int
}
Expand Down
6 changes: 6 additions & 0 deletions openapi3filter/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,9 @@ func (err *SecurityRequirementsError) Error() string {

return buff.String()
}

var _ interface{ Unwrap() []error } = SecurityRequirementsError{}

func (err SecurityRequirementsError) Unwrap() []error {
return err.Errors
}

0 comments on commit 16c404e

Please sign in to comment.