Path parameters delimiters?

Hello,

I have an edgy case with path parameters in url. Here is the kind of url we use in our API:
http://localhost/cars/42:doSomeNonRestThing

The ‘:’ character is used as a separator. Everything after it is used to name a custom method which does not follow REST principles.

The problem is with an URL like the one above in postman we end up with:
http://localhost/cars/:car_id:doSomeNonRestThing
where car_id is a path parameter.

I know this probably pushes the parser to its limit but does anybody have a solution to keep using path parameters with this kind of url ? I was thinking of delimiters like {car_id} which is something used in spring for example.

Thank you.

I too have a situation where delimiters for path parameters/variables are needed. I have a URL where the ID value is a compound value with two subfields separated by hyphens. But, if I type in :ClientID-:Environment in the URL, then the Path Variables section shows a single variable named “ClientID-:Environment”. Is there a way to do this?