Group route does not work without leading slash #3100
sayeed1999
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I ran into an unexpected behavior with grouped routes.
Requesting:
returns:
Changing it to:
works as expected.
I would expect Echo to handle the missing leading
/when combining the group prefix and route path, or at least provide a warning during route registration.It would be nice if both forms resulted in
/v1/posts:Because it is very normal for a developer to not provide the slash since a group already means it's under that group (so slash should come automatically)
Otherwise its too confusing and something to forget easily when using the framework!!
I have raised it in an issue. See issue: #3099
All reactions