Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core
Submodule core updated 440 files
2 changes: 1 addition & 1 deletion eng/pipelines/jobs/build-autorest-mgmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
inputs:
versionSpec: '$(NodeVersion)'

- script: npm install autorest -g
- script: npm install autorest@$(AutorestVersion) -g

- template: /eng/pipelines/steps/cache-maven-repository.yml
parameters:
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/jobs/build-autorest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
publishJUnitResults: false

- script: |
npm install -g autorest
npm install -g autorest@$(AutorestVersion)
npm ci
displayName: 'Prepare Environment for Generation'
Expand Down
1 change: 1 addition & 0 deletions eng/pipelines/variables/globals.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
variables:
JavaVersion: '1.11'
NodeVersion: '20.x'
AutorestVersion: '3.7.2'

# Sets the Maven log level to either the LogLevel passed in the manual pipeline run or the default 'warn'
MavenLogLevel: $[coalesce(variables['LogLevel'], 'warn')]
Expand Down
4 changes: 3 additions & 1 deletion eng/sdk/sync_sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,9 @@ def update_sdks():
cmd = ["git", "checkout", "src/test"]
subprocess.check_call(cmd, cwd=module_path)

if not generated_samples_exists:
# For ARM module, we want to keep the generated samples code.
# For data-plane, if the generated samples/test code is not there before generation, we will delete the generated code after generation, to avoid unnecessary code check-in.
if not generated_samples_exists and not arm_module:
shutil.rmtree(generated_samples_path, ignore_errors=True)
if not generated_test_exists:
shutil.rmtree(generated_test_path, ignore_errors=True)
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@autorest/java",
"version": "4.1.62",
"version": "4.1.63",
"description": "The Java extension for classic generators in AutoRest.",
"scripts": {
"autorest": "autorest",
Expand Down
9 changes: 9 additions & 0 deletions typespec-extension/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Release History

## 0.41.0 (2026-03-06)

Compatible with compiler 1.9.0.

- Supported DurationKnownEncoding.milliseconds.
- Supported apiVersions in metadata.json for multiple services.
- Premium examples now have separate entry points other than `AzureResourceManager`.
- Updated package dependencies to the latest versions.

## 0.40.0 (2026-02-25)

Compatible with compiler 1.9.0.
Expand Down
18 changes: 9 additions & 9 deletions typespec-extension/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions typespec-extension/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@azure-tools/typespec-java",
"version": "0.40.0",
"version": "0.41.0",
"description": "TypeSpec library for emitting Java client from the TypeSpec REST protocol binding",
"keywords": [
"TypeSpec"
Expand Down Expand Up @@ -78,7 +78,7 @@
"@microsoft/api-extractor": "^7.57.6",
"@types/js-yaml": "~4.0.9",
"@types/lodash": "~4.17.24",
"@types/node": "~25.3.2",
"@types/node": "~25.3.5",
"@typescript-eslint/eslint-plugin": "~8.56.1",
"@typescript-eslint/parser": "~8.56.1",
"@typespec/compiler": "1.9.0",
Expand Down
6 changes: 3 additions & 3 deletions typespec-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@typespec/spector": "0.1.0-alpha.23",
"@typespec/http-specs": "0.1.0-alpha.32",
"@azure-tools/azure-http-specs": "0.1.0-alpha.37",
"@azure-tools/typespec-java": "file:/../typespec-extension/azure-tools-typespec-java-0.40.0.tgz"
"@azure-tools/typespec-java": "file:/../typespec-extension/azure-tools-typespec-java-0.41.0.tgz"
},
"devDependencies": {
"@typespec/prettier-plugin-typespec": "^1.9.0",
Expand All @@ -22,7 +22,7 @@
},
"overrides": {
"@typespec/compiler": "1.9.0",
"@typespec/http": "1.9.0",
"@typespec/http": "1.9.1",
"@typespec/rest": "0.79.0",
"@typespec/versioning": "0.79.0",
"@typespec/openapi": "1.9.0",
Expand All @@ -31,7 +31,7 @@
"@typespec/sse": "0.79.0",
"@typespec/streams": "0.79.0",
"@azure-tools/typespec-azure-core": "0.65.0",
"@azure-tools/typespec-client-generator-core": "0.65.3",
"@azure-tools/typespec-client-generator-core": "0.65.4",
"@azure-tools/typespec-azure-resource-manager": "0.65.0",
"@azure-tools/typespec-autorest": "0.65.0",
"@azure-tools/typespec-liftr-base": "0.12.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public Mono<Response<Void>> float64SecondsWithResponse(Duration duration, Reques
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<Void>> int32MillisecondsWithResponse(int duration, RequestOptions requestOptions) {
public Mono<Response<Void>> int32MillisecondsWithResponse(Duration duration, RequestOptions requestOptions) {
return this.serviceClient.int32MillisecondsWithResponseAsync(duration, requestOptions);
}

Expand All @@ -204,7 +204,8 @@ public Mono<Response<Void>> int32MillisecondsWithResponse(int duration, RequestO
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<Void>> int32MillisecondsLargerUnitWithResponse(int duration, RequestOptions requestOptions) {
public Mono<Response<Void>> int32MillisecondsLargerUnitWithResponse(Duration duration,
RequestOptions requestOptions) {
return this.serviceClient.int32MillisecondsLargerUnitWithResponseAsync(duration, requestOptions);
}

Expand All @@ -221,7 +222,7 @@ public Mono<Response<Void>> int32MillisecondsLargerUnitWithResponse(int duration
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<Void>> floatMillisecondsWithResponse(double duration, RequestOptions requestOptions) {
public Mono<Response<Void>> floatMillisecondsWithResponse(Duration duration, RequestOptions requestOptions) {
return this.serviceClient.floatMillisecondsWithResponseAsync(duration, requestOptions);
}

Expand All @@ -238,7 +239,7 @@ public Mono<Response<Void>> floatMillisecondsWithResponse(double duration, Reque
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<Void>> floatMillisecondsLargerUnitWithResponse(double duration,
public Mono<Response<Void>> floatMillisecondsLargerUnitWithResponse(Duration duration,
RequestOptions requestOptions) {
return this.serviceClient.floatMillisecondsLargerUnitWithResponseAsync(duration, requestOptions);
}
Expand All @@ -256,7 +257,7 @@ public Mono<Response<Void>> floatMillisecondsLargerUnitWithResponse(double durat
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<Void>> float64MillisecondsWithResponse(double duration, RequestOptions requestOptions) {
public Mono<Response<Void>> float64MillisecondsWithResponse(Duration duration, RequestOptions requestOptions) {
return this.serviceClient.float64MillisecondsWithResponseAsync(duration, requestOptions);
}

Expand All @@ -273,7 +274,7 @@ public Mono<Response<Void>> float64MillisecondsWithResponse(double duration, Req
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<Void>> int32MillisecondsArrayWithResponse(List<Integer> duration,
public Mono<Response<Void>> int32MillisecondsArrayWithResponse(List<Duration> duration,
RequestOptions requestOptions) {
return this.serviceClient.int32MillisecondsArrayWithResponseAsync(duration, requestOptions);
}
Expand Down Expand Up @@ -452,7 +453,7 @@ public Mono<Void> float64Seconds(Duration duration) {
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Void> int32Milliseconds(int duration) {
public Mono<Void> int32Milliseconds(Duration duration) {
// Generated convenience method for int32MillisecondsWithResponse
RequestOptions requestOptions = new RequestOptions();
return int32MillisecondsWithResponse(duration, requestOptions).flatMap(FluxUtil::toMono);
Expand All @@ -472,7 +473,7 @@ public Mono<Void> int32Milliseconds(int duration) {
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Void> int32MillisecondsLargerUnit(int duration) {
public Mono<Void> int32MillisecondsLargerUnit(Duration duration) {
// Generated convenience method for int32MillisecondsLargerUnitWithResponse
RequestOptions requestOptions = new RequestOptions();
return int32MillisecondsLargerUnitWithResponse(duration, requestOptions).flatMap(FluxUtil::toMono);
Expand All @@ -492,7 +493,7 @@ public Mono<Void> int32MillisecondsLargerUnit(int duration) {
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Void> floatMilliseconds(double duration) {
public Mono<Void> floatMilliseconds(Duration duration) {
// Generated convenience method for floatMillisecondsWithResponse
RequestOptions requestOptions = new RequestOptions();
return floatMillisecondsWithResponse(duration, requestOptions).flatMap(FluxUtil::toMono);
Expand All @@ -512,7 +513,7 @@ public Mono<Void> floatMilliseconds(double duration) {
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Void> floatMillisecondsLargerUnit(double duration) {
public Mono<Void> floatMillisecondsLargerUnit(Duration duration) {
// Generated convenience method for floatMillisecondsLargerUnitWithResponse
RequestOptions requestOptions = new RequestOptions();
return floatMillisecondsLargerUnitWithResponse(duration, requestOptions).flatMap(FluxUtil::toMono);
Expand All @@ -532,7 +533,7 @@ public Mono<Void> floatMillisecondsLargerUnit(double duration) {
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Void> float64Milliseconds(double duration) {
public Mono<Void> float64Milliseconds(Duration duration) {
// Generated convenience method for float64MillisecondsWithResponse
RequestOptions requestOptions = new RequestOptions();
return float64MillisecondsWithResponse(duration, requestOptions).flatMap(FluxUtil::toMono);
Expand All @@ -552,7 +553,7 @@ public Mono<Void> float64Milliseconds(double duration) {
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Void> int32MillisecondsArray(List<Integer> duration) {
public Mono<Void> int32MillisecondsArray(List<Duration> duration) {
// Generated convenience method for int32MillisecondsArrayWithResponse
RequestOptions requestOptions = new RequestOptions();
return int32MillisecondsArrayWithResponse(duration, requestOptions).flatMap(FluxUtil::toMono);
Expand Down
24 changes: 12 additions & 12 deletions typespec-tests/src/main/java/encode/duration/HeaderClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public Response<Void> float64SecondsWithResponse(Duration duration, RequestOptio
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<Void> int32MillisecondsWithResponse(int duration, RequestOptions requestOptions) {
public Response<Void> int32MillisecondsWithResponse(Duration duration, RequestOptions requestOptions) {
return this.serviceClient.int32MillisecondsWithResponse(duration, requestOptions);
}

Expand All @@ -202,7 +202,7 @@ public Response<Void> int32MillisecondsWithResponse(int duration, RequestOptions
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<Void> int32MillisecondsLargerUnitWithResponse(int duration, RequestOptions requestOptions) {
public Response<Void> int32MillisecondsLargerUnitWithResponse(Duration duration, RequestOptions requestOptions) {
return this.serviceClient.int32MillisecondsLargerUnitWithResponse(duration, requestOptions);
}

Expand All @@ -219,7 +219,7 @@ public Response<Void> int32MillisecondsLargerUnitWithResponse(int duration, Requ
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<Void> floatMillisecondsWithResponse(double duration, RequestOptions requestOptions) {
public Response<Void> floatMillisecondsWithResponse(Duration duration, RequestOptions requestOptions) {
return this.serviceClient.floatMillisecondsWithResponse(duration, requestOptions);
}

Expand All @@ -236,7 +236,7 @@ public Response<Void> floatMillisecondsWithResponse(double duration, RequestOpti
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<Void> floatMillisecondsLargerUnitWithResponse(double duration, RequestOptions requestOptions) {
public Response<Void> floatMillisecondsLargerUnitWithResponse(Duration duration, RequestOptions requestOptions) {
return this.serviceClient.floatMillisecondsLargerUnitWithResponse(duration, requestOptions);
}

Expand All @@ -253,7 +253,7 @@ public Response<Void> floatMillisecondsLargerUnitWithResponse(double duration, R
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<Void> float64MillisecondsWithResponse(double duration, RequestOptions requestOptions) {
public Response<Void> float64MillisecondsWithResponse(Duration duration, RequestOptions requestOptions) {
return this.serviceClient.float64MillisecondsWithResponse(duration, requestOptions);
}

Expand All @@ -270,7 +270,7 @@ public Response<Void> float64MillisecondsWithResponse(double duration, RequestOp
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Response<Void> int32MillisecondsArrayWithResponse(List<Integer> duration, RequestOptions requestOptions) {
public Response<Void> int32MillisecondsArrayWithResponse(List<Duration> duration, RequestOptions requestOptions) {
return this.serviceClient.int32MillisecondsArrayWithResponse(duration, requestOptions);
}

Expand Down Expand Up @@ -439,7 +439,7 @@ public void float64Seconds(Duration duration) {
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public void int32Milliseconds(int duration) {
public void int32Milliseconds(Duration duration) {
// Generated convenience method for int32MillisecondsWithResponse
RequestOptions requestOptions = new RequestOptions();
int32MillisecondsWithResponse(duration, requestOptions).getValue();
Expand All @@ -458,7 +458,7 @@ public void int32Milliseconds(int duration) {
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public void int32MillisecondsLargerUnit(int duration) {
public void int32MillisecondsLargerUnit(Duration duration) {
// Generated convenience method for int32MillisecondsLargerUnitWithResponse
RequestOptions requestOptions = new RequestOptions();
int32MillisecondsLargerUnitWithResponse(duration, requestOptions).getValue();
Expand All @@ -477,7 +477,7 @@ public void int32MillisecondsLargerUnit(int duration) {
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public void floatMilliseconds(double duration) {
public void floatMilliseconds(Duration duration) {
// Generated convenience method for floatMillisecondsWithResponse
RequestOptions requestOptions = new RequestOptions();
floatMillisecondsWithResponse(duration, requestOptions).getValue();
Expand All @@ -496,7 +496,7 @@ public void floatMilliseconds(double duration) {
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public void floatMillisecondsLargerUnit(double duration) {
public void floatMillisecondsLargerUnit(Duration duration) {
// Generated convenience method for floatMillisecondsLargerUnitWithResponse
RequestOptions requestOptions = new RequestOptions();
floatMillisecondsLargerUnitWithResponse(duration, requestOptions).getValue();
Expand All @@ -515,7 +515,7 @@ public void floatMillisecondsLargerUnit(double duration) {
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public void float64Milliseconds(double duration) {
public void float64Milliseconds(Duration duration) {
// Generated convenience method for float64MillisecondsWithResponse
RequestOptions requestOptions = new RequestOptions();
float64MillisecondsWithResponse(duration, requestOptions).getValue();
Expand All @@ -534,7 +534,7 @@ public void float64Milliseconds(double duration) {
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public void int32MillisecondsArray(List<Integer> duration) {
public void int32MillisecondsArray(List<Duration> duration) {
// Generated convenience method for int32MillisecondsArrayWithResponse
RequestOptions requestOptions = new RequestOptions();
int32MillisecondsArrayWithResponse(duration, requestOptions).getValue();
Expand Down
Loading
Loading