Microsoft Visual Studio Team Services HTTP Client for Java
microsoft / vso-httpclient-java Goto Github PK
View Code? Open in Web Editor NEWMicrosoft Visual Studio Online HTTP Client for Java
License: MIT License
Microsoft Visual Studio Online HTTP Client for Java
License: MIT License
I need at least one issue open so PowerBI won't freak out.
According to the documentation, it should be possible to create a PR status without specifying an iterationId: https://www.visualstudio.com/en-us/docs/integrate/api/git/pull-requests/pullrequeststatuses
Pull request statuses can be posted on the overall pull request or on the specific pull request iteration.
It is said that you can pass the iterationId, not that you should
Note that you can specify iterationId in the request body to post the status on the iteration.
But if I try:
GitPullRequestStatus status = new GitPullRequestStatus();
GitStatusContext context = new GitStatusContext();
context.setGenre("Foo");
context.setName("Bar");
status.setContext(context);
status.setState(statusState);
status.setDescription(statusDescription);
status.setTargetUrl(targetUrl);
// Don't set iterationId on the status
gitHttpClient.createPullRequestStatus(status, gitRepo.getId(), pullRequest.getPullRequestId());
It fails with:
com.microsoft.alm.client.model.VssServiceException: The value 0 is outside of the allowed range.
Parameter name: iterationId
Actual value was 0.
at com.microsoft.alm.visualstudio.services.webapi.WrappedException.Unwrap(WrappedException.java:193)
at com.microsoft.alm.client.VssHttpClientBase.handleResponse(VssHttpClientBase.java:235)
at com.microsoft.alm.client.VssHttpClientBase.sendRequest(VssHttpClientBase.java:213)
at com.microsoft.alm.client.VssHttpClientBase.sendRequest(VssHttpClientBase.java:218)
at com.microsoft.alm.teamfoundation.sourcecontrol.webapi.GitHttpClientBase.createPullRequestStatus(GitHttpClientBase.java:11472)
I think the problem com from the fact that GitPullRequestStatus#iterationId should be an Integer and accept null values.
Any API returning a collection fail to be deserialized.
Can not deserialize instance of java.util.ArrayList out of START_OBJECT token
at [Source: org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream@7586beff; line: 1, column: 1]
This is because ApiResourceEntityProvider will unwrap collections when the target object is of type java.util.List, but generated code make use of ArrayList. And List != ArrayList.
I suggest to fix the generator to replace ArrayList by List (this is a good practice in Java to not expose implementation in APIs).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.