0.42.2

(fix): Endpoints now send API-, service- and endpoint-level headers whose types are literals (e.g. Accept-Encoding: literal<"gzip">). Previously these headers were silently dropped. Caller-supplied values via RequestOptions::additional_header still take precedence over the literal defaults.

0.42.1

(fix): Enable the gzip feature on the generated SDK’s reqwest dependency so that gzip-encoded response bodies are decompressed automatically. Previously, reqwest was configured with default-features = false and no compression features, so responses to requests with a spec-defined Accept-Encoding: gzip header were returned as raw gzip bytes.

0.42.0

(feat): 在生成的客户端中接入 OAuth 客户端凭证认证。当定义了 OAuth 客户端凭证方案时,生成的 ClientConfig 现在会携带解析后的令牌端点,且 HttpClient 在发起认证请求前会自动获取、缓存并刷新 bearer 令牌。此前 OAuth 脚手架虽然存在,但从未接入请求流程。

令牌交换现在遵循令牌端点所配置的请求/响应属性映射,而不再使用硬编码的 client_id/client_secret/grant_type 结构:请求体根据配置的属性名(例如 camelCase 的 clientId/clientSecret)构建,诸如 grant_type 之类的字面量属性仅在契约声明它们时才发送,访问令牌和过期时间也从配置的响应属性名中读取。

0.41.2

(fix): 为核心 as-is 模板文件添加健壮的解析链,使生成器在独立 Docker、嵌入式 CLI Docker 和 monorepo 开发布局中均能工作。支持 FERN_RUST_ASIS_DIR 环境变量覆盖。

(fix): 在生成的客户端方法名中转义 Rust 保留关键字。 名为例如”move”的端点现在生成 pub async fn r#move 而非无法解析的 pub async fn move

0.41.1

(fix): 在 cliEmbedded 模式下跳过 README、CONTRIBUTING 和 reference.md 生成。 这些独立文档需要仅在独立 Docker 镜像中可用的静态资产(features.yml、asIs/), 嵌入式 SDK crate 不需要它们。

0.41.0

(internal):SdkGeneratorCli 上暴露 generateAndReturnContext() 以供 CLI 生成器进行进程内调用。在生成完成后返回填充的 SdkGeneratorContext

0.40.9

(fix): 修复带有二进制响应的多部分文件上传端点以使用流式方法, 并修复带有查询参数的文件上传端点以绑定查询折叠的信封类型而非裸体类型。 这两个问题导致了 ElevenLabs 语音转语音等端点(多部分 + 二进制响应 + 查询参数)的 cargo 构建失败。

0.40.8

(fix): 通过对共享 serde 重命名目标的查询参数字段使用 #[serde(skip)] 代替 #[serde(skip_serializing)],修复生成的请求结构体中的 unreachable pattern 警告。

(fix): 从生成的 HTTP 客户端模板中移除未使用的 ReqwestExecutor 结构体和实现。

0.40.7

(fix): Escape Rust reserved keywords (static, override, etc.) in generated union variant constructor function names using r# raw identifier syntax. Also skip generating the catch-all unknown() constructor when a union already has a variant named “unknown” to avoid duplicate definitions.

0.40.6

(fix): Import serde::{Deserialize, Serialize} directly in environment.rs for multi-URL environments instead of relying on the crate prelude. The CLI generator embeds the SDK and replaces src/prelude.rs with a bare types-crate re-export, which dropped the serde derive macros and broke compilation with cannot find derive macro Serialize in this scope.

0.40.5

(fix): Fix error.rs failing to compile when an error body has a property whose type is a named (non-primitive) type or a non-string/non-u64 primitive (e.g. i64). Error body fields are now deserialized with serde_json::from_value into their actual Rust type (instead of always reading as_str()/as_u64()), and the crate prelude is imported when a field references a generated type so it resolves in scope. Also fixes a latent bug where errors sharing a status code all reused the first error’s body fields; each variant is now constructed with its own fields.

0.40.4

(fix): Always wrap IR-derived error fields in Option to match constructor code that assigns None for missing fields, preventing struct/constructor type mismatches. Fix thiserror format strings: {{message}}{message} so field values are actually interpolated.

(fix): Register synthesized request-envelope types for endpoints with a referenced request body AND query parameters in the model generator’s types/mod.rs. Previously these types were generated but never declared as modules, causing unresolved-type errors in the SDK crate.

0.40.3

(fix): Fix error field parsing to use camelCase JSON wire names matching REST conventions (e.g. resourceId, authType, errorId) and derive error fields from the IR type definition when available. Fix empty-body response handling: parse_response and parse_response_raw now return Ok for empty 2xx bodies (unit/HEAD/204 responses) and Err for empty 4xx/5xx bodies, preventing auth failures from being silently swallowed on the with_executor path.

0.40.2

(fix): Change RequestExecutor::execute return type from Result<Response, reqwest::Error> to Result<Response, Box<dyn std::error::Error + Send + Sync>> and add ApiError::Executor variant. This allows downstream crates (e.g. CLI glue) to inject custom executor errors without a backwards dependency on reqwest.

0.40.1

(fix): Fix compilation error where structs incorrectly derived Default when containing fields whose types extend base objects that don’t support Default (e.g., objects with required enum fields). The namedTypeSupportsDefault check now also verifies parent types via extends, not just direct properties.

0.40.0

(feat): Add RequestExecutor trait and HttpClient::with_executor() constructor to enable CLI execution-sharing. When an external executor is injected, the SDK delegates HTTP execution entirely — auth, headers, and retries are handled by the caller’s transport stack.

0.39.0

(internal): Parameterize core module path in model generator to support standalone types crate usage.

0.38.0

(feat): Support embedding as a library crate inside CLI generator output. Async command handlers, AppContext::client() returning a forward-compatible ApiClient trait, and ResolvedClientConfig for auth credential resolution.

0.37.1

(fix): Fix the root client failing to compile when root-level endpoints return Server-Sent Event streams, return binary bodies, or use query parameters. The root client now imports SseStream, ByteStream, and QueryBuilder when those endpoints are present, matching sub-client behavior.

0.37.0

(feat): Discriminated unions are now forward-compatible. Each generated enum carries #[non_exhaustive] and a final __Unknown(serde_json::Value) variant marked #[serde(untagged)]. Unknown discriminant values (e.g. variants introduced server-side after this SDK was generated) deserialize into __Unknown instead of erroring, preserving the raw JSON payload for inspection and round-trip serialization.