swagger-routes-express icon indicating copy to clipboard operation
swagger-routes-express copied to clipboard

Issue with basePath set to root or empty

Open andre-l-mm opened this issue 3 years ago • 1 comments

Hosting an api with basePath in swagger document not set or set to just a single slash ("/") does not seem to work.

With basePath set to "/", this library only listens to requests on a double slash ("//"). It seems it concatenates the basePath slash to the initial slash in resource paths. Requests with a single slash fail and return 404.

With basePath empty, I am not sure what routing pattern is being produced as I only get 404 responses.

Swagger ui in both cases ignores the basePath which seems a more reasonable behaviour.

andre-l-mm avatar Jan 14 '22 16:01 andre-l-mm

Hi @andre-l-mm sorry for taking such a long time to get back to you. I'll take a look at this and get back to you.

davesag avatar Jul 30 '22 07:07 davesag