Skip to content

Commit dabd323

Browse files
feat: translate 50 changelog files to zh
1 parent 4cd6edb commit dabd323

50 files changed

Lines changed: 450 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## 3.10.2
2+
**`(fix):`** 修复同步客户端委托导致数组查询参数编译错误的问题。生成器使用了错误的类名,破坏了委托并导致内联 HTTP 生成。
3+
4+
5+
## 3.10.1
6+
**`(fix):`** 修复启用 `use-nullable-annotation` 时构建器设置方法中的可空注解生成问题。可空字段的构建器设置方法参数现在正确使用 `@org.jetbrains.annotations.Nullable`,而不是错误地尝试使用 `Nullable<T>` 容器类作为注解。同时从路径参数中移除了 `@Nullable`,因为在 REST API 中它们总是必需的。
7+
8+
9+
## 3.10.0
10+
**`(feat):`** 通过 `use-nullable-for-optional-fields` 配置添加对 PATCH 请求中三态可空字段的支持。启用时,可选字段使用 `Nullable<T>` 而不是 `Optional<T>` 来区分省略的字段、显式 null 值和实际值。
11+
12+
13+
## 3.9.4
14+
**`(chore):`**`README.md` 中记录 `.withRawResponse()` 的使用。
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
## 3.10.4
2+
**`(fix):`** 修复使用布尔或长整型查询参数时的编译错误。
3+
4+
5+
## 3.10.3
6+
**`(fix):`** 使用 Gradle wrapper 进行 Spotless 格式化,而不需要在 PATH 中安装 gradle。
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
## 3.10.5
2+
**`(fix):`** 撤销在 3.10.0 版本中引入的对 PATCH 请求中三态可空字段的支持 (PR #10104)。恢复 `Optional<T>` 语义并移除 `use-nullable-for-optional-fields` 配置和相关的 `Nullable<T>` 处理。
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
## 3.11.0
2+
**`(feat):`** 通过 `collapse-optional-nullable` 配置添加对 PATCH 请求中三态可空字段的支持。启用时,可选可空字段使用 `OptionalNullable<T>` 来区分省略的字段、显式 null 值和实际值。这为需要区分"未指定"和"设为 null"的 API 提供了正确的 PATCH 请求语义。
3+
4+
```yaml
5+
customConfig:
6+
collapse-optional-nullable: true
7+
```
8+
9+
生成的用法:
10+
```java
11+
UpdateRequest.builder()
12+
.fieldName(OptionalNullable.absent()) // 省略字段
13+
.anotherField(OptionalNullable.ofNull()) // 清空字段
14+
.valueField(OptionalNullable.of("value")) // 设置值
15+
.build();
16+
```
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
## 3.11.3
2+
**`(fix):`** 修复 `collapse-optional-nullable` 配置在下载文件模式下未生效的问题。
3+
4+
5+
## 3.11.2
6+
**`(fix):`** 修复错误响应时的 IllegalStateException: closed。生成的客户端调用了两次 responseBody.string()(一次在成功处理器中,一次在错误处理器中),但 OkHttp 的 ResponseBody 只能读取一次。现在在 JSON/文本响应的成功检查前预读响应体。
7+
8+
9+
## 3.11.1
10+
**`(fix):`** 在问题解决期间,默认禁用 Java SDK 的线路测试。
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
## 3.12.0
2+
**`(feat):`** 添加对 API 级路径参数的支持。在 API 级定义的路径参数(如 `/test/{pathParam}`)现在可以通过根客户端构建器(`.pathParam(value)`)进行配置。
3+
4+
5+
## 3.11.7
6+
**`(fix):`** 修复 ApiError toString() 显示 JSON 序列化的主体而不是哈希码(如 `{"title": "Bad Request", ...}` 而不是 `BadRequestProblems@4ac5ea99`)。
7+
8+
9+
## 3.11.6
10+
**`(fix):`** 修复路径参数前缀(如 `v{version}`)被分割成单独段的问题,产生像 .../v/1 而不是 .../v1 这样的 URL。
11+
12+
13+
## 3.11.5
14+
**`(fix):`** 将错误主体解析提取到 ObjectMappers.parseErrorBody() 实用方法中。当服务器返回 XML/HTML 错误而不是 JSON 时,该实用程序优雅地回退到原始字符串,而不是抛出 JsonProcessingException,保留 HTTP 状态码和错误详情。
15+
16+
17+
## 3.11.4
18+
**`(fix):`** `NullableNonemptyFilter` 现在正确处理 `OptionalNullable.isAbsent()`,在 PATCH 请求的 JSON 序列化中排除缺失的字段。
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
## 3.13.0
2+
**`(feat):`** 向输出中添加了生成元数据文件。
3+
4+
5+
## 3.12.1
6+
**`(fix):`** 修复查询和头部参数泄漏到请求体 JSON 中的问题。现在只有主体参数会在请求负载中序列化。
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
## 3.14.2
2+
**`(fix):`** 修复请求体中 Optional.empty() 的双重包装问题。线路测试和动态代码片段现在正确生成 Optional.empty() 而不是 Optional.of(Optional.empty()) 用于可选请求体。
3+
4+
5+
## 3.14.1
6+
**`(fix):`** 通过从预期 JSON 中删除联合基础属性来修复线路测试失败。Java 生成器不为联合类型生成基础属性,因此线路测试预期现在排除这些字段以匹配实际 SDK 序列化行为。
7+
8+
9+
## 3.14.0
10+
**`(feat):`** 添加对具有双向通信的 WebSocket 通道的支持。生成的 WebSocket 客户端提供具有指数退避的自动重连、强类型消息处理器和断连期间的消息队列。客户端可通过子包客户端中的工厂方法访问。
11+
12+
```java
13+
// 使用路径和查询参数创建 WebSocket 客户端
14+
RealtimeWebSocketClient ws = client.realtime().realtimeWebSocket(
15+
"session-123",
16+
Optional.of("gpt-4"),
17+
Optional.of(0)
18+
);
19+
20+
// 注册处理器并连接
21+
ws.onReceive(message -> System.out.println("Received: " + message.getAlpha()));
22+
ws.onConnected(() -> System.out.println("Connected!"));
23+
ws.connect().get();
24+
25+
// 发送类型化消息
26+
ws.sendSend(SendEvent.builder()
27+
.sendText("Hello WebSocket!")
28+
.sendParam(42)
29+
.build());
30+
```
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
## 3.14.7
2+
**`(fix):`** 修复本地和远程 Java 生成之间的不一致行为,确保在所有生成场景中都复制许可证文件并填充平台标头
3+
4+
## 3.14.6
5+
**`(chore):`** 将 Gradle 包装器从 7.4.2 升级到 8.14.3。此更新带来了 Java 24 支持、GraalVM Native Image 工具链选择、增强的测试报告和构建编写改进。捆绑的 Gradle 包装器文件现在使用最新的稳定 Gradle 8.x 版本。
6+
7+
8+
## 3.14.5
9+
**`(fix):`** 修复具有可空容器类型的 OpenAPI 规范的 SDK 生成失败。生成器现在正确处理响应解析和分页中的可空容器,将它们与可选容器区别对待。还添加了对字面容器检测的支持,并改进了错误诊断。
10+
这修复了在处理具有可空类型或查询参数中的数组示例的 API 时出现的"意外容器类型"错误。
11+
12+
13+
## 3.14.4
14+
**`(fix):`** 用资源复制替换 gradle 包装器命令,以消除 SDK 生成期间的互联网请求。Gradle 包装器文件现在从捆绑资源复制,而不是通过 `gradle wrapper` 命令下载。生成期间的所有 `./gradlew` 调用已被移除,以避免网络调用和 HTTP 代理问题。
15+
16+
17+
## 3.14.3
18+
**`(fix):`** 为可选请求体跳过线路测试中的空对象验证。当请求体是 optional(nullable(T)),其中 T 只有可选属性时,线路测试现在在传递 Optional.empty() 时正确跳过 `{}` 验证,匹配实际的 SDK 行为。
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## 3.14.10
2+
**`(fix):`** 修复数值类型不匹配和头部序列化的线路测试失败。线路测试现在使用数值等价比较来处理来自 OpenAPI 规范的整数与双精度浮点数类型差异。头部不再错误地序列化到 JSON 请求体中 - 它们现在使用 @JsonIgnore 并仅作为 HTTP 头部发送。
3+
4+
5+
## 3.14.9
6+
**`(fix):`** 修复在使用分阶段构建器处理集合时的线路测试编译错误。构建器方法调用现在正确地在集合(如 Lists、Sets 和 Maps)之前排序必需字段。
7+
8+
## 3.14.8
9+
**`(fix):`** 修复导致构建崩溃的关键线路测试生成失败。实现了服务名称解析以处理 IR 与 Dynamic IR 不匹配,并添加了优雅的错误处理,而不是构建失败。

0 commit comments

Comments
 (0)