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
{{ message }}
Repository navigation
5.x - undocumented wildcard behaviour change in req.params #2090
The migration guide describes the changes in path matching - that wildcard parameters now must be named and that {} is required to make the path segment optional. What it does not described is that:
Wildcard parameters in req.params are always represented as arrays of decoded segments, not a single string.
(less important) Optional wildcard segment that is not matched does not exist in req.params, while in 4.x it was an empty string.
(not important) req.params object in 5.x has null prototype.
Expectations
Migration guide should mention different req.params behaviour with regard to wildcard parameters.
This probably can be combined with req.params documentation improvements requested in #1891.
Reacted by Efe Karasakal, shubham oulkar and Sebastian Beltran
Activity
docs: Document req.params changes in 5.x
docs: Document req.params changes in 5.x
docs(migrating-5): document req.params changes in 5.x