Skip to content

Get rid of ? in paths #960

Closed
Closed
@mjackson

Description

@mjackson

Using a ? in path definitions has limitations. For example, if you want to match a path that has an optional segment in it, you actually need two of them: one for the parameter name and another for the slash. So people end up using paths like /users/:userID?/?edit.

I'd like to suggest that instead of ? we use ( and ) to indicate that portions of a path are optional. This gives us the ability to indicate where the optional portion of a path begins and ends. So you can do /users(/:userID)/edit which, at least to me, is a little cleaner.

This may help us address #820

See also #929

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestUsed to close PRs that haven't gone through/been accepted the Proposal process yet

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions