Skip to content

Commit d72a8e3

Browse files
author
marcinromaszewicz
committed
Revert "improve gin support (#530)"
This reverts commit 11622c253dbc149092081d67437600a3ec73cad6. It caused a breaking change to existing users.
1 parent 701059a commit d72a8e3

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

oapi_validate.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@ func OapiRequestValidatorWithOptions(swagger *openapi3.T, options *Options) gin.
7272
err := ValidateRequestFromContext(c, router, options)
7373
if err != nil {
7474
// note: i am not sure if this is the best way to handle this
75-
// todo: the error message should be customizable by the user
76-
c.Error(err)
7775
c.AbortWithStatusJSON(http.StatusBadRequest, gin.H{"error": err.Error()})
7876
}
7977
c.Next()
@@ -126,9 +124,6 @@ func ValidateRequestFromContext(c *gin.Context, router routers.Router, options *
126124
errorLines := strings.Split(e.Error(), "\n")
127125
return fmt.Errorf("error in openapi3filter.RequestError: %s", errorLines[0])
128126
case *openapi3filter.SecurityRequirementsError:
129-
for _, e := range e.Errors {
130-
c.Error(e)
131-
}
132127
return fmt.Errorf("error in openapi3filter.SecurityRequirementsError: %s", e.Error())
133128
default:
134129
// This should never happen today, but if our upstream code changes,

0 commit comments

Comments
 (0)