> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt.

# Changelog

## September 30, 2026

## 1.64.2

**`(fix):`** Return a completed HTTP response instead of discarding it when the request
context is canceled after the response has been fully received but before
it is decoded. `Caller.Call` previously re-checked `ctx.Err()` at that point
and returned `context.Canceled` / `context.DeadlineExceeded` with a nil
response, which dropped valid responses that had already been buffered (for
example by a logging `http.RoundTripper` that ends its scope before
returning). Calls canceled before the request is sent, and calls whose
response body cannot be read to completion once the context ends, continue
to fail with the context's error, and a canceled context still never
triggers a retry.

**`(fix):`** Fix undiscriminated union deserialization so JSON objects are matched to the correct object
member. Previously, the first object member always won because object `UnmarshalJSON` accepts
unknown keys and doesn't enforce required keys, so values like `{"ends_with": [...]}` were
decoded as an earlier member and silently corrupted on re-serialization. Object members
(including aliases to objects) that don't allow extra properties are now only selected when
the JSON keys are a subset of the member's properties and include all of its required
properties, and permissive object members no longer shadow a later member that matches
exactly. If no member matches exactly, object members whose required keys are present are
tried next, and the previous behavior is kept as the final fallback.

**`(fix):`** Preserve explicit `null` on optional nullable (`optional<nullable<T>>`) object
properties across a JSON decode/re-encode round trip. Previously only required
nullable properties were tracked on decode, so a response field such as
`"holder_category": null` was dropped when the value was marshaled again.
Fields absent from the input remain absent, and plain `optional<T>` fields are
unaffected. The generated `<type>RequiredNullableFields` map is renamed to
`<type>NullableFields`, and generated SDKs now include an optional-nullable
round-trip test for each affected type.

## September 29, 2026

## 1.64.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.

## September 25, 2026

## 1.64.0

**`(fix):`** Object type descriptions are now written directly above the `type X struct` declaration
so `go doc` and editors attach them to the type. Previously the comment landed above the
internal field-bitmask `var (...)` block emitted before the struct.

**`(feat):`** Fluent child methods on XML-encoded (TwiML) types (e.g. `response.Say(...)`,
`dial.AddNumber(...)`) now name the appended element and include the child type's
description in their doc comment.

## 1.63.0

**`(feat):`** Generated error types that carry a body now expose a nil-safe `GetBody()` accessor that
returns the same type as the `Body` field. This lets callers handle every status-specific
error through a single interface-based `errors.As`, e.g.
`type bodyProvider interface{ GetBody() *ErrorBody }`. Errors without a body are unchanged.

**`(fix):`** `reference.md` now documents enum-typed query parameters, headers, and inlined request body
properties (including lists of enums) with the same value types used on the generated request
structs (e.g. `[]acme.CountryCode` instead of `[]*acme.CountryCode`).

**`(fix):`** Generated request types with `date` or `datetime` properties now decode those properties
through `internal.Date` / `internal.DateTime` in `UnmarshalJSON`, matching what their
`MarshalJSON` already emits. Previously `json.Unmarshal` into such a request type rejected
date-only values (e.g. `{"start_date":"2026-01-02"}`) that the type itself had produced.
Request types without date properties are unchanged.

## 1.62.1

**`(fix):`** Point the "Neither an import path nor a module path was specified" warning at the
Go generator README in the fern monorepo; the old `fern-api/fern-go` link now 404s.

## September 24, 2026

## 1.62.0

**`(feat):`** Generate the shared `WebhooksHelper` from the API-wide `api.settings.webhook-signature`
setting in `generators.yml` (IR `sdkConfig.webhookSignatureVerification`). The helper is
emitted even when the API definition models no webhooks; webhook-specific signature
overrides still produce their own named helpers.

## September 23, 2026

## 1.61.0

**`(feat):`** Errors declared with a `4XX` or `5XX` wildcard status code are now decoded into their typed
error struct for any status in the 400-499 / 500-599 range. A concrete status code declared
alongside a wildcard always wins, and a body that fails to decode as the wildcard error's
schema still returns the untyped `*core.APIError`.

## September 22, 2026

## 1.60.2

**`(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.

## 1.60.1

**`(fix):`** `DateTime.MarshalJSON` now formats with `time.RFC3339Nano`, so fractional seconds
survive a decode/encode round-trip. Whole-second values marshal byte-identically
to before because `.999999999` omits trailing zeros.

**`(fix):`** `Date.UnmarshalJSON` now accepts date-time input (e.g. `2025-02-15T00:00:00Z`) as
a fallback, preserving the calendar date exactly as written and discarding the time.

## September 21, 2026

## 1.60.0

**`(feat):`** Add XML support for xml-encoded object types (e.g. TwiML). Generated types gain
`ToXml()`/`ToXmlElement()`, `<Type>FromXml(string)`/`<Type>FromXmlElement(...)`,
fluent child builders (e.g. `response.Say(...)`, `Add`-prefixed on collision), and
`ExtraAttributes`/`ExtraChildren` to round-trip unknown attributes and elements.
A standard-library `core/xml.go` runtime is emitted only when xml-encoded types exist.

## September 17, 2026

## 1.59.0

**`(feat):`** Generate wire tests for endpoints that return a file download (`io.Reader`). The generated
test calls the raw client, asserts the served `Content-Type`, reads the stream to completion and
compares the bytes against the fixture. The WireMock mapping for these endpoints now serves a
real binary payload (a small valid PDF via `base64Body`, `application/octet-stream`) instead of
the JSON string `""` with `Content-Type: application/json`. This also applies to OpenAPI-imported
endpoints whose only autogenerated examples are error responses (e.g. Plaid's `/asset_report/pdf/get`).

## September 14, 2026

## 1.58.1

**`(fix):`** Preserve required-nullable fields that arrive as `null` when a decoded model is
marshaled again. Generated `UnmarshalJSON` now records which required-nullable
keys were present in the incoming JSON (via a per-type wire-name-to-field-bit
table) so that `MarshalJSON` re-emits them as `null` instead of dropping them.
Fields absent from the input stay absent, and freshly constructed values
(e.g. request bodies) serialize exactly as before.

## September 10, 2026

## 1.58.0

**`(feat):`** Add the `enableNestedRequestBodyPagination` configuration option, which extends
`enableRequestBodyPagination` to page properties that live inside nested request objects, e.g.
`offset: $request.options.offset`. Such endpoints previously generated without a pager, so the
option defaults to `false` to preserve their existing return types.

```yaml
- name: fernapi/fern-go-sdk
  config:
    enableRequestBodyPagination: true
    enableNestedRequestBodyPagination: true
```

The generated pager advances the page on a copy of the request and allocates any optional
intermediate object the caller left nil (`Options: nil` and `Options: &Options{Count: &n}` both
work), across any nesting depth and through aliases to objects, without mutating the caller's
request.

## September 9, 2026

## 1.57.13

**`(fix):`** Calling a `SetXxx` setter on a value copy of a request or model type no longer
changes the JSON of the value it was copied from. The private `explicitFields`
bitmask is reached through a pointer, so a plain struct assignment aliased it and
`require` mutated it in place, making every explicit-field bit set on one copy
visible in all of them (e.g. `copied.SetOptions(...)` added `"options":null` to
the original's body). The bitmask is now replaced rather than mutated, so each
copy gets its own on first write.

## September 4, 2026

## 1.57.12

**`(fix):`** The retrier no longer waits out a `Retry-After`/backoff delay after its final
attempt. Previously the sleep happened before the attempt budget was checked,
so a client with retries disabled (or `MaxAttempts: 1`) still blocked for the
full `Retry-After` on a 429/5xx, and the default two-attempt retrier paid two
delays for one retry. Retrier exhaustion now returns immediately.

**`(fix):`** Fixed a `crypto/rand: argument to Int is <= 0` panic when a retry delay was
too small to jitter (e.g. an `X-RateLimit-Reset` timestamp only a few
nanoseconds in the future). Such delays are now clamped to the minimum retry
delay without jitter.

## 1.57.11

**`(fix):`** Fix `HandleExplicitFields` silently corrupting the JSON body of types that have
date/date-time fields. When any `SetXxx` setter was called on such a type, the
generated `MarshalJSON` wrapper (embedded struct plus date shadow fields) was not
recognized as the embed pattern, so the explicit-field bits were applied to the
wrapper's fields instead of the embedded type's fields and the embedded struct
itself was dropped from the output (e.g. `req.SetCount(&n)` produced
`{"end_date":null}` instead of `{"count":7}`). This also caused offset-based
auto-pagination to loop forever. Shadow fields are now preserved and
`omitempty` is stripped from the shadow field when the shadowed date field is
explicitly set, so `SetStartDate(nil)` emits `"start_date":null`.

## August 31, 2026

## 1.57.10

**`(fix):`** Optional idempotency headers are no longer sent with a Go expression prefix
prepended to their value. An `optional<string>` idempotency header was sent
with a literal `*` in front of the caller's value, and an
`optional<base64>` one with a literal `base64.StdEncoding.EncodeToString(`,
because the dereference/encode prefix used to build the value expression was
also interpolated into the `fmt.Sprintf` format string. Required headers were
unaffected.

## August 25, 2026

## 1.57.9

**`(fix):`** Retry backoff now waits on the request context, so a cancelled or expired
context interrupts the wait instead of sleeping through it (previously a
`Retry-After` of up to 60s could hold a call well past its deadline).

**`(fix):`** `option.WithoutRetries()` is now honored when passed to the client
constructor. Previously the flag was dropped by `NewRetrier` and only worked
per call. Request-scoped `WithMaxAttempts` still overrides it.

## August 20, 2026

## 1.57.8

**`(fix):`** Honor endpoint-level retry configuration (`x-fern-retries: { disabled: true }`, or `retries: { disabled: true }`
in a Fern definition). Endpoints that disable retries are now issued exactly once, regardless of the
client-level and per-request retry options.

## 1.57.7

**`(fix):`** Fixed generated WireMock stubs for OAuth client credentials APIs whose token endpoint is
itself marked as authenticated: the token (and refresh) endpoint stub no longer requires
an `Authorization` header, since the token request is made to obtain the token and cannot
carry one yet.

## 1.57.6

**`(fix):`** An empty string terminates cursor pagination when the cursor is a named type that resolves to an
optional string (e.g. `type Cursor = *string`), matching an inline optional string. Optionality
is now resolved through aliases, so both spellings of the same type generate the same
termination check. Required string, uuid, int, and datetime cursors are unchanged.

## 1.57.5

**`(fix):`** Fixed generated wire tests for OAuth client credentials APIs: the test client is now
constructed with client credentials so requests carry the `Authorization` header the
WireMock stubs require, instead of failing with `Header is not present`.

## 1.57.4

**`(fix):`** Fix several issues in the generated README:

* The Request Options example now renders the auth options the SDK actually
  generates (e.g., `option.WithSecret` for header auth, `option.WithBasicAuth`
  for basic auth) instead of always assuming `option.WithToken`.
* The Errors example now passes a pointer to `errors.As` so the snippet
  compiles and doesn't panic.
* The Pagination section is now emitted whenever the API has an endpoint
  with a generated paginated client, by selecting such an endpoint for the
  example, rather than relying on the default endpoint being paginated. The
  section is omitted entirely when no paginated client is generated (e.g.
  custom, URI, and path pagination), so the example no longer references an
  iterator that doesn't exist.
* The Request Options section now documents the environment variables the
  generated client reads credentials from when they aren't explicitly provided.

## August 19, 2026

## 1.57.3

**`(fix):`** Omit global headers (declared under `api.headers`) from requests when they are
left unset, instead of sending them with an empty value. This matches the
behavior of auth scheme headers, which were already guarded. This applies to
string, UUID, bytes, date, datetime, and enum headers; boolean and numeric
headers are unchanged, since `false` and `0` are meaningful values that
cannot be distinguished from an unset field. Unset UUID, date, and datetime
headers are no longer sent as `00000000-0000-0000-0000-000000000000` and
`0001-01-01` either.

## August 17, 2026

## 1.57.2

**`(fix):`** Fix JSON deserialization of `date` and `datetime` values nested in containers.
Lists, sets, and string-keyed maps of dates (including optional containers and
aliases of containers) are now unmarshaled through the internal date wrappers,
so date-only values such as `"2002-08-28"` no longer fail with
`parsing time "2002-08-28" as "2006-01-02T15:04:05Z07:00"`.

## August 14, 2026

## 1.57.1

**`(fix):`** Cursor pagination now stops when a string cursor is an empty string, in addition to null. Previously an
optional string cursor was only terminal when it was null, so an API that signals the last page with
`"next_cursor": ""` caused an extra request, or looped indefinitely when it also kept returning results.
This matches the TypeScript, Python, and C# generators. Non-string cursors (e.g. uuid, int) are unchanged.

## August 13, 2026

## 1.57.0

**`(fix):`** Snippets for examples that omit an optional request body now pass `nil` for the body
parameter instead of dropping the argument, which produced snippets that did not compile.

**`(feat):`** Add a `respectOptionalRequestBody` option. When enabled, an endpoint whose request body the API
does not require sends no body and no `Content-Type` header once the caller leaves that body out,
including when the request wrapper is passed with a nil `Body`. Examples that supply no body stop
rendering an empty body such as `Body: &acme.RefundRequest{}`. The option defaults to false, so
existing SDKs send exactly what they always have.

## 1.56.1

**`(fix):`** Fix the initial offset for `offsetSemantics: item-index`. Item-index offsets address records
rather than pages, so pagination now starts at `0` instead of `1`, which previously skipped the
first record of every collection. This applies to both query-parameter and request-body offsets.
Page-index semantics continue to start at `1`.

**`(fix):`** Fix offset pagination emitting code that does not compile. With `offsetSemantics: item-index`
and a `step`, the pager read `results` before declaring it (`undefined: results`), and the
offset increment now matches the page type (`int`, `int64`, `float64`). Endpoints whose offset
is a required (non-optional) query parameter also emitted an invalid assignment to a request
field (`request.Offset := ...`) under either offset semantics, and now seed the initial offset
from the request (`next := request.Offset`).

## 1.56.0

**`(feat):`** Add the `enableRequestBodyPagination` configuration option, which generates auto-pagination for
endpoints whose cursor or offset is a top-level request body property (e.g.
`cursor: $request.cursor`). These endpoints previously generated a regular method that returned
the response body, so the option defaults to `false` to preserve the existing return types.

```yaml
- name: fernapi/fern-go-sdk
  config:
    enableRequestBodyPagination: true
```

Pagination configured with a nested request body property (e.g. `cursor: $request.pagination.cursor`)
remains unsupported.

## August 8, 2026

## 1.55.1

**`(fix):`** Fixed WireMock stubs for wire tests of APIs with `auth: any` combining Basic and
OAuth/Bearer schemes: stubs now accept either Authorization form instead of
requiring the exact Basic header the client may not send.

**`(fix):`** Fixed generated OAuth wire tests failing to compile when the OAuth token
endpoint lives in a subpackage: the pointer helper (`String`) is now
referenced from the root package instead of the request type's package.

_Showing the 20 most recent of 228 entries. Append `/llms.txt` to the changelog URL for the complete index._