Namespace is escaped
graup opened this issue · 8 comments
(Sorry, this should probably be in an issue and not a PR)
I just ran into the problem that the "namespace" part of the URL is escaped. This makes it impossible to use namespaces like api/v1/... with this.
I "fixed" the original test to demonstrate it is failing. #3
If you point me into the right direction I could also try and fix this.
A temporary fix is to use /{+namespace}
instead of {/namespace}
but that's not really optimal. I guess this is a limiation of uri-templates
(or for that matter, rfc6570).
@graup I think that {+namespace}
would be a fine way to deal with this. What isn't optimal about it?
And then just include the prefix slash in the namespace... I guess that works, yeah.
Should have thought more before posting. But maybe it will help someone else.
Thanks anyway :)
Nah, thanks for bringing it up. Do you think the library should default with {+namespace}
?
Well, currently the docs don't mention namespace
at all, so it would definitely be helpful to at least talk about it.
But yes, I think it would be better if {+namespace}
alongside {namespace: '/api'}
was the default example.
Sounds like a good plan. Care to make the changes?
Sure, I'll update the PR when I find the time! 😄
Thanks!