@@ -0,0 +1,1051 @@
+package pl.openrest.dto.webmvc;%0A%0Aimport javax.servlet.http.HttpServletRequest;%0Aimport javax.servlet.http.HttpServletResponse;%0A%0Aimport lombok.RequiredArgsConstructor;%0A%0Aimport org.springframework.web.servlet.handler.HandlerInterceptorAdapter;%0A%0Aimport pl.openrest.exception.OrestException;%0Aimport pl.openrest.exception.OrestExceptionDictionary;%0A%0A@RequiredArgsConstructor%0Apublic class NonDtoRequestsInterceptor extends HandlerInterceptorAdapter %7B%0A%0A    @Override%0A    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception %7B%0A        String method = request.getMethod();%0A        if (isPostOrPatchOrPutRequest(method) && !request.getParameterMap().containsKey(%22dto%22)) %7B%0A            throw new OrestException(OrestExceptionDictionary.NON_OREST_REQUEST, %22Request should cointain dto parameter%22);%0A        %7D%0A        return true;%0A    %7D%0A%0A    private static boolean isPostOrPatchOrPutRequest(String method) %7B%0A        return %22POST%22.equals(method) %7C%7C %22PATCH%22.equals(method) %7C%7C %22PUT%22.equals(method) ;%0A    %7D%0A%7D%0A

Create NonDtoRequestsInterceptor that rejects request without dto parameter