In current implementation, oapi validation middleware validate all route/path of the server application including path/route that wasn't included in oapi spec file,
I have a case when my application is serving oapi request but also serve static files from a webroot (I'm using echo framework)
e := echo.New()
e.Static('/', "path_to_static_files_dir")
...
e.Use(OapiRequestValidator(swagger))
The middleware will reject request to static files such as http://host/index.html or http://host/javascript/any.js or http://host/image/any.png etc and send 400 error "Path was not found",
In my opinion those requests should not validated by the middleware, since was not oapi end-point. I knew we could use echo middleware Skipper, but it will be tedious job if we have many static files/folder in webroot directory.
My suggestion is if the middleware can not find a matching route from a request, it should letting the upstream application code to handle it.
Anyone agree with me ?