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.
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?
I think you hit the parser limit . I Check a few possibilities but cannot find any escape characters to do what you need.
If : is required by framework, and is as a valid part of path I can suggest setting string with : in a variable, inside pre-req script and us it later as part of URL.