Changelog
0.52.0
(feat): The generated prelude now re-exports futures::StreamExt, so use <crate>::prelude::*; is enough to
iterate SSE streams and paginators without adding futures as a direct dependency.
0.51.0
(feat): Add preserveCrateNameHyphens config option (default false). When enabled, hyphens in crateName
are kept in the generated Cargo.toml package name (e.g. my-sdk instead of my_sdk), as well as in the
docs.rs link, README install snippet, and default crates.io publish package name. Rust use paths keep
the underscored name (use my_sdk::prelude::*), matching how Cargo maps hyphenated package names.
0.50.0
(feat): Add the userAgentFromPlatformHeaders config option. When it is set to true, the default
ClientConfig.user_agent uses the IR’s platform User-Agent value (<package-name>/<version>
by default, or the user-agent template from generators.yml), matching the other SDK generators.
The option defaults to false, which keeps the existing <ApiName> Rust SDK value. The Rust SDK
also falls back to <ApiName> Rust SDK when the IR has no platform User-Agent.
0.49.1
(chore): Bump bundled @fern-api/generator-cli to 0.10.3. When the hosted auto-version analysis of the
full SDK diff fails, generator-cli now retries chunk-by-chunk instead of silently applying a
PATCH bump; any remaining unavailable or incomplete analysis adds a “Version bump not verified”
notice to the SDK PR body and disables automerge.
0.49.0
(feat): Every multi-URL environment now embeds its URLs: impl Default for <Env>Urls per
environment and a constructor per environment (Environment::staging()), so selecting a
non-default environment no longer means retyping URLs from generators.yml. The README
environments snippet of a multi-URL SDK sets environment through that constructor instead
of Environment::Production.url(), which does not compile against a tuple variant.
0.48.0
(feat): Generate webhook signature verification helpers (src/webhooks.rs plus a
core::webhook_signature runtime) when the API defines HMAC-signed webhooks.
Helpers verify the configured signature header (HMAC-SHA1/256/384/512, base64 or
hex, optional prefix) with constant-time comparison, support sorted/deduplicated
form parameters, bodySHA256-style body-hash binding for JSON requests,
notification URL port/legacy-query normalization, and timestamp tolerance checks.
0.47.11
(fix): Client mod.rs files no longer emit use crate::api::*; when the glob is not
needed. Sub-client structs are already re-exported by the containing module, and
root-level endpoints only import the glob when they reference generated types.
Previously every nested resource module (and the root resources module) produced
an unused_imports warning on cargo build. Streaming (SSE and JSON-chunk)
response payloads now count as generated-type usage, so services whose only
generated type is a streamed payload keep the import they need.
0.47.10
(chore): Bump bundled @fern-api/generator-cli to 0.10.1. Auto-versioned MAJOR/MINOR bumps no longer
produce a version-only changelog.md block when the AI analysis returns an empty changelog
entry; the PR description, version bump reason, or commit message body is used instead.
0.47.9
(fix): An undiscriminated union with a single member no longer emits an unreachable
_ => None arm in its as_* / into_* accessors. That arm produced an
unreachable_patterns warning in the generated crate, which blocks users who
publish with -D warnings.
0.47.8
(fix): A request body declared application/x-www-form-urlencoded is now form-encoded
instead of being sent as a JSON document under an application/json header. Those
endpoints went through execute_request, whose .json() both serializes to JSON and
stamps the header, so neither the bytes nor the content type matched the declaration.
0.47.7
(fix): A JSON request body declared under a media type other than application/json - a
vendor type, or application/merge-patch+json - is now sent under that type instead
of application/json. execute_request calls reqwest’s .json(), which stamps
application/json over whatever the endpoint declared, so those endpoints now take a
variant that sets the header and serializes the body identically. Emitted only when an
endpoint declares such a type, so an SDK that never does is unchanged.
0.47.6
(fix): An array query parameter declared style: form with explode: false is now sent as
one comma-joined value instead of a repeated key. The IR has always carried explode
and the Rust generator read it nowhere, so every array went out exploded regardless of
what the endpoint declared. An empty array still produces no parameter.
0.47.5
(fix): Basic auth credentials are now sent. An API whose only security scheme is basic auth
generated a client that applied NO credential at all: the client-wide auth path
applied an API key and a bearer token but had no basic branch, username and
password sat unread on the config, and the one Authorization header in the
generated client was gated on config.token, which such an API never sets. Only
per-endpoint auth routing handled basic auth.
0.47.4
(fix): A string field sent alongside a file in a multipart body is now written verbatim
instead of being JSON-serialized first. serde_json::to_string wrapped it in quotes
and those quotes reached the server as part of the value, so a 13-character caption
arrived as 15. Structured parts (objects, arrays, maps) still go as JSON; numbers and
booleans were never affected.
0.47.3
(fix): A raw-bytes request body is now sent under the content type the endpoint declares
instead of always application/octet-stream. The IR has always carried it on the
bytes body, and the C#, Python and TypeScript generators already stamped it; Rust
hard-coded the header in execute_bytes_request. An endpoint that declares no
content type still sends application/octet-stream.
0.47.2
(fix): An offset-paginated endpoint’s auto-paging method now stops on a SHORT page rather than
only on an empty one. A page holding fewer items than the caller’s page size is the last
page, so treating “not empty” as “there is more” cost one wasted request against a
well-behaved server and never terminated at all against one that keeps answering.
0.47.1
(fix): An offset-paginated endpoint now sends its page-size parameter on every page request
instead of only the first. The step parameter of x-fern-pagination was being
stripped from the query along with the offset, but only the offset changes between
pages - the page size is the same on all of them and has to be sent each time.
(fix): Advance an offset by the number of items the page returned rather than by a step read
out of the response body, which was never present and so left every offset advancing
by one. Add offsetSemantics, matching the TypeScript and Python generators: the
default "item-index" advances by the page’s item count, and "page-index" advances
by one.
0.47.0
(feat): Paginated endpoints once again generate an auto-paging method. It is now emitted
ALONGSIDE the single-page method as <endpoint>_paginated rather than replacing it,
so the endpoint keeps its typed response and callers who want one page do not have
to go through a paginator.
(fix): Fix the borrow that made the paginated method fail to compile. The page loader
outlives the method call, so path and body parameters are now captured as owned
values, and the rewrite that points the loader at those captures no longer fails to
match every name.
0.46.7
(chore): Solve Default support for every type in one pass over the IR instead of walking
the type graph again for each reference. Derives are unchanged, and the answer no
longer depends on which type is analyzed first.
(fix): Index type declarations once instead of scanning every IR type on each lookup.
Generating models for APIs with thousands of types is now dramatically faster.
0.46.6
(fix): List- and set-typed path parameters are now joined instead of being interpolated
directly, so a spec with an array path parameter produces an SDK that compiles.
Previously the parameter name was passed straight to format!, which does not
compile because Vec<T> has no Display: