Skip to content

Missing documentation for wildcard parameters #1891

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jjspace opened this issue May 1, 2025 · 0 comments
Open

Missing documentation for wildcard parameters #1891

jjspace opened this issue May 1, 2025 · 0 comments

Comments

@jjspace
Copy link

jjspace commented May 1, 2025

Description

I am unable to find any documentation indicating how wildcard parameters work in v5. The only mention I've been able to find is in the v5 Migration guide which states:

The wildcard * must have a name, matching the behavior of parameters :, use /splat instead of /

The Routing docs do not explain how this syntax works. The closest it says there is that "the characters ?, +, *, [], and () are handled differently than in version 4, please review the migration guide for more information." which only states what I put above.

The section dedicated to Route Parameters on the same page also does not explain that you can swap out the : with * to consume more of the path.

The req.params section of the docs also doesn't indicate that you even can use * params. It also does not indicate that these params will be an array of strings that were split on /

Expectations

The path syntax documentation and any docs about routing and handling route parameters should indicate that wildcard parameters are an option and explain how they work and how someone should be using them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant