Skip to content

Commit 27b39b7

Browse files
Update http-client-java Node.js dependencies (#11656)
## Summary - update http-client-java to the latest TypeSpec and Azure TypeSpec dependencies - align peer dependencies and generator test overrides - regenerate Java test assets for updated http-specs packages ## Validation - `npm run build:emitter` - `npm test` - `mvn clean compile --no-transfer-progress` - `npm audit` (0 vulnerabilities) --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent b206183 commit 27b39b7

95 files changed

Lines changed: 8038 additions & 216 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
changeKind: internal
3+
packages:
4+
- "@typespec/http-client-java"
5+
---
6+
7+
Add end-to-end tests for newly generated Java clients
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
changeKind: dependencies
3+
packages:
4+
- "@typespec/http-client-java"
5+
---
6+
7+
Update Node.js dependencies and regenerate Java test assets

packages/http-client-java/generator/http-client-generator-clientcore-test/package.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,27 @@
1212
"spector-stop": "tsp-spector server stop"
1313
},
1414
"dependencies": {
15-
"@typespec/spector": "0.1.0-alpha.27",
16-
"@typespec/spec-api": "0.1.0-alpha.15",
17-
"@typespec/http-specs": "0.1.0-alpha.40",
18-
"@typespec/json-schema": "1.14.0",
15+
"@typespec/spector": "0.1.0-alpha.28",
16+
"@typespec/spec-api": "0.1.0-alpha.16",
17+
"@typespec/http-specs": "0.1.0-alpha.41",
18+
"@typespec/json-schema": "1.15.0",
1919
"@typespec/http-client-java": "file:../../typespec-http-client-java-0.9.0.tgz",
2020
"@typespec/http-client-java-tests": "file:"
2121
},
2222
"overrides": {
23-
"@typespec/compiler": "1.14.0",
24-
"@typespec/http": "1.14.0",
25-
"@typespec/rest": "0.84.0",
26-
"@typespec/versioning": "0.84.0",
27-
"@typespec/openapi": "1.14.0",
28-
"@typespec/xml": "0.84.0",
29-
"@typespec/events": "0.84.0",
30-
"@typespec/sse": "0.84.0",
31-
"@typespec/streams": "0.84.0",
32-
"@azure-tools/typespec-azure-core": "0.70.0",
33-
"@azure-tools/typespec-client-generator-core": "0.70.0",
34-
"@azure-tools/typespec-azure-resource-manager": "0.70.0",
35-
"@azure-tools/typespec-autorest": "0.70.0"
23+
"@typespec/compiler": "1.15.0",
24+
"@typespec/http": "1.15.0",
25+
"@typespec/rest": "0.85.0",
26+
"@typespec/versioning": "0.85.0",
27+
"@typespec/openapi": "1.15.0",
28+
"@typespec/xml": "0.85.0",
29+
"@typespec/events": "0.85.0",
30+
"@typespec/sse": "0.85.0",
31+
"@typespec/streams": "0.85.0",
32+
"@azure-tools/typespec-azure-core": "0.71.0",
33+
"@azure-tools/typespec-client-generator-core": "0.71.0",
34+
"@azure-tools/typespec-azure-resource-manager": "0.71.0",
35+
"@azure-tools/typespec-autorest": "0.71.0"
3636
},
3737
"private": true
3838
}

packages/http-client-java/generator/http-client-generator-test/package.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,27 @@
1212
"spector-stop": "tsp-spector server stop"
1313
},
1414
"dependencies": {
15-
"@typespec/spector": "0.1.0-alpha.27",
16-
"@typespec/spec-api": "0.1.0-alpha.15",
17-
"@typespec/http-specs": "0.1.0-alpha.40",
18-
"@azure-tools/azure-http-specs": "0.1.0-alpha.43",
15+
"@typespec/spector": "0.1.0-alpha.28",
16+
"@typespec/spec-api": "0.1.0-alpha.16",
17+
"@typespec/http-specs": "0.1.0-alpha.41",
18+
"@azure-tools/azure-http-specs": "0.1.0-alpha.44",
1919
"@typespec/http-client-java": "file:../../typespec-http-client-java-0.9.0.tgz",
2020
"@typespec/http-client-java-tests": "file:"
2121
},
2222
"overrides": {
23-
"@typespec/compiler": "1.14.0",
24-
"@typespec/http": "1.14.0",
25-
"@typespec/rest": "0.84.0",
26-
"@typespec/versioning": "0.84.0",
27-
"@typespec/openapi": "1.14.0",
28-
"@typespec/xml": "0.84.0",
29-
"@typespec/events": "0.84.0",
30-
"@typespec/sse": "0.84.0",
31-
"@typespec/streams": "0.84.0",
32-
"@azure-tools/typespec-azure-core": "0.70.0",
33-
"@azure-tools/typespec-client-generator-core": "0.70.0",
34-
"@azure-tools/typespec-azure-resource-manager": "0.70.0",
35-
"@azure-tools/typespec-autorest": "0.70.0"
23+
"@typespec/compiler": "1.15.0",
24+
"@typespec/http": "1.15.0",
25+
"@typespec/rest": "0.85.0",
26+
"@typespec/versioning": "0.85.0",
27+
"@typespec/openapi": "1.15.0",
28+
"@typespec/xml": "0.85.0",
29+
"@typespec/events": "0.85.0",
30+
"@typespec/sse": "0.85.0",
31+
"@typespec/streams": "0.85.0",
32+
"@azure-tools/typespec-azure-core": "0.71.0",
33+
"@azure-tools/typespec-client-generator-core": "0.71.0",
34+
"@azure-tools/typespec-azure-resource-manager": "0.71.0",
35+
"@azure-tools/typespec-autorest": "0.71.0"
3636
},
3737
"private": true
3838
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
// Code generated by Microsoft (R) TypeSpec Code Generator.
4+
5+
package azure.clientgenerator.core.apiversion.clientapiversions;
6+
7+
import azure.clientgenerator.core.apiversion.clientapiversions.implementation.ClientApiVersionsClientImpl;
8+
import com.azure.core.annotation.Generated;
9+
import com.azure.core.annotation.ReturnType;
10+
import com.azure.core.annotation.ServiceClient;
11+
import com.azure.core.annotation.ServiceMethod;
12+
import com.azure.core.exception.ClientAuthenticationException;
13+
import com.azure.core.exception.HttpResponseException;
14+
import com.azure.core.exception.ResourceModifiedException;
15+
import com.azure.core.exception.ResourceNotFoundException;
16+
import com.azure.core.http.rest.RequestOptions;
17+
import com.azure.core.http.rest.Response;
18+
import com.azure.core.util.FluxUtil;
19+
import reactor.core.publisher.Mono;
20+
21+
/**
22+
* Initializes a new instance of the asynchronous ClientApiVersionsClient type.
23+
*/
24+
@ServiceClient(builder = ClientApiVersionsClientBuilder.class, isAsync = true)
25+
public final class ClientApiVersionsAsyncClient {
26+
@Generated
27+
private final ClientApiVersionsClientImpl serviceClient;
28+
29+
/**
30+
* Initializes an instance of ClientApiVersionsAsyncClient class.
31+
*
32+
* @param serviceClient the service client implementation.
33+
*/
34+
@Generated
35+
ClientApiVersionsAsyncClient(ClientApiVersionsClientImpl serviceClient) {
36+
this.serviceClient = serviceClient;
37+
}
38+
39+
/**
40+
* Test api version parameter from clientApiVersions.
41+
*
42+
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
43+
* @throws HttpResponseException thrown if the request is rejected by server.
44+
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
45+
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
46+
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
47+
* @return the {@link Response} on successful completion of {@link Mono}.
48+
*/
49+
@Generated
50+
@ServiceMethod(returns = ReturnType.SINGLE)
51+
public Mono<Response<Void>> sendApiVersionWithResponse(RequestOptions requestOptions) {
52+
return this.serviceClient.sendApiVersionWithResponseAsync(requestOptions);
53+
}
54+
55+
/**
56+
* Test api version parameter from clientApiVersions.
57+
*
58+
* @throws HttpResponseException thrown if the request is rejected by server.
59+
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
60+
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
61+
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
62+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
63+
* @return A {@link Mono} that completes when a successful response is received.
64+
*/
65+
@Generated
66+
@ServiceMethod(returns = ReturnType.SINGLE)
67+
public Mono<Void> sendApiVersion() {
68+
// Generated convenience method for sendApiVersionWithResponse
69+
RequestOptions requestOptions = new RequestOptions();
70+
return sendApiVersionWithResponse(requestOptions).flatMap(FluxUtil::toMono);
71+
}
72+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
// Code generated by Microsoft (R) TypeSpec Code Generator.
4+
5+
package azure.clientgenerator.core.apiversion.clientapiversions;
6+
7+
import azure.clientgenerator.core.apiversion.clientapiversions.implementation.ClientApiVersionsClientImpl;
8+
import com.azure.core.annotation.Generated;
9+
import com.azure.core.annotation.ReturnType;
10+
import com.azure.core.annotation.ServiceClient;
11+
import com.azure.core.annotation.ServiceMethod;
12+
import com.azure.core.exception.ClientAuthenticationException;
13+
import com.azure.core.exception.HttpResponseException;
14+
import com.azure.core.exception.ResourceModifiedException;
15+
import com.azure.core.exception.ResourceNotFoundException;
16+
import com.azure.core.http.rest.RequestOptions;
17+
import com.azure.core.http.rest.Response;
18+
19+
/**
20+
* Initializes a new instance of the synchronous ClientApiVersionsClient type.
21+
*/
22+
@ServiceClient(builder = ClientApiVersionsClientBuilder.class)
23+
public final class ClientApiVersionsClient {
24+
@Generated
25+
private final ClientApiVersionsClientImpl serviceClient;
26+
27+
/**
28+
* Initializes an instance of ClientApiVersionsClient class.
29+
*
30+
* @param serviceClient the service client implementation.
31+
*/
32+
@Generated
33+
ClientApiVersionsClient(ClientApiVersionsClientImpl serviceClient) {
34+
this.serviceClient = serviceClient;
35+
}
36+
37+
/**
38+
* Test api version parameter from clientApiVersions.
39+
*
40+
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
41+
* @throws HttpResponseException thrown if the request is rejected by server.
42+
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
43+
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
44+
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
45+
* @return the {@link Response}.
46+
*/
47+
@Generated
48+
@ServiceMethod(returns = ReturnType.SINGLE)
49+
public Response<Void> sendApiVersionWithResponse(RequestOptions requestOptions) {
50+
return this.serviceClient.sendApiVersionWithResponse(requestOptions);
51+
}
52+
53+
/**
54+
* Test api version parameter from clientApiVersions.
55+
*
56+
* @throws HttpResponseException thrown if the request is rejected by server.
57+
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
58+
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
59+
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
60+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
61+
*/
62+
@Generated
63+
@ServiceMethod(returns = ReturnType.SINGLE)
64+
public void sendApiVersion() {
65+
// Generated convenience method for sendApiVersionWithResponse
66+
RequestOptions requestOptions = new RequestOptions();
67+
sendApiVersionWithResponse(requestOptions).getValue();
68+
}
69+
}

0 commit comments

Comments
 (0)