khrt / Raisin

Raisin - a REST API micro framework for Perl 🐫 🐪
62 stars 31 forks source link

escaping colon in resource path #105

Open lmasarati opened 4 years ago

lmasarati commented 4 years ago

I need to emulate an API which employs colon (:) in resource paths and I cannot find howto handle them.

for example:

resource "stub/nso/restconf/operations/tailf-ncs:services/myService:serviceSync" => sub {...}
resource "stub/nso/restconf/operations/tailf-ncs:services/myService:serviceDelete" => sub {...}

The ":services", ":serviceSync" and ":serviceDelete" elements are not parameters but part of the path... the result is multiple match in routes:

WARN 2020-08-12T19:12:49.938 more then one route has been found: POST /stub/nso/restconf/operations/tailf-ncs:services/myService:serviceSync

I already tried escaping colons with "\" but doesn't work... Is there any documentation/examples about manually creating routes instead of using the "resource" API?