You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Set up a model where the http.path property is set to /.
Open Loopback Explorer (the Swagger UI).
See that the page fails to load.
Current Behavior
The addRoute subfunction in the RestAdapter.allRoutes method has a bug where it doesn't account for the case where the path of a route is just /, so when the trailing slash removal code runs, it makes the path empty instead of keeping it at /.
Previously, there was a bug in RestAdapter.allRoutes where the paths for
routes which were mounted at / would return as empty instead of the
expected / because of some trailing slash removal logic that was faulty.
This commit fixes this so that it accounts for cases where the path
itself is /, so the logic will leave those unchanged.
Fixesstrongloop#487
Steps to reproduce
http.path
property is set to/
.Current Behavior
The
addRoute
subfunction in theRestAdapter.allRoutes
method has a bug where it doesn't account for the case where thepath
of a route is just/
, so when the trailing slash removal code runs, it makes thepath
empty instead of keeping it at/
.Expected Behavior
If the
path
is/
, the trailing slash removal code should leave it unchanged.Additional information
The text was updated successfully, but these errors were encountered: