-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can "Handy-URI-Templates" expand URIs partially? #24
Comments
It took me a while to grok what you're saying, but what you are looking for is that rather than the expansion return an expanded URI, you want it to return a new template with the partial values filled in? |
It would be possible to add an expandPartial() method that would return another URITemplate instance. If that's what you're after, let me know. It'd be trivial to add. |
Hi thank your for taking for time on this (and sorry for the late response). I think you got the idea behind this kind of new "feature". My idea behind the expandPartial() method could be something like: Scenario #2 Scenario #3 |
+1 |
1 similar comment
+1 |
Thanks to Pull request #28 , we now have this feature. I have published a snapshot of 2.0.3 which contains this PR. If folks could test that and verify it's working as you've anticipated, I'll cut a release. At the moment, I'm planning in doing that tonight anyway. |
i'm a colleague of cnagel (#28) - he is out of office this week. |
Thanks! I'm trying to push out the release, but it seems the github pages maven plugin I'm using is having some issues. Once I get that sorted out, I'll release 2.0.3. |
Hi guys, first of all, I love "Handy-URI-Templates" library, works awesome. Now this not exactly an issue, is more a question about a feature.
I have this URI template:
http://localhost/my-app/employees{/employeeId}/reviews{?page,size}
I would like to provide the "employeeId" variable to the template BUT keep the {?page,size} section. Something like:
http://localhost/my-app/employees/999/reviews{?page,size}
I know the expand() method will hide unused variables in the template and also I know what I'm trying to do is probably not aligned with RFC 6570 but, is there a way to achieve this by using "Handy-URI-Templates"?
Thanks,
Martin.
The text was updated successfully, but these errors were encountered: