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.
0.22.1
(fix): Fix double-pin compilation error in SseStream timeout implementation. The deadline
field was declared as Pin<Box<tokio::time::Sleep>> with a #[pin] attribute, causing
pin_project to produce Pin<&mut Pin<Box<Sleep>>> which lacks reset() and poll()
methods. Changed the field type to tokio::time::Sleep (unpinned, letting pin_project
handle pinning) so the projected type is Pin<&mut Sleep> which correctly exposes
the required methods.
0.22.0
(feat): Add per-event timeout to SSE stream methods. The SseStream now accepts a timeout
duration and yields ApiError::StreamTimeout if no event is received within that
period. The timeout is derived from RequestOptions.timeout_seconds (per-request)
or ClientConfig.timeout (client-level), preventing indefinite blocking when the
server stops sending events.
0.21.0
(feat): Add forward-compatible enum support. When forward-compatible: true is set on an enum
type, the generated Rust enum includes a #[non_exhaustive] attribute, a hidden
__Unknown(String) variant for unrecognized values, and custom Serialize/Deserialize
implementations that gracefully handle unknown enum values from the server.
0.20.4
(fix): Derive Default on request body types (inlined and query-parameter requests) when all
fields have types that implement Default in Rust, not only when all fields are Option<T>.
Previously, a request like ChatRequest { stream: bool, ... } would not get Default
because bool is not Option, even though bool implements Default. Now the generator
uses the same canDeriveDefault() logic already used for model structs.
0.20.3
(fix): Fix dynamic snippets and wire tests generating Some(Some(value)) for optional+nullable
fields. Since Type.option() now collapses Option<Option<T>> to Option<T>, the
literal mapper must also collapse nested optional/nullable wrapping to produce Some(value)
instead of Some(Some(value)).
0.20.2
(fix): Fix inlined request type documentation to use the schema-level description from the
OpenAPI spec instead of a generic fallback. Previously, all inlined request types used
the same Request type for API operation docstring. Now, the actual schema description
is propagated and used when available.
0.20.1
(fix): Fix unexpected_cfgs warnings for multipart and sse features by conditionally including
the execute_multipart_request and execute_sse_request methods in http_client.rs only when
the corresponding features are needed. Also fix unused Utc import in query_parameter_builder.rs
and unused SerdeError import in http_client.rs.
0.20.0
(feat): Reduce dependency footprint by conditionally including dependencies based on IR usage.
Dependencies like chrono, uuid, num-bigint, ordered-float, and base64 are now only added
to Cargo.toml when the corresponding types are actually used in the API spec. Associated
as-is files (flexible_datetime.rs, base64_bytes.rs, bigint_string.rs) and their module
declarations are also conditionally included. Template files for query_parameter_builder.rs,
http_client.rs, and prelude.rs use template variables to omit unused code sections.
0.19.11
(fix): Use &str instead of &String in generated method signatures, union getter methods,
and undiscriminated union accessor methods. &str is more idiomatic Rust and more
flexible, accepting both &String and string literals.
0.19.10
(fix): Replace unwrap_or_default() with proper error propagation via map_err(ApiError::Serialization)?
when serializing request bodies with serde_json::to_value. Previously, serialization failures
were silently swallowed and replaced with a default JSON null value. Now they correctly return
an ApiError::Serialization error to the caller.
0.19.9
(fix): Fix undiscriminated union variant naming for container types with primitive inner types.
Previously, variants like Vec<f64> produced index-based names (e.g. List1). Now they
derive meaningful names from the inner type (e.g. DoubleList). Also applies to set, map,
optional, and nullable containers.
0.19.8
(fix): Fixes an issue where redundant, duplicative Option<T> type references were generated.
0.19.7
(fix): Add root-level service endpoint support on the main client struct. WebSocket
connectors now support implicit Bearer auth, auto-injecting the token from
ClientConfig when no explicit Authorization header is defined.
0.19.6
(fix): Handle empty HTTP response bodies by returning an ApiError::Http instead of
attempting JSON deserialization. Normalize HTTP(S) URLs to WS(S) schemes for
WebSocket connections. Switch WebSocket server message enums to untagged serde
representation.
0.19.5
(fix): Fix unresolved import error when WebSocket channels exist in the API spec but
enableWebsockets is not enabled. The root client no longer emits
use crate::api::websocket::... imports when WebSocket generation is disabled,
preventing compilation failures on generated SDKs.
0.19.4
(fix): Handle bytes endpoints, query name collisions, and WireMock mapping fixes
for wire test generation. Bytes endpoints with query params now generate
individual parameter arguments instead of a struct. Query request type names
include subpackage prefixes when collisions exist. WireMock mappings strip
.000 milliseconds from datetime strings and add fallback mappings for bytes
endpoints. Allow-multiple query parameters are now correctly wrapped in list types.
0.19.3
(chore): Add concurrency configuration to generated CI workflow with cancel-in-progress: false
to prevent stacked runs from being cancelled when a newer run starts.
0.19.2
(fix): Re-throw errors after logging for README.md and reference.md generation failures.
Documentation generation errors now break the generation flow so they are treated
as important to fix.
0.19.1
(fix): Improve error logging for README.md and reference.md generation failures.
The generator now logs the actual error message and stack trace instead
of crashing the entire generation, making it easier to diagnose issues.
0.19.0
(feat): Add WebSocket connector pattern and README code snippets when enableWebsockets: true.
WebSocket channels are now accessible through the root client via connector structs
(e.g., client.realtime.connect(...)) matching Python and Java generator patterns.
Generated README includes a Websockets section with connect, send, receive, and close examples.
0.18.3
(fix): Fix duplicate module declarations and WebSocket type name collisions when multiple
subpackages (e.g., HTTP REST and AsyncAPI WebSocket) map to the same namespace. Deduplicates
pub mod declarations, client re-exports, and doc comments. WebSocket channel generators
now use collision-aware type names (e.g., AuthResponse2 instead of AuthResponse) to
correctly reference disambiguated types in the trading namespace.
0.18.2
(fix): Fix Rust module naming collision when a subpackage has children that share the same
directory name as the parent’s client file. Previously, both X.rs and X/mod.rs could
be generated in the same directory, causing rustfmt errors like “file for module found
at both”. Now the client code is inlined into the unified mod.rs when any children exist,
and child re-exports are only emitted for subpackages with services or endpoints.
0.18.1
(fix): Escape Rust reserved keywords (e.g., type, match, self) when used as path parameter
names in generated client methods. Previously, reserved keywords like type were emitted
as-is, causing rustfmt and compilation failures. Now they are properly escaped with the
r# prefix (e.g., r#type).
0.17.4
(chore): Standardize WireMock configuration to use WIREMOCK_URL environment variable
(e.g., http://localhost:8080) instead of a hardcoded constant. Docker Compose
now uses dynamic port mapping (0:8080) to avoid port conflicts when running
multiple SDK tests in parallel. The start_wiremock function discovers the
assigned port and sets WIREMOCK_URL automatically. Falls back to
http://localhost:8080 if the variable is not set.