Skip to content

Missing documentation for wildcard parameters #1891

@jjspace

Description

@jjspace

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions