-
Notifications
You must be signed in to change notification settings - Fork 29.5k
Description
Use case
I have a route where an object has multiple keys. There are more than one way to deal with it, but one of them is composing the key in the url, like ${key1}_${key2}.1
Currently, trying to implement this use case is not possible, because using path: '/resource/:key1_:key2' will parse it as two path parameters, key1_ and key2.
The documentation is not clear about the parsing details, simply stating that "to specify a path parameter, [you have to] prefix a path segment with a : character, followed by a unique name, for example, :userId".
Proposal
We should have a way to control this somehow, so that the aforementioned kind of URL is possible. One way of solving it is to allow passing a pathParser parameter that may be custom implemented to a GoRoute
Another way would be to have a way to delimit parameter identifiers in paths, for instance (straw man syntax), /resource/:{key1}_:key2.
There may be other possible approaches to this limitation.