path param pattern is too weak,

 it can't handle properly /entities/{id:[a-z0-9-]{36}}

So let's count brackets to search for param definition end.