openapi-backend icon indicating copy to clipboard operation
openapi-backend copied to clipboard

Bug in Router.normalizePath

Open mmaksymovych opened this issue 3 years ago • 1 comments

Source of the issue - https://github.com/anttiviljami/openapi-backend/blob/a3503fb8162169b3784755457a27788e0d0b613a/src/router.ts#L244

Actual behavior Currently, URLs like http://resource.co/somePath and http://resource.co//somePath (with an extra slash after .co) are treated as the same URLs by the OpenApiBackend router.

Expected behavior Triggering URLs with an extra slash should throw 404 if they are not described by swagger spec.

mmaksymovych avatar Dec 08 '21 16:12 mmaksymovych

agreed, PRs accepted

anttiviljami avatar Dec 11 '21 15:12 anttiviljami