After swagger request validation , actual request is sent to api with ContentCachingRequestWrapper

Issue #144 closed
Former user created an issue

hi all,

we are validating with huge json file, so we are casting request to ContentCachingRequestWrapper . But after Request validation, empty request body is sent to actual rest end point, so actual api call failed with below exception. Please share some sample to use ContentCachingRequestWrapper.

Thanks in advance.

.m.m.a.ExceptionHandlerExceptionResolver : Resolved exception caused by Handler execution: org.springframework.http.converter.HttpMessageNotReadableException: Required request body is missing: public org.springframework.http.ResponseEntity<xxx.xyzResponse> xx.xx.xx.XYZResource.create(xx.xx.xx.XYZDto,org.springframework.validation.BindingResult)

Regards, Harinath.

Comments (2)

  1. Sven Döring

    In which order you declare the filters? Is there first the Swagger Request Validator Filter or is the wrapping filter for the ContentCachingRequestWrapper first?

  2. Log in to comment