springmvc - Fails to Validate Request Unless Request Wrapper is Specific Type
Issue #402
new
In using Spring Boot, there are many types of filters that can wrap requests. For example, as part of Spring HATEOAS, it has a filter for dealing with X-Forwarded-*
headers that has its own wrapper:
When this is in place, validation does not happen because in OpenApiValidationInterceptor
:
(servletRequest instanceof ContentCachingRequestWrapper || servletRequest instanceof ResettableRequestServletWrapper)
This should not prevent validation from executing.
Comments (3)
-
reporter -
reporter It would probably be a good idea to add this to the documentation.
-
That is the correct way to solve this issue. And yes, it would fit good into the documentation.
- Log in to comment
I was able to get around the issue by using
@Order
: