Skip to content

Commit d77038a

Browse files
Update dependencies and prepare v0.39.1 patch release (#3283)
* Initial plan * Update core submodule to bug fix branch and update Node.js dependencies for 0.39.1 release Co-authored-by: weidongxu-microsoft <53292327+weidongxu-microsoft@users.noreply.github.com> * Keep ESLint 9 for stability, avoid breaking changes in ESLint 10 Co-authored-by: weidongxu-microsoft <53292327+weidongxu-microsoft@users.noreply.github.com> * update core * regen * core on main --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: weidongxu-microsoft <53292327+weidongxu-microsoft@users.noreply.github.com> Co-authored-by: Weidong Xu <weidxu@microsoft.com>
1 parent b644d0d commit d77038a

12 files changed

Lines changed: 242 additions & 35 deletions

File tree

core

Submodule core updated 192 files

typespec-extension/changelog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Release History
22

3+
## 0.39.1 (2026-02-09)
4+
5+
Compatible with compiler 1.8.0.
6+
7+
- Updated package dependencies to the latest versions.
8+
- Fixed serialization for dictionary of unknown types.
9+
310
## 0.39.0 (2026-02-06)
411

512
Compatible with compiler 1.8.0.

typespec-extension/package-lock.json

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

typespec-extension/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@azure-tools/typespec-java",
3-
"version": "0.39.0",
3+
"version": "0.39.1",
44
"description": "TypeSpec library for emitting Java client from the TypeSpec REST protocol binding",
55
"keywords": [
66
"TypeSpec"
@@ -47,13 +47,13 @@
4747
"generator/http-client-generator/target/classes/PerfAutomation.jfc"
4848
],
4949
"peerDependencies": {
50+
"@azure-tools/openai-typespec": "^1.8.0",
5051
"@azure-tools/typespec-autorest": ">=0.64.1 <1.0.0",
5152
"@azure-tools/typespec-azure-core": ">=0.64.0 <1.0.0",
5253
"@azure-tools/typespec-azure-resource-manager": ">=0.64.1 <1.0.0",
5354
"@azure-tools/typespec-azure-rulesets": ">=0.64.0 <1.0.0",
5455
"@azure-tools/typespec-client-generator-core": ">=0.64.6 <1.0.0",
5556
"@azure-tools/typespec-liftr-base": ">=0.11.0 <1.0.0",
56-
"@azure-tools/openai-typespec": "^1.8.0",
5757
"@typespec/compiler": "^1.8.0",
5858
"@typespec/http": "^1.8.0",
5959
"@typespec/openapi": "^1.8.0",
@@ -67,17 +67,17 @@
6767
"lodash": "~4.17.23"
6868
},
6969
"devDependencies": {
70+
"@azure-tools/openai-typespec": "^1.8.0",
7071
"@azure-tools/typespec-autorest": "0.64.1",
7172
"@azure-tools/typespec-azure-core": "0.64.0",
7273
"@azure-tools/typespec-azure-resource-manager": "0.64.1",
7374
"@azure-tools/typespec-azure-rulesets": "0.64.0",
7475
"@azure-tools/typespec-client-generator-core": "0.64.6",
7576
"@azure-tools/typespec-liftr-base": "0.11.0",
76-
"@azure-tools/openai-typespec": "^1.8.0",
77-
"@microsoft/api-extractor": "^7.56.2",
77+
"@microsoft/api-extractor": "^7.56.3",
7878
"@types/js-yaml": "~4.0.9",
7979
"@types/lodash": "~4.17.23",
80-
"@types/node": "~25.2.1",
80+
"@types/node": "~25.2.2",
8181
"@typescript-eslint/eslint-plugin": "~8.54.0",
8282
"@typescript-eslint/parser": "~8.54.0",
8383
"@typespec/compiler": "1.8.0",

typespec-tests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"@typespec/spector": "0.1.0-alpha.22",
1414
"@typespec/http-specs": "0.1.0-alpha.31",
1515
"@azure-tools/azure-http-specs": "0.1.0-alpha.36",
16-
"@azure-tools/typespec-java": "file:/../typespec-extension/azure-tools-typespec-java-0.39.0.tgz"
16+
"@azure-tools/typespec-java": "file:/../typespec-extension/azure-tools-typespec-java-0.39.1.tgz"
1717
},
1818
"devDependencies": {
1919
"@typespec/prettier-plugin-typespec": "^1.8.0",

typespec-tests/src/main/java/tsptest/armstreamstyleserialization/models/Builtin.java

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,21 @@ public final class Builtin implements JsonSerializable<Builtin> {
122122
*/
123123
private BinaryData unknown;
124124

125+
/*
126+
* The unknownDict property.
127+
*/
128+
private Map<String, BinaryData> unknownDict;
129+
130+
/*
131+
* The unknownArray property.
132+
*/
133+
private List<BinaryData> unknownArray;
134+
135+
/*
136+
* The unknownDictArray property.
137+
*/
138+
private List<Map<String, BinaryData>> unknownDictArray;
139+
125140
/**
126141
* Creates an instance of Builtin class.
127142
*/
@@ -508,6 +523,66 @@ public Builtin withUnknown(BinaryData unknown) {
508523
return this;
509524
}
510525

526+
/**
527+
* Get the unknownDict property: The unknownDict property.
528+
*
529+
* @return the unknownDict value.
530+
*/
531+
public Map<String, BinaryData> unknownDict() {
532+
return this.unknownDict;
533+
}
534+
535+
/**
536+
* Set the unknownDict property: The unknownDict property.
537+
*
538+
* @param unknownDict the unknownDict value to set.
539+
* @return the Builtin object itself.
540+
*/
541+
public Builtin withUnknownDict(Map<String, BinaryData> unknownDict) {
542+
this.unknownDict = unknownDict;
543+
return this;
544+
}
545+
546+
/**
547+
* Get the unknownArray property: The unknownArray property.
548+
*
549+
* @return the unknownArray value.
550+
*/
551+
public List<BinaryData> unknownArray() {
552+
return this.unknownArray;
553+
}
554+
555+
/**
556+
* Set the unknownArray property: The unknownArray property.
557+
*
558+
* @param unknownArray the unknownArray value to set.
559+
* @return the Builtin object itself.
560+
*/
561+
public Builtin withUnknownArray(List<BinaryData> unknownArray) {
562+
this.unknownArray = unknownArray;
563+
return this;
564+
}
565+
566+
/**
567+
* Get the unknownDictArray property: The unknownDictArray property.
568+
*
569+
* @return the unknownDictArray value.
570+
*/
571+
public List<Map<String, BinaryData>> unknownDictArray() {
572+
return this.unknownDictArray;
573+
}
574+
575+
/**
576+
* Set the unknownDictArray property: The unknownDictArray property.
577+
*
578+
* @param unknownDictArray the unknownDictArray value to set.
579+
* @return the Builtin object itself.
580+
*/
581+
public Builtin withUnknownDictArray(List<Map<String, BinaryData>> unknownDictArray) {
582+
this.unknownDictArray = unknownDictArray;
583+
return this;
584+
}
585+
511586
/**
512587
* Validates the instance.
513588
*
@@ -565,6 +640,18 @@ public void validate() {
565640
throw LOGGER.atError()
566641
.log(new IllegalArgumentException("Missing required property unknown in model Builtin"));
567642
}
643+
if (unknownDict() == null) {
644+
throw LOGGER.atError()
645+
.log(new IllegalArgumentException("Missing required property unknownDict in model Builtin"));
646+
}
647+
if (unknownArray() == null) {
648+
throw LOGGER.atError()
649+
.log(new IllegalArgumentException("Missing required property unknownArray in model Builtin"));
650+
}
651+
if (unknownDictArray() == null) {
652+
throw LOGGER.atError()
653+
.log(new IllegalArgumentException("Missing required property unknownDictArray in model Builtin"));
654+
}
568655
}
569656

570657
private static final ClientLogger LOGGER = new ClientLogger(Builtin.class);
@@ -597,6 +684,28 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
597684
jsonWriter.writeStringField("uuid", this.uuid);
598685
jsonWriter.writeFieldName("unknown");
599686
this.unknown.writeTo(jsonWriter);
687+
jsonWriter.writeMapField("unknownDict", this.unknownDict, (writer, element) -> {
688+
if (element == null) {
689+
writer.writeNull();
690+
} else {
691+
element.writeTo(writer);
692+
}
693+
});
694+
jsonWriter.writeArrayField("unknownArray", this.unknownArray, (writer, element) -> {
695+
if (element == null) {
696+
writer.writeNull();
697+
} else {
698+
element.writeTo(writer);
699+
}
700+
});
701+
jsonWriter.writeArrayField("unknownDictArray", this.unknownDictArray,
702+
(writer, element) -> writer.writeMap(element, (writer1, element1) -> {
703+
if (element1 == null) {
704+
writer1.writeNull();
705+
} else {
706+
element1.writeTo(writer1);
707+
}
708+
}));
600709
return jsonWriter.writeEndObject();
601710
}
602711

@@ -663,6 +772,19 @@ public static Builtin fromJson(JsonReader jsonReader) throws IOException {
663772
} else if ("unknown".equals(fieldName)) {
664773
deserializedBuiltin.unknown
665774
= reader.getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped()));
775+
} else if ("unknownDict".equals(fieldName)) {
776+
Map<String, BinaryData> unknownDict = reader.readMap(reader1 -> reader1
777+
.getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped())));
778+
deserializedBuiltin.unknownDict = unknownDict;
779+
} else if ("unknownArray".equals(fieldName)) {
780+
List<BinaryData> unknownArray = reader.readArray(reader1 -> reader1
781+
.getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped())));
782+
deserializedBuiltin.unknownArray = unknownArray;
783+
} else if ("unknownDictArray".equals(fieldName)) {
784+
List<Map<String, BinaryData>> unknownDictArray
785+
= reader.readArray(reader1 -> reader1.readMap(reader2 -> reader2
786+
.getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped()))));
787+
deserializedBuiltin.unknownDictArray = unknownDictArray;
666788
} else {
667789
reader.skipChildren();
668790
}

typespec-tests/src/main/java/tsptest/multipart/models/FileDetails.java renamed to typespec-tests/src/main/java/tsptest/multipart/models/FileData2FileDetails.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
* is overridden, as shown in the examples below.
5353
*/
5454
@Fluent
55-
public final class FileDetails {
55+
public final class FileData2FileDetails {
5656
/*
5757
* The content of the file.
5858
*/
@@ -72,12 +72,12 @@ public final class FileDetails {
7272
private String contentType = "application/octet-stream";
7373

7474
/**
75-
* Creates an instance of FileDetails class.
75+
* Creates an instance of FileData2FileDetails class.
7676
*
7777
* @param content the content value to set.
7878
*/
7979
@Generated
80-
public FileDetails(BinaryData content) {
80+
public FileData2FileDetails(BinaryData content) {
8181
this.content = content;
8282
}
8383

@@ -105,10 +105,10 @@ public String getFilename() {
105105
* Set the filename property: The filename of the file.
106106
*
107107
* @param filename the filename value to set.
108-
* @return the FileDetails object itself.
108+
* @return the FileData2FileDetails object itself.
109109
*/
110110
@Generated
111-
public FileDetails setFilename(String filename) {
111+
public FileData2FileDetails setFilename(String filename) {
112112
this.filename = filename;
113113
return this;
114114
}
@@ -127,10 +127,10 @@ public String getContentType() {
127127
* Set the contentType property: The content-type of the file.
128128
*
129129
* @param contentType the contentType value to set.
130-
* @return the FileDetails object itself.
130+
* @return the FileData2FileDetails object itself.
131131
*/
132132
@Generated
133-
public FileDetails setContentType(String contentType) {
133+
public FileData2FileDetails setContentType(String contentType) {
134134
this.contentType = contentType;
135135
return this;
136136
}

typespec-tests/src/main/java/tsptest/multipart/models/UploadHttpPartRequest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public final class UploadHttpPartRequest {
2222
* The file_data2 property.
2323
*/
2424
@Generated
25-
private final FileDetails fileData2;
25+
private final FileData2FileDetails fileData2;
2626

2727
/*
2828
* The size property.
@@ -38,7 +38,7 @@ public final class UploadHttpPartRequest {
3838
* @param size the size value to set.
3939
*/
4040
@Generated
41-
public UploadHttpPartRequest(InheritFileData fileData1, FileDetails fileData2, Size size) {
41+
public UploadHttpPartRequest(InheritFileData fileData1, FileData2FileDetails fileData2, Size size) {
4242
this.fileData1 = fileData1;
4343
this.fileData2 = fileData2;
4444
this.size = size;
@@ -60,7 +60,7 @@ public InheritFileData getFileData1() {
6060
* @return the fileData2 value.
6161
*/
6262
@Generated
63-
public FileDetails getFileData2() {
63+
public FileData2FileDetails getFileData2() {
6464
return this.fileData2;
6565
}
6666

typespec-tests/src/main/java/type/union/models/MixedTypesCases.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,13 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
133133
this.intProperty.writeTo(jsonWriter);
134134
jsonWriter.writeFieldName("boolean");
135135
this.booleanProperty.writeTo(jsonWriter);
136-
jsonWriter.writeArrayField("array", this.array,
137-
(writer, element) -> writer.writeUntyped(element == null ? null : element.toObject(Object.class)));
136+
jsonWriter.writeArrayField("array", this.array, (writer, element) -> {
137+
if (element == null) {
138+
writer.writeNull();
139+
} else {
140+
element.writeTo(writer);
141+
}
142+
});
138143
return jsonWriter.writeEndObject();
139144
}
140145

0 commit comments

Comments
 (0)