1.42.3
(chore): Bump Node.js base image from 24.15 to 24.16.
(chore): Bump Node.js base image from 24.15 to 24.16.
(feat): Expose Stream[T].LastRetryMs() on the SSE runtime, mirroring LastEventID().
It returns the most recently advertised retry: reconnection time in
milliseconds (sticky per the SSE spec), so callers can read the directive
even when the server sends it in its own frame with no data: — in which
case the per-event StreamEvent.Retry is 0. The value persists across
reconnects.
(fix): Generated wiremock-mappings.json now matches nullable date-time query and header parameters with millisecond precision so the stub matches what the Go SDK actually sends. Previously, when a date-time field was wrapped in a nullable container (e.g. with respect-nullable-schemas: true and coerce-optional-schemas-to-nullable: true), the stub matcher used "2024-01-15T09:30:00Z" while the SDK serialized "2024-01-15T09:30:00.000Z", causing WireMock to return 404.
(fix): Fix dynamic snippet generation for enum path parameters. Path parameters inlined as
struct fields on a wrapped request now use the enum value directly (e.g.
Action: prelude.ActionAllow) instead of .Ptr(), which produced a typecheck error
when the struct field is a non-pointer required enum. Path parameters passed as
positional function arguments continue to use .Ptr() when the SDK signature takes
a pointer.
(feat): Add streaming reconnect options on every Go SDK request:
option.WithMaxStreamReconnectAttempts(uint), option.WithoutStreamReconnection(),
and option.WithoutRetries().
For SSE endpoints whose Fern definition sets response-stream.resumable: true
(or whose OpenAPI sets x-fern-streaming.resumable: true), the generated
streaming methods now reconnect transparently on mid-stream connection drops
using SSE Last-Event-ID semantics, honoring server-sent retry: directives
and capped by MaxStreamReconnectAttempts (default 5).
No behavior change for endpoints that do not opt into resumable: true. The
new option constructors are emitted unconditionally and have no effect on
those endpoints.
(fix): Dynamic snippets now render path-parameter arguments in IR (URL / SDK signature) order
rather than in the order they happen to appear in the input request, so generated
examples line up with the actual SDK method signature even when the spec lists path
parameters in a different order.
(chore): Patch /usr/local/go/src/go.mod, vendor/modules.txt, and go.sum in
the go-sdk + go-model containers so they declare golang.org/x/net v0.53.0. Go 1.26.3 already ships the CVE-2026-33814 fix in its bundled
h2_bundle.go (the HTTP/2 SETTINGS_MAX_FRAME_SIZE validation moved to
the top of ForeachSetting), but the stdlib SBOM still pins the
pre-fix x/net pseudo-version v0.47.1-0.20260417*. Bumping the SBOM
metadata to v0.53.0 makes grype reflect the patched code instead of
flagging the toolchain as vulnerable.
(fix): Stop launching WireMock with --global-response-templating in generated
wire-test docker-compose.test.yml. Response examples containing literal
{{...}} are now served verbatim instead of being passed through
WireMock’s Handlebars transformer, which would fail to resolve them as
helpers and return 500.
(chore): Patch Go SDK + Go model generator container CVEs flagged in the AWS ECR /
grype scan. Bump the Go base image to golang:1.26.3-alpine3.23, refresh
apk upgrade, and patch npm’s bundled picomatch@4.0.3 -> 4.0.4 and
brace-expansion@5.0.4 -> 5.0.5 via tarball replacement so the published
image no longer ships the vulnerable bundled JS dependencies that grype
flags. Also drop the internal/testdata/** test fixtures and clear the
/go/pkg/mod + /root/.cache/go-build build caches from the runtime
image so grype no longer scans them as a source of stale yaml.v3 and
golang.org/x/net pseudo-versions that are not actually linked into
/fern-go-sdk.
(feat): Add a With<AuthToken>Func option for bearer auth that accepts a func() (string, error) callable.
The callable is evaluated at request time when no static token is set, matching the callable
auth behavior available in the Python and TypeScript SDK generators.
(chore): Bump the Go SDK and Go model generator containers’ Node base image from
node:22.22-alpine3.23 to node:24.15-alpine3.23. Aligns the generators
with the rest of the Fern generator containers on a single Node major
version (Node 24) and picks up Node 24’s CVE patches. The existing
npm pack <pkg>@latest loop that swaps in patched ip-address,
brace-expansion, and picomatch is retained because npm pack @latest
continues to resolve the same fixed releases on Node 24.