-
Notifications
You must be signed in to change notification settings - Fork 28
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
Fix URI template expansion #173
Conversation
components/abstractions/src/test/java/com/microsoft/kiota/RequestInformationTest.java
Show resolved
Hide resolved
Thanks for the contribution. |
@@ -9,7 +9,7 @@ dependencies { | |||
// This dependency is used internally, and not exposed to consumers on their own compile classpath. | |||
implementation 'com.google.guava:guava:31.1-jre' | |||
implementation 'org.javatuples:javatuples:1.2' | |||
implementation 'com.github.hal4j:uritemplate:1.3.0' | |||
implementation 'com.damnhandy:handy-uri-templates:2.1.7' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
implementation 'com.damnhandy:handy-uri-templates:2.1.7' | |
implementation 'com.damnhandy:handy-uri-templates:2.1.8' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition, the latest version has multiple transitive vulnerabilities being reported.
If we take a dependency on it, we'll get a bunch of compliance issues on our end.
So unless we can get the maintainer to update their dependencies, I don't think we'll be able to merge this PR.
https://mvnrepository.com/artifact/com.damnhandy/handy-uri-templates/2.1.8
@baywet thanks a ton for looking into this.
The only "alternative" and self-contained library I found so far is this: Another option would be to directly maintain in this codebase a copy of: which will bring the needed capabilities without the maintenance issues. |
Copying code: I'm always warry of doing that, it introduced an informal fork, which is hard to keep in sync. Also depending on the license it might be "legally impossible", etc... hal4j:uritemplate: happy to move away from this one if it's not properly implemented and if the community behind it is not reactive enough to support bugfixes. vertx-uri-template: This one looks clean and active, and we could probably send a few PRs their way, e.g. a dependabot configuration. |
@baywet , argh, I've just pushed another proposal, let's discuss it:
I'm worried about depending on |
As another alternative, would Red Hat be open to stand-up a library and commit to maintaining it long term? |
This is possible too ... let me do a couple of checks. |
@baywet I checked again the possible alternatives:
I think that having a copy of one implementation in this repo is probably the least horrible alternative at this point, wdyt? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case the copy is probably the least bad solution.
@baywet happy to consider other alternatives, but, after having spent my day with this, I do believe that this is my preferred solution in between the alternatives 😅 . I have added a little infrastructure to ease the testing, made built-in support for If we decide to go ahead with this implementation, I need to ask if we can have a release after the merge. |
ok, let me fix the Android linting issues before calling it a day ... 😅 |
yep we can have a minor, and you can update the changelog and the properties to prepare for that if you want (otherwise I'll do it as a separate PR). |
actually the defect is now reported at a different place. |
should be good to go now, prepared the changelog, thanks for bearing with me! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making the changes
Thanks a ton for the quick release @baywet ! I can confirm that now it works as expected 🙂 |
Fix #165
I have attempted to fix it using the original
uritemplate
library, but I failed having more and more issues and bugs.I found this one: https://github.com/damnhandy/Handy-URI-Templates
The repo looks slightly better(more stars at least) and it passes the TCK.
The only "update" needed for this project is the usage of Java standard library
DateTime
s instead ofjoda