Skip to content

Commit b46ef72

Browse files
eng, sync core on api-version doc (#3096)
1 parent 0c144e2 commit b46ef72

File tree

31 files changed

+2873
-495
lines changed

31 files changed

+2873
-495
lines changed

core

Submodule core updated 223 files

fluentgen/src/test/java/com/microsoft/typespec/http/client/generator/mgmt/FluentGenAccessor.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public FluentJavaPackage handleTemplate(Client client) {
3030
}
3131

3232
public FluentClient handleFluentLite(CodeModel codeModel, Client client, FluentJavaPackage javaPackage) {
33-
return fluentgen.handleFluentLite(codeModel, client, javaPackage);
33+
return fluentgen.handleFluentLite(codeModel, client, javaPackage, null);
3434
}
3535

3636
public FluentMapper getFluentMapper() {

fluentgen/src/test/java/com/microsoft/typespec/http/client/generator/mgmt/model/projectmodel/ChangelogTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class ChangelogTests {
1515
private static class MockProject extends FluentProject {
1616

1717
public MockProject() {
18-
super("Resource", null);
18+
super("Resource", null, null);
1919
}
2020

2121
@Override

fluentgen/src/test/java/com/microsoft/typespec/http/client/generator/mgmt/model/projectmodel/ProjectTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public void testFluentProject() {
2828
TestUtils.ContentLocks content = TestUtils.initContentLocks(fluentgenAccessor);
2929
FluentClient fluentClient = content.getFluentClient();
3030

31-
FluentProject project = new FluentProject(fluentClient);
31+
FluentProject project = new FluentProject(fluentClient, null);
3232
Assertions.assertEquals("com.azure.resourcemanager", project.getGroupId());
3333
Assertions.assertEquals("azure-resourcemanager-mock", project.getArtifactId());
3434
Assertions.assertNotNull(project.getChangelog());

typespec-extension/changelog.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Release History
22

3+
## 0.29.3 (2025-04-23)
4+
5+
Compatible with compiler 1.0.0-rc.1.
6+
37
## 0.29.2 (2025-04-22)
48

59
Compatible with compiler 1.0.0-rc.0.

typespec-extension/package-lock.json

+476-440
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

typespec-extension/package.json

+31-31
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@azure-tools/typespec-java",
3-
"version": "0.29.2",
3+
"version": "0.29.3",
44
"description": "TypeSpec library for emitting Java client from the TypeSpec REST protocol binding",
55
"keywords": [
66
"TypeSpec"
@@ -45,59 +45,59 @@
4545
"generator/http-client-generator/target/emitter.jar"
4646
],
4747
"peerDependencies": {
48-
"@azure-tools/typespec-autorest": ">=0.54.0 <1.0.0",
49-
"@azure-tools/typespec-azure-core": ">=0.54.0 <1.0.0",
50-
"@azure-tools/typespec-azure-resource-manager": ">=0.54.0 <1.0.0",
51-
"@azure-tools/typespec-azure-rulesets": ">=0.54.0 <1.0.0",
52-
"@azure-tools/typespec-client-generator-core": ">=0.54.0 <1.0.0",
48+
"@azure-tools/typespec-autorest": ">=0.55.0 <1.0.0",
49+
"@azure-tools/typespec-azure-core": ">=0.55.0 <1.0.0",
50+
"@azure-tools/typespec-azure-resource-manager": ">=0.55.0 <1.0.0",
51+
"@azure-tools/typespec-azure-rulesets": ">=0.55.0 <1.0.0",
52+
"@azure-tools/typespec-client-generator-core": ">=0.55.0 <1.0.0",
5353
"@azure-tools/typespec-liftr-base": ">=0.8.0 <1.0.0",
5454
"@typespec/compiler": "^1.0.0-0",
5555
"@typespec/http": "^1.0.0-0",
5656
"@typespec/openapi": "^1.0.0-0",
57-
"@typespec/rest": ">=0.68.0 <1.0.0",
58-
"@typespec/versioning": ">=0.68.0 <1.0.0",
59-
"@typespec/xml": ">=0.68.0 <1.0.0"
57+
"@typespec/rest": ">=0.69.0 <1.0.0",
58+
"@typespec/versioning": ">=0.69.0 <1.0.0",
59+
"@typespec/xml": ">=0.69.0 <1.0.0"
6060
},
6161
"dependencies": {
6262
"@autorest/codemodel": "~4.20.0",
6363
"js-yaml": "~4.1.0",
6464
"lodash": "~4.17.21"
6565
},
6666
"devDependencies": {
67-
"@azure-tools/typespec-autorest": "0.54.0",
68-
"@azure-tools/typespec-azure-core": "0.54.0",
69-
"@azure-tools/typespec-azure-resource-manager": "0.54.0",
70-
"@azure-tools/typespec-azure-rulesets": "0.54.0",
71-
"@azure-tools/typespec-client-generator-core": "0.54.2",
67+
"@azure-tools/typespec-autorest": "0.55.0",
68+
"@azure-tools/typespec-azure-core": "0.55.0",
69+
"@azure-tools/typespec-azure-resource-manager": "0.55.0",
70+
"@azure-tools/typespec-azure-rulesets": "0.55.0",
71+
"@azure-tools/typespec-client-generator-core": "0.55.0",
7272
"@azure-tools/typespec-liftr-base": "0.8.0",
7373
"@types/js-yaml": "~4.0.9",
7474
"@types/lodash": "~4.17.16",
7575
"@types/node": "~22.14.1",
76-
"@typescript-eslint/eslint-plugin": "~8.30.1",
77-
"@typescript-eslint/parser": "~8.30.1",
78-
"@typespec/compiler": "1.0.0-rc.0",
79-
"@typespec/http": "1.0.0-rc.0",
80-
"@typespec/openapi": "1.0.0-rc.0",
81-
"@typespec/rest": "0.68.0",
82-
"@typespec/versioning": "0.68.0",
83-
"@typespec/xml": "0.68.0",
84-
"@typespec/events": "0.68.0",
85-
"@typespec/sse": "0.68.0",
86-
"@typespec/streams": "0.68.0",
87-
"@vitest/coverage-v8": "^3.1.1",
88-
"@vitest/ui": "^3.1.1",
76+
"@typescript-eslint/eslint-plugin": "~8.31.0",
77+
"@typescript-eslint/parser": "~8.31.0",
78+
"@typespec/compiler": "1.0.0-rc.1",
79+
"@typespec/http": "1.0.0-rc.1",
80+
"@typespec/openapi": "1.0.0-rc.1",
81+
"@typespec/rest": "0.69.0",
82+
"@typespec/versioning": "0.69.0",
83+
"@typespec/xml": "0.69.0",
84+
"@typespec/events": "0.69.0",
85+
"@typespec/sse": "0.69.0",
86+
"@typespec/streams": "0.69.0",
87+
"@vitest/coverage-v8": "^3.1.2",
88+
"@vitest/ui": "^3.1.2",
8989
"c8": "~10.1.3",
90-
"eslint": "~9.25.0",
90+
"eslint": "~9.25.1",
9191
"eslint-plugin-deprecation": "~3.0.0",
9292
"eslint-plugin-import": "^2.31.0",
9393
"eslint-plugin-unicorn": "^58.0.0",
9494
"prettier": "~3.5.3",
9595
"rimraf": "~6.0.1",
9696
"typescript": "~5.8.3",
97-
"typescript-eslint": "^8.30.1",
98-
"vitest": "^3.1.1"
97+
"typescript-eslint": "^8.31.0",
98+
"vitest": "^3.1.2"
9999
},
100100
"overrides": {
101-
"eslint": "~9.25.0"
101+
"eslint": "~9.25.1"
102102
}
103103
}

typespec-tests/Generate.ps1

+2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ $generateScript = {
3838
} elseif ($tspFile -match "azure[\\/]example[\\/]basic[\\/]") {
3939
# override examples-directory
4040
$tspOptions += " --option ""@azure-tools/typespec-java.examples-dir={project-root}/specs/azure/example/basic/examples"""
41+
} elseif ($tspFile -match "azure[\\/]client-generator-core[\\/]client-initialization[\\/]") {
42+
$tspOptions += " --option ""@azure-tools/typespec-java.enable-subclient=true"""
4143
} elseif ($tspFile -match "resiliency[\\/]srv-driven[\\/]old\.tsp") {
4244
# override namespace for "resiliency/srv-driven/old.tsp" (make it different to that from "main.tsp")
4345
$tspOptions += " --option ""@azure-tools/typespec-java.namespace=resiliency.servicedriven.v1"""

typespec-tests/package.json

+19-19
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,29 @@
1111
"dependencies": {
1212
"@typespec/spec-api": "0.1.0-alpha.4",
1313
"@typespec/spector": "0.1.0-alpha.12",
14-
"@typespec/http-specs": "0.1.0-alpha.19",
15-
"@azure-tools/azure-http-specs": "0.1.0-alpha.14",
16-
"@azure-tools/typespec-java": "file:/../typespec-extension/azure-tools-typespec-java-0.29.2.tgz"
14+
"@typespec/http-specs": "0.1.0-alpha.20",
15+
"@azure-tools/azure-http-specs": "0.1.0-alpha.15",
16+
"@azure-tools/typespec-java": "file:/../typespec-extension/azure-tools-typespec-java-0.29.3.tgz"
1717
},
1818
"devDependencies": {
19-
"@typespec/prettier-plugin-typespec": "~0.68.0",
20-
"prettier-plugin-organize-imports": "4.1.0",
21-
"prettier": "~3.5.3"
19+
"@typespec/prettier-plugin-typespec": "^1.0.0-rc.1",
20+
"prettier-plugin-organize-imports": "^4.1.0",
21+
"prettier": "^3.5.3"
2222
},
2323
"overrides": {
24-
"@typespec/compiler": "^1.0.0-0",
25-
"@typespec/http": "^1.0.0-0",
26-
"@typespec/rest": "~0.68.0",
27-
"@typespec/versioning": "~0.68.0",
28-
"@typespec/openapi": "^1.0.0-0",
29-
"@typespec/xml": "~0.68.0",
30-
"@typespec/events": "~0.68.0",
31-
"@typespec/sse": "~0.68.0",
32-
"@typespec/streams": "~0.68.0",
33-
"@azure-tools/typespec-azure-core": "~0.54.0",
34-
"@azure-tools/typespec-client-generator-core": "~0.54.2",
35-
"@azure-tools/typespec-azure-resource-manager": "~0.54.0",
36-
"@azure-tools/typespec-autorest": "~0.54.0"
24+
"@typespec/compiler": "^1.0.0-rc.1",
25+
"@typespec/http": "^1.0.0-rc.1",
26+
"@typespec/rest": "~0.69.0",
27+
"@typespec/versioning": "~0.69.0",
28+
"@typespec/openapi": "^1.0.0-rc.1",
29+
"@typespec/xml": "~0.69.0",
30+
"@typespec/events": "~0.69.0",
31+
"@typespec/sse": "~0.69.0",
32+
"@typespec/streams": "~0.69.0",
33+
"@azure-tools/typespec-azure-core": "~0.55.0",
34+
"@azure-tools/typespec-client-generator-core": "~0.55.0",
35+
"@azure-tools/typespec-azure-resource-manager": "~0.55.0",
36+
"@azure-tools/typespec-autorest": "~0.55.0"
3737
},
3838
"private": true
3939
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
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 _specs_.azure.clientgenerator.core.deserializeemptystringasnull;
6+
7+
import _specs_.azure.clientgenerator.core.deserializeemptystringasnull.implementation.DeserializeEmptyStringAsNullClientImpl;
8+
import _specs_.azure.clientgenerator.core.deserializeemptystringasnull.models.ResponseModel;
9+
import com.azure.core.annotation.Generated;
10+
import com.azure.core.annotation.ReturnType;
11+
import com.azure.core.annotation.ServiceClient;
12+
import com.azure.core.annotation.ServiceMethod;
13+
import com.azure.core.exception.ClientAuthenticationException;
14+
import com.azure.core.exception.HttpResponseException;
15+
import com.azure.core.exception.ResourceModifiedException;
16+
import com.azure.core.exception.ResourceNotFoundException;
17+
import com.azure.core.http.rest.RequestOptions;
18+
import com.azure.core.http.rest.Response;
19+
import com.azure.core.util.BinaryData;
20+
import com.azure.core.util.FluxUtil;
21+
import reactor.core.publisher.Mono;
22+
23+
/**
24+
* Initializes a new instance of the asynchronous DeserializeEmptyStringAsNullClient type.
25+
*/
26+
@ServiceClient(builder = DeserializeEmptyStringAsNullClientBuilder.class, isAsync = true)
27+
public final class DeserializeEmptyStringAsNullAsyncClient {
28+
@Generated
29+
private final DeserializeEmptyStringAsNullClientImpl serviceClient;
30+
31+
/**
32+
* Initializes an instance of DeserializeEmptyStringAsNullAsyncClient class.
33+
*
34+
* @param serviceClient the service client implementation.
35+
*/
36+
@Generated
37+
DeserializeEmptyStringAsNullAsyncClient(DeserializeEmptyStringAsNullClientImpl serviceClient) {
38+
this.serviceClient = serviceClient;
39+
}
40+
41+
/**
42+
* The get operation.
43+
* <p><strong>Response Body Schema</strong></p>
44+
*
45+
* <pre>
46+
* {@code
47+
* {
48+
* sampleUrl: String (Required)
49+
* }
50+
* }
51+
* </pre>
52+
*
53+
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
54+
* @throws HttpResponseException thrown if the request is rejected by server.
55+
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
56+
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
57+
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
58+
* @return this is a Model contains a string-like property of type url along with {@link Response} on successful
59+
* completion of {@link Mono}.
60+
*/
61+
@Generated
62+
@ServiceMethod(returns = ReturnType.SINGLE)
63+
public Mono<Response<BinaryData>> getWithResponse(RequestOptions requestOptions) {
64+
return this.serviceClient.getWithResponseAsync(requestOptions);
65+
}
66+
67+
/**
68+
* The get operation.
69+
*
70+
* @throws HttpResponseException thrown if the request is rejected by server.
71+
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
72+
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
73+
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
74+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
75+
* @return this is a Model contains a string-like property of type url on successful completion of {@link Mono}.
76+
*/
77+
@Generated
78+
@ServiceMethod(returns = ReturnType.SINGLE)
79+
public Mono<ResponseModel> get() {
80+
// Generated convenience method for getWithResponse
81+
RequestOptions requestOptions = new RequestOptions();
82+
return getWithResponse(requestOptions).flatMap(FluxUtil::toMono)
83+
.map(protocolMethodData -> protocolMethodData.toObject(ResponseModel.class));
84+
}
85+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
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 _specs_.azure.clientgenerator.core.deserializeemptystringasnull;
6+
7+
import _specs_.azure.clientgenerator.core.deserializeemptystringasnull.implementation.DeserializeEmptyStringAsNullClientImpl;
8+
import _specs_.azure.clientgenerator.core.deserializeemptystringasnull.models.ResponseModel;
9+
import com.azure.core.annotation.Generated;
10+
import com.azure.core.annotation.ReturnType;
11+
import com.azure.core.annotation.ServiceClient;
12+
import com.azure.core.annotation.ServiceMethod;
13+
import com.azure.core.exception.ClientAuthenticationException;
14+
import com.azure.core.exception.HttpResponseException;
15+
import com.azure.core.exception.ResourceModifiedException;
16+
import com.azure.core.exception.ResourceNotFoundException;
17+
import com.azure.core.http.rest.RequestOptions;
18+
import com.azure.core.http.rest.Response;
19+
import com.azure.core.util.BinaryData;
20+
21+
/**
22+
* Initializes a new instance of the synchronous DeserializeEmptyStringAsNullClient type.
23+
*/
24+
@ServiceClient(builder = DeserializeEmptyStringAsNullClientBuilder.class)
25+
public final class DeserializeEmptyStringAsNullClient {
26+
@Generated
27+
private final DeserializeEmptyStringAsNullClientImpl serviceClient;
28+
29+
/**
30+
* Initializes an instance of DeserializeEmptyStringAsNullClient class.
31+
*
32+
* @param serviceClient the service client implementation.
33+
*/
34+
@Generated
35+
DeserializeEmptyStringAsNullClient(DeserializeEmptyStringAsNullClientImpl serviceClient) {
36+
this.serviceClient = serviceClient;
37+
}
38+
39+
/**
40+
* The get operation.
41+
* <p><strong>Response Body Schema</strong></p>
42+
*
43+
* <pre>
44+
* {@code
45+
* {
46+
* sampleUrl: String (Required)
47+
* }
48+
* }
49+
* </pre>
50+
*
51+
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
52+
* @throws HttpResponseException thrown if the request is rejected by server.
53+
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
54+
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
55+
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
56+
* @return this is a Model contains a string-like property of type url along with {@link Response}.
57+
*/
58+
@Generated
59+
@ServiceMethod(returns = ReturnType.SINGLE)
60+
public Response<BinaryData> getWithResponse(RequestOptions requestOptions) {
61+
return this.serviceClient.getWithResponse(requestOptions);
62+
}
63+
64+
/**
65+
* The get operation.
66+
*
67+
* @throws HttpResponseException thrown if the request is rejected by server.
68+
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
69+
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
70+
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
71+
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
72+
* @return this is a Model contains a string-like property of type url.
73+
*/
74+
@Generated
75+
@ServiceMethod(returns = ReturnType.SINGLE)
76+
public ResponseModel get() {
77+
// Generated convenience method for getWithResponse
78+
RequestOptions requestOptions = new RequestOptions();
79+
return getWithResponse(requestOptions).getValue().toObject(ResponseModel.class);
80+
}
81+
}

0 commit comments

Comments
 (0)