Skip to content

Commit 34f5cb8

Browse files
committed
Fix crash in parameter validation
kin-openapi crashes when validating against any schema which has a parameter described by the content property. For now, I've forked kin-openapi with a fix, so temporarily add a replace directive in go.mod to use my fork. We'll go back to the official kin-openapi once my PR gets merged.
1 parent f45b674 commit 34f5cb8

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

oapi_validate.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@ func OapiRequestValidator(swagger *openapi3.Swagger) echo.MiddlewareFunc {
5959

6060
// This function is called from the middleware above and actually does the work
6161
// of validating a request.
62-
// TODO(marcin): kin-openapi, which we use for swagger validation, currently only
63-
// validates string parameters, and assumes that the rest are valid. I need to
64-
// handle param validation myself, or fix their code.
6562
func ValidateRequestFromContext(ctx echo.Context, router *openapi3filter.Router) error {
6663
req := ctx.Request()
6764
route, pathParams, err := router.FindRoute(req.Method, req.URL)

0 commit comments

Comments
 (0)