damnhandy / Handy-URI-Templates

A Java URI Template processor implementing RFC6570

Home Page:https://damnhandy.github.io/Handy-URI-Templates/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What is the replacement for UriTemplateResolver?

deepakprabhakara opened this issue · comments

I am updating from v2.0.0 and UriTemplateResolver seems to have gone but can't see any docs related to it. What is the replacement?

Thanks.
Deepak.

@deepakprabhakara are you sure that you're referring to a v2.0.0 build and not a development branch? Looking at the v2.0.0, the class you are referring to is not in there. Could you be more specific?

Yes, it could be a development build. I unfortunately only have the jar file named v2.0.0 with no further info. But it contains the UriTemplateResolver class which could be used for reverse matching templates. There seems to have been a cleanup in the newer versions but I can't seem to find how to do the reverse matching in the new version.

And is used this way:-

            UriTemplateResolver resolver = new UriTemplateResolver();
            resolver.addUriTemplate(uriTemplate);
            match = resolver.match(uriInput);

Could this have been a SNAPSHOT build or something someone else built internally? I'm fairly certain that I never released this class in any formal release. Furthermore, I likely didn't not work as I never completed the implementation. Thus, the reason why I pulled it out.

Quite likely it's not from any formal release. That is why I was trying to update it. Is the reverse matching still in progress? It doesn seem to work quite well though. 👍