4.7.0

(feat): Add retry-status-codes config with "legacy" and "recommended" modes. Legacy (default) preserves current behavior (408, 429, >= 500). Recommended retries only transient codes (408, 429, 502, 503, 504), avoiding idempotency issues with 500. A 4.0.0 migration auto-pins legacy for upgrading users.

4.6.4

(fix): Fix dynamic snippet generation for multipart/form-data endpoints with file parameters. Previously, when a file value was not provided in the example, the file argument was omitted from the snippet, causing subsequent arguments to shift and produce compile errors (e.g. incompatible types: <Op>Request cannot be converted to Optional<java.io.File>). Now emits null for missing file arguments to keep positional args aligned.


4.6.3

(fix): Fix Java SDK snippet and wire test generation for allow-multiple query parameters when coerce-optional-schemas-to-nullable: true is set. Previously, list items wrapped in optional<...> and/or nullable<...> produced calls like .strategy(Arrays.asList(Optional.of(...))), which failed to compile because the generated builders only expose List<T> overloads (no List<Optional<T>> or List<Nullable<T>>). The snippet generator now strips both optional and nullable wrappers from list items, so the emitted code matches an existing builder signature.


4.6.2

(fix): Fix Java SDK generation crash when an OpenAPI property name is a Java keyword or literal (e.g. true, false, null, if, new). KeyWordUtils only sanitized 12 of Java’s reserved words, so JavaPoet rejected the rest with IllegalArgumentException: not a valid name. The reserved-word set now covers the full Java keyword list plus true/false/null literals, so these properties generate as _<name> fields with @JsonProperty("<name>") preserving the wire format.


4.6.1

(fix): 修复无区别联合反序列化器错误分类载荷的问题。生成的反序列化器现在在尝试转换为每个变体之前检查 JSON 对象中是否存在所有必需的线键,防止当 Jackson 的构建器静默接受缺失的必需字段时第一个变体总是获胜。

(fix): 将基于类型的 WebSocket 消息分派切换替换为基于形状的试验反序列化。消息现在通过在尝试 Jackson 转换之前检查必需字段的存在和字面量值来匹配。这正确处理了多个消息模式共享相同判别器值的 AsyncAPI 通道(例如,两个具有不相交必需字段的”History”变体)。


4.6.0

(feat): 在认证方案上配置了 placeholder 字段时,在 README 代码片段中使用认证方案占位符值。


4.5.0

(feat): 支持在通过 IR 中的 usernameOmit/passwordOmit 配置时省略基本认证的用户名或密码。当字段被省略时,它将从 SDK 的公共 API 中删除(credentials() 接受更少的参数),并在内部使用空字符串进行认证头编码。当两个字段都被省略时,将完全跳过 credentials() 调用和 Authorization 头。


4.4.1

(chore): 将 @fern-api/generator-cli 升级至 0.9.11。GitHub 管道步骤现在通过 GitHub REST API 创建签名提交(匹配 fiddle 的传统 InMemoryGitRepo 推送路径),恢复了在启用重放的组织上的已验证 fern-api[bot] 提交。

4.4.0

(feat): 添加 offset-semantics 配置选项。当设置为 "item-index" 时,偏移分页按每页返回的项目数量递增,而不是按 1 递增("page-index",默认值)。

4.3.1

(chore): 为生成器运行时添加通过 Sentry 的崩溃报告,并使用新的共享 GeneratorError 分类法对抛出的错误进行分类,以便将面向用户的故障(配置、验证、认证、网络、环境)与内部 Fern 错误区分开来——只有后者会转发给 Sentry。生成的输出没有变化。


4.3.0

(feat): 为请求头、查询参数和路径参数添加 clientDefault 支持。当参数具有 clientDefault 值(通过 x-fern-default OpenAPI 扩展设置)时,生成的 SDK 在调用者未提供值时使用该值作为回退。具有 clientDefault 的参数在包装的请求中变为可选的,并使用 .orElse(defaultValue) 来应用回退值。


4.2.3

(chore): 将 Gradle 基础镜像捆绑的 Bouncy Castle jar 包从 1.78.1 升级至 1.84,以解决 CVE-2026-3505(bcpg 中无界的 PGP AEAD 块大小导致预认证资源耗尽)。


4.2.2

(chore): 将 @fern-api/generator-cli 升级至 0.9.8。生成的 PR 中的更新日志 URL 现在使用提交 SHA 而不是 PR 分支名称,确保链接在分支被删除或压缩合并后仍然有效。