Skip to content

Commit 11cab54

Browse files
feat: translate 54 changelog files to zh
1 parent dabd323 commit 11cab54

54 files changed

Lines changed: 433 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: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
## 3.38.0
2+
**`(feat):`** 添加对基于 URI 和路径的分页支持。使用 `uri``path` 分页的端点现在生成正确的分页可迭代对象,可以跟随响应体中的下一页链接。
3+
4+
5+
## 3.35.2
6+
**`(fix):`** 修复没有显式请求体字段的 PATCH 请求在运行时因 OkHttp 的 `IllegalArgumentException: method PATCH must have a request body` 而失败的问题。生成器现在为 PATCH 端点提供非空的空请求体,与现有的 POST 和 PUT 处理方式保持一致。
7+
8+
9+
## 3.35.1
10+
**`(fix):`** 在 Javadoc 注释中保留有效的 HTML 标签,而不是转义它们。来自 API 描述的标签如 `<a>``<code>``<p>``<pre>` 和其他标准 HTML 标签现在在 Javadoc 中渲染为正确的 HTML,而独立的尖括号(例如比较运算符、泛型)仍然保持转义状态。
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
## 3.36.1
2+
**`(fix):`** 处理 OAuth 令牌供应商中的可选访问令牌和 Long 类型兼容性。生成器现在使用 `orElseThrow` 解包 `Optional<String>` 访问令牌,并使用 `Long` 字面量作为默认的 `expires_in` 回退值。
3+
4+
5+
## 3.36.0
6+
**`(feat):`** 添加服务器 URL 模板支持。当 OpenAPI 规范使用服务器变量(例如 `https://api.{region}.{environment}.example.com`)时,生成的 SDK 现在将这些变量暴露为构建器方法(例如 `.region("us-east-1")`)。`x-fern-default-url` 扩展在未提供变量时提供干净的回退 URL。支持单个和多个基础 URL 环境。
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
## 3.36.3
2+
**`(fix):`** 在 OAuth 令牌供应商中为 `Optional<Long>` expires_in 字段使用正确的 Long 字面量(3600L)而不是 int 字面量(3600)
3+
4+
## 3.36.2
5+
**`(fix):`** 为流式(SSE)端点禁用 OkHttp callTimeout。默认的 60 秒 callTimeout 在约 1 分钟后终止 SSE 连接,而不是允许它们无限期地流式传输。流式端点现在将 callTimeout 设置为 0(禁用),因此迭代器在每次 next() 调用时阻塞等待新事件,直到连接关闭或发生错误。
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
## 3.37.0
2+
**`(feat):`** 向生成的构建器添加 `additionalProperty(String key, Object value)``additionalProperties(Map<String, Object>)` 方法,允许用户以编程方式设置任意额外字段。以前,附加属性仅在 JSON 反序列化期间填充。
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
## 3.37.1
2+
**`(fix):`** 更新容器包以修复 8 个安全漏洞:gnupg2-minimal (CVE-2026-24882)、curl-minimal 和 libcurl-minimal (CVE-2025-13034、CVE-2025-14017、CVE-2025-14524、CVE-2025-14819、CVE-2025-15079、CVE-2025-15224)、alsa-lib (CVE-2026-25068)、expat (CVE-2026-25210)、openssh 和 openssh-clients (CVE-2025-61984、CVE-2025-61985),以及 npm tar (GHSA-83g3-92jg-28cx)。
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
## 3.38.1
2+
**`(fix):`** 当生成器不产生 README.md 时保留现有的 README.md。以前,`overwriteLocalContents` 在复制生成器输出之前删除所有文件,所以如果 README 生成静默失败,文件就会从目标仓库中删除。该方法现在在源目录不包含 README.md 时跳过删除它。
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
## 3.39.0
2+
**`(feat):`** 为生成的 SDK 添加日志记录支持。
3+
用户可以通过向客户端构建器的 `.logging()` 方法传递 `LogConfig` 来配置日志记录。
4+
5+
```java
6+
import com.example.api.AcmeApiClient;
7+
import com.example.api.core.LogConfig;
8+
import com.example.api.core.LogLevel;
9+
import com.example.api.core.ConsoleLogger;
10+
11+
AcmeApiClient client = AcmeApiClient.builder()
12+
.token("YOUR_TOKEN")
13+
.logging(LogConfig.builder()
14+
.level(LogLevel.DEBUG) // INFO 是默认值
15+
.logger(new ConsoleLogger()) // ConsoleLogger 是默认值
16+
.silent(false) // true 是默认值,设置为 false 以启用日志记录
17+
.build())
18+
.build();
19+
```
20+
21+
`LogConfig` 构建器接受以下属性:
22+
- `level(LogLevel)`:要使用的日志级别。默认为 `LogLevel.INFO`
23+
- `logger(ILogger)`:要使用的日志记录器实现。默认为 `ConsoleLogger`
24+
- `silent(boolean)`:是否静默日志记录器。默认为 `true`
25+
26+
`LogLevel` 枚举支持以下值:
27+
- `DEBUG`
28+
- `INFO`
29+
- `WARN`
30+
- `ERROR`
31+
32+
要提供自定义日志记录器,请实现带有 `debug``info``warn``error` 方法的 `ILogger` 接口。
33+
34+
HTTP 请求和响应详细信息(方法、URL、状态码、头部、正文)通过添加到 OkHttp 客户端的 `LoggingInterceptor` 记录。敏感头部(`authorization``x-api-key``cookie``x-csrf-token` 等)在日志中自动被编辑。
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## 3.40.1
2+
**`(fix):`** 修复 `Rfc2822DateTimeDeserializer` 可见性问题。该类生成时使用了包私有访问,当其他包中的类型通过 `@JsonDeserialize(using = ...)` 引用它时会导致编译错误。该类现在是 `public` 的。
3+
4+
5+
**`(fix):`** 修复 URI/路径分页生成 `String` 而不是 `Optional<String>` 作为下一页令牌的问题。`UriPage.create``PathPage.create` 期望 `Optional<String>`,但 `getNestedPropertySnippet` 通过 `.orElse(null)` 解包了可选值。生成器现在直接构建获取器链以保留 `Optional<String>` 类型。
6+
7+
8+
## 3.40.0
9+
**`(feat):`** 添加 `DATE_TIME_RFC_2822` 原始类型支持。带有 `format: date-time-rfc-2822` 的字段(例如 Twilio 的 `dateCreated``dateSent``dateUpdated`)现在生成为 `OffsetDateTime`,带有每个字段的 `@JsonDeserialize(using = Rfc2822DateTimeDeserializer.class)` 注解,通过 `DateTimeFormatter.RFC_1123_DATE_TIME` 解析 RFC 2822 日期。
10+
11+
12+
## 3.39.1
13+
**`(chore):`** 直接使用 generator-cli JS API 而不是子进程调用。从 Docker 镜像中移除 generator-cli,因为它现在通过 esbuild 打包。
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## 3.40.3
2+
**`(fix):`** 使 OAuth 身份验证部分成为生成的 README 中的稳定功能块。
3+
之前,身份验证文档作为 Usage 块的附录注入,带有 `## Authentication` 标题,BlockMerger 在后续合并时将其解析为单独的顶级块。身份验证内容现在注册为具有稳定块 ID 的适当 AUTHENTICATION 功能,使 README 合并具有确定性。
4+
5+
6+
## 3.40.2
7+
**`(fix):`** 在容器中将 minimatch 补丁升级到 10.2.3,以修复 GHSA-7r86-cg39-jmmj(通过 matchOne() 中的组合回溯导致的 ReDoS)和 GHSA-23c5-xmqv-rm74(通过嵌套 *() extglobs 导致的 ReDoS)。
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
## 3.40.4
2+
**`(fix):`** 将 Jackson 从 2.18.2 升级到 2.18.6,以修复 GHSA-72hv-8253-57qq(异步解析器中的数字长度约束绕过导致潜在的 DoS)。

0 commit comments

Comments
 (0)