You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The body is read by the ValidateRequestBody function.
After that function the body is read, and I can no longer read it. The value in openapi3filter/validate_request.go#L275 is actually never used because the defaultsSet is false.
I wouldn't expect the validator to read the full body in this case, as it is completely unnecessary.
Before I used the validator I had the route to "stream" the multipart body to avoid loading the whole file in RAM.
This makes no sense with a validator that reads the body anyway...
So two problems:
I didn't expect the validator to read the body in this route, as there is nothing to validate.
Is there a way to provide a NoOp BodyDecoder which just does nothing and leaves the body reader as it is?
Reading the body by the validator without "reseting" the reader afterwards makes it impossible to retrieve the file.
The text was updated successfully, but these errors were encountered:
with this route
The body is read by the ValidateRequestBody function.
After that function the body is read, and I can no longer read it. The value in openapi3filter/validate_request.go#L275 is actually never used because the
defaultsSet
is false.I wouldn't expect the validator to read the full body in this case, as it is completely unnecessary.
Before I used the validator I had the route to "stream" the multipart body to avoid loading the whole file in RAM.
This makes no sense with a validator that reads the body anyway...
So two problems:
Is there a way to provide a NoOp BodyDecoder which just does nothing and leaves the body reader as it is?
The text was updated successfully, but these errors were encountered: