0.31.1
(fix): Ensure extraDependencies overrides take precedence over bundled dependency
versions. Previously, conditional bundled deps (e.g., tokio-tungstenite,
reqwest-sse) were added after user overrides, reverting pinned versions.
Extra deps are now applied last so user-specified versions always win.
0.31.0
(feat): Add maxRetries custom config option to override the default maximum
number of retries for failed requests. The default remains 3 when not
specified.
0.32.0-rc.0
(feat): Upgrade to IR v66 which compresses the IR Name type, reducing IR size and increasing performance.
0.30.2
(fix): Fix dynamic snippet generation for bytes endpoints with query parameters
to use the request struct instead of positional arguments.
0.30.1
(fix): Generate request structs for bytes (octet-stream) endpoints with query
parameters, replacing positional arguments with a single struct that
bundles the raw body and all query params with a builder pattern.
0.30.0
(feat): Overhaul WebSocket reconnection: exponential backoff with jitter, auto-reset
of retry counter after 5s of stable connection, and message queuing during
reconnect (text and binary messages are buffered and flushed after reconnection
instead of erroring).
(feat): Add DisconnectInfo struct to WebSocketMessage::Close, exposing the close
code and reason string from the server. recv() now returns None on close
frames to signal end-of-stream.
(feat): Generate typed ConnectOptions structs for WebSocket channels with query
parameters, replacing positional &str arguments with a #[derive(Default)]
struct that supports ..Default::default() ergonomics. Uses QueryBuilder
under the hood, matching the HTTP endpoint pattern.
(feat): Support custom connect and message method names from the IR
(channel.connectMethodName, msg.methodName), falling back to connect
and send_{name} respectively.
(feat): Add generateWebSocketClients config alias alongside enableWebsockets,
matching the TypeScript/Python/Java generator config key.
(feat): Route each WebSocket connector through the correct environment URL method
in multi-URL APIs (e.g., Deepgram’s wss://agent.deepgram.com vs
wss://api.deepgram.com).
(feat): Add Unknown(serde_json::Value) catch-all variant to generated
ServerMessage enums for forward compatibility with new server message types.
(feat): Graceful WebSocket close: sends Close frame and waits up to 5s for the
server’s response, with double-close guard.
(fix): Change implicit auth parameter from required &str to Option<&str>,
conditionally injecting the Authorization header only when a token is provided.
(fix): Fix connector auth forwarding for APIs with explicit Authorization headers
(e.g., Deepgram) — the connector now correctly unwraps the Option to match
the client’s &str parameter type.
(fix): Fix recv() on JSON-only channels to return an error with frame size on
unexpected binary frames instead of silently skipping them.
(chore): Derive channel names from the channel path instead of the channel ID, moving
version segments to suffix position (e.g., /v1/agent/converse →
AgentConverseV1Client).
(fix): Replace #[serde(untagged)] derive on ServerMessage enums with a custom
Deserialize impl that uses round-trip scoring. Fixes silent mismatches
where #[serde(default)] on struct fields caused every variant to match,
always returning the first.
(chore): Introduce ReconnectContext struct to group reconnection state, replacing
8 separate Arc-wrapped parameters in read_loop and try_reconnect.
(fix): Fix try_reconnect to retry with exponential backoff up to
max_reconnect_attempts, instead of giving up after a single failed attempt.
(fix): Fix flush_queues to preserve messages on send failure by cloning before
sending and pushing back to the front of the queue on error.
(chore): Remove dead parse_websocket_message function and unused
serde::de::DeserializeOwned import from WebSocket client infrastructure.
(fix): Fix wire test generator to set config.environment = None for multi-URL
APIs so requests route to the WireMock server instead of real API endpoints.
(fix): Fix number_serializers unit test assertion to use 1e+20 matching Rust’s
serde_json exponent formatting.
(fix): Fix WebSocket connectors to support api_key auth in addition to bearer
token. The connector now receives a pre-computed Authorization header value
from the root client, using the IR’s api key prefix (e.g., Token) with
api_key taking priority over token, matching the HTTP client’s behavior.
What’s new
- This is a breaking change for any code that previously passed query
parameters as positional arguments to
connect().
0.29.0
(feat): Add per-endpoint URL resolution for multi-URL environments. Each endpoint
now resolves its base URL at call time from the environment object, matching
the Python and Java SDK approach.
(feat): Generate ApiClientBuilder from code instead of a static template, enabling
environment-aware builder methods for multi-URL APIs.
(feat): Add per-base-URL getter methods on the Environment enum (e.g.,
api_url(), agent_url()) for multi-URL environments.
(feat): Add Option<Environment> field to ClientConfig for multi-URL environments
to support per-endpoint URL resolution.
(feat): Add base_url(), config(), execute_request_with_base_url(), and
execute_stream_request_with_base_url() accessors to HttpClient for
multi-URL endpoint resolution.
(chore): Remove construction-time URL override from RootClientGenerator; all
sub-clients now receive config.clone() uniformly.
0.28.0
(feat): Add number_serializers module that serializes whole-number f64 values
without trailing .0 (e.g., 24000.0 serializes as 24000). Some APIs
reject the decimal representation for integer-valued numbers. Includes
range validation to prevent incorrect values for numbers outside i64 range.
(feat): Add execute_bytes_request HTTP client method for endpoints with
application/octet-stream request bodies, sending raw bytes instead of
JSON-encoding them.
(feat): Support API key prefix from IR auth schemes. When a prefix like Token
or Bearer is configured, the generated HTTP client prepends it to the
API key header value.
(fix): Refactor query parameters on file-upload and inlined request bodies to be
sent as URL query strings instead of being serialized into the request body.
Query param fields are now marked with #[serde(skip_serializing)].
(fix): Fix redundant #[serde(skip_serializing_if = "Option::is_none")] and
#[serde(skip_serializing)] on optional query param fields. Only
skip_serializing is now emitted.
(chore): Conditionally include number_serializers.rs only when the IR uses
float/double types, consistent with other serializer modules.
(chore): Replace unsafe type cast on auth schemes with proper
FernIr.AuthScheme._visit() pattern matching.
(chore): Upgrade IR SDK from v61 to v65.
0.27.2
(fix): Fix dynamic snippet generation for extended objects with additionalProperties.
The convertExtendedObject code path now passes useDefault to structConstruction,
ensuring ..Default::default() is emitted for types like AchSetup that have an
extra: HashMap<String, serde_json::Value> field. Also skips optional fields without
values when useDefault is true, producing cleaner output.
0.27.1
(chore): Pretty-print generated wiremock-mappings.json with 2-space indentation
to reduce diff sizes on subsequent SDK generations.
0.27.0
(feat): Add Environments section to generated README showing how to select
different environments (production/sandbox) when initializing the client.
0.26.7
(fix): Thread endpoint ID through dynamic snippet generator to differentiate
generated snippets by endpoint.
0.26.6
(chore): Make multi-variant enums forward-compatible by default with __Unknown(String) catch-all,
matching C#/TypeScript behavior. Single-variant enums (type discriminants used in
#[serde(untagged)] unions) remain strict to preserve correct variant dispatch.
Additionally, generate #[serde(flatten)] pub extra: HashMap<String, serde_json::Value>
on structs with extraProperties to capture unknown fields from the server.
0.26.5
(chore): Remove Default impl from ApiClientBuilder to improve forward compatibility.
The ..Default::default() spread pattern on builder types can silently swallow
new required fields added in future versions. Removing Default ensures that
consumers are guided by the compiler to handle any new fields explicitly.
Updated README WebSocket snippets to use explicit ClientConfig construction
instead of the ..Default::default() spread.
0.26.4
(chore): Add Default implementation for ApiClientBuilder and update README snippet generation
to use a simpler struct-based client initialization pattern with ClientConfig { token: ..., ..Default::default() }.
0.26.3
(fix): Skip the Sec-WebSocket-Protocol header in WebSocket connections. This header is
reserved for RFC 6455 subprotocol negotiation and is handled internally by tungstenite.
Previously, including it as a regular HTTP header caused tungstenite to fail the
handshake when the server didn’t echo it back.
0.26.2
(chore): Include all optional fields as Option<T> parameters in convenience constructors.
Previously, {variant}_with_{field} constructors only accepted the promoted field and
defaulted all other optional fields to None. Now they accept all other optional fields
as Option<T> parameters, giving callers full control over all fields. For example,
assistant_with_tool_calls now accepts (content: Option<Content>, ..., tool_calls: Vec<ToolCall>)
instead of just (tool_calls: Vec<ToolCall>).
0.26.1
(fix): Fix convenience constructors for union variants whose optional fields have nested
optional/nullable IR wrappers (e.g. optional<nullable<string>> from OpenAPI).
Previously only one layer was unwrapped, leaving the parameter as Option<T> instead
of T, which caused E0308 mismatched types compilation errors. Now all
optional/nullable layers are stripped to produce the correct bare type.
0.26.0
(feat): Generate convenience constructors for discriminated union variants with optional fields.
For each optional field in an inlined variant, a {variant}_with_{field} constructor is
generated that accepts the field as a required parameter (unwrapped from Option<T>) while
defaulting all other optional fields to None. For example, an Assistant variant with
optional tool_calls now gets an assistant_with_tool_calls(tool_calls: Vec<ToolCall>)
constructor.
0.25.1
(fix): Stop generating empty HTTP client stubs for WebSocket-only subpackages. When an AsyncAPI
channel creates a subpackage with no HTTP endpoints (e.g., realtime, tts), the generator
no longer emits redundant empty client structs in resources/. The actual WebSocket
functionality remains in src/api/websocket/ via the WebSocketChannelGenerator. This
removes confusing name collisions between the empty HTTP-based RealtimeClient in resources
and the functional WebSocket-based RealtimeClient in the websocket module.
(fix): WebSocket connector now always auto-injects the Authorization header from the stored
client token, matching the TypeScript SDK experience where client.realtime.connect()
works without manually passing auth. Previously, channels with an explicit Authorization
header in the AsyncAPI spec required users to pass the token themselves.
0.25.0
(feat): Improve undiscriminated union design with snake_case method names, better variant naming,
deduplicating type references, and more.
0.24.1
(fix): Fix mod.rs module declarations not being removed for types inlined into discriminated
union variants. The generator was deleting the struct files for inlined types but still
emitting pub mod and pub use declarations for them, causing error[E0583]: file not found for module compilation errors in generated SDKs.
0.24.0
(feat): Improve discriminated union design with inlined variants and constructors. When an inner
type is only referenced by a single union variant, its fields are now inlined directly into
the enum variant instead of using a wrapper struct with #[serde(flatten)]. All enum
variants now include #[non_exhaustive] for forward compatibility, and constructor methods
are generated for every variant (required since #[non_exhaustive] prevents direct
construction outside the crate). Empty variants use struct syntax (Variant {}) instead
of unit syntax.
0.23.0
(feat): Generate builders for all struct types. The builder pattern is inspired by
other popular Rust SDKs (e.g. AWS), so that users now have the option between the
following:
- The explicit constructor pattern (i.e. specify
Nonevalues for optional fields). - The
..Default::default()spread when a type has many optional fields. - The builder pattern when a type has many optional fields and cannot support the
..Default::default()approach.