Skip to navigation

1.70.16

(fix): README generation in self-hosted GitHub mode can clone a private repository with a personal access token again. Upgrades @fern-api/generator-cli to 0.12.1, which also sends the token as an Authorization header. Before this, git in the generator image (libcurl 8.23+) dropped the token from the clone URL and failed with could not read Username.

1.70.15

(fix): XML (TwiML) serialization writes empty elements as <Hangup/> instead of <Hangup />, matching the legacy twilio-go output byte for byte.

1.70.14

(fix): Go dynamic snippets no longer fail with config.output.mode._visit is not a function when the generator config is plain JSON (as passed by the docs platform). The SDK version / package name helpers now switch on output.mode.type instead of calling _visit.

1.70.13

(fix): Generated Go snippets (docs snippets, reference.md, snippet.json) no longer discard the SDK call result. The snippet function now returns error, assigns _, err := client.X(...) (or err := client.X(...) for endpoints without a response body) and checks if err != nil. Uses hasResponseBody from IR 67.35.0 to tell the two method shapes apart; older IRs get _, err.

1.70.12

(fix): The generator image keeps Alpine 3.22’s libcurl (< 8.23). curl 8.23.0 strips credentials from the effective URL it reports, which made git treat every authenticated https clone as a redirect and drop the token, so README generation and GitHub output for private repositories failed inside the container with “could not read Username for ‘https://github.com‘“.

1.70.11

(fix): XML-encoded (TwiML) types are generated one file per type (e.g. twimlvoice/say.go with its say_test.go) instead of all into the package’s types.go, which grew to tens of thousands of lines for TwiML. Same package and public API; a type whose file name would collide with a file the generator writes for other purposes (types.go, client.go, doc.go, *_test.go, …) stays in types.go.

1.70.10

(fix): Generated SDKs now use reflect.Pointer instead of the deprecated reflect.Ptr alias, so go vet and golangci-lint on Go 1.26+ no longer report “Constant reflect.Ptr should be inlined”. No behavior change: reflect.Pointer has been available since Go 1.18, which generated SDKs already require (they use generics).

1.70.9

(fix): Add the xmlTextFirstBuilders option (default false) for XML-encoded (TwiML) types. When enabled, child builders take the element’s text first and functional options for its attributes — r.Say("hi", twimlvoice.WithSayVoice("alice"), twimlvoice.WithSayLoop(2)), r.Pause(twimlvoice.WithPauseLength(1)) — and the typed variant moves to AddSay(&Say{...}). Every XML type gets a <Type>Option func type and one With<Type><Attribute>(value) option per attribute, so pointer-typed optional attributes no longer need api.String(...)/&v. Also adds a generic Ptr[T any](v T) *T helper next to the existing typed pointer helpers.

1.70.8

(fix): XML (TwiML) serialization drops characters outside the XML 1.0 Char production (e.g. \x01) from text and attribute values (previously replaced with U+FFFD).

1.70.7

(fix): Multipart form requests now send enum fields as plain form values (DUE_DILIGENCE) instead of JSON-encoded strings ("DUE_DILIGENCE"), matching the other SDKs. Lists of enums are sent the same way, one plain part per value.

1.70.6

(fix): WebhooksHelper.verifyRequest now parses name=value settings headers when webhook-signature.algorithm-header sets key-id-parameter/algorithm-parameter (e.g. Twilio’s X-Twilio-Webhooks-Signature-Settings: key=<id>,algorithm=HMAC_SHA256), so the key resolver receives the bare key ID instead of key=<id>. Requires IR 67.33.0.

1.70.5

(fix): Format date and date-time path parameters before encoding them into the request URL. Previously a date path parameter was sent as Go’s default time.Time string (e.g. /schedule-by-date/2023-01-15%2000:00:00%20+0000%20UTC) instead of 2023-01-15.

(fix): Generated wire tests now expect object, map, and list query parameters in the same key[field]=value form the SDK sends, instead of comparing against "[object Object]".

1.70.4

(fix): The generated WebhooksHelper now consumes algorithm-header from api.settings.webhook-signature: a request-level verifyRequest helper reads the configured signature header first (missing or empty fails early with “could not run: missing signature header”), then the algorithm-selection header (e.g. X-Twilio-Webhook-Signature-Settings: <key_id>;HMAC_SHA256) to pick the HMAC algorithm from the configured wire values and hand the key ID to an application-supplied secret resolver. When the header is absent the configured default algorithm and the plain secret are used, so legacy auth-token flows keep working. Following VerifySignature, the Go helper reports these early failures as (false, error) rather than logging. VerifySignatureWithAlgorithm additionally accepts the configured wire values alongside the generic algorithm names.

1.70.3

(fix): Unknown JSON keys that match a declared field’s wire name case-insensitively (e.g. VALUE next to a declared value) are no longer kept in ExtraProperties when decoding, so they are not re-emitted after the declared field on encode. Case-insensitive, last-wins decoders such as Go’s encoding/json would otherwise read the re-emitted key instead of the declared field. MarshalJSONWithExtraProperties now also rejects extra properties that collide case-insensitively with a declared key. Unknown keys that don’t collide (e.g. brand_new_field) are still preserved and round-tripped.

1.70.2

(fix): SSE unions discriminated by the event: line (x-fern-discriminator-context: protocol) now parse both variant styles: envelope variants ({event, data: Payload}) are built from the data: JSON, and payload variants (the data: JSON itself) get the event: value injected as the discriminant. The event name no longer has to be repeated inside the data: JSON.

1.70.1

(fix): Fix uncompilable streaming methods when errorCodes: per-endpoint is set and the endpoint declares no specific error responses. The streaming call no longer references the global ErrorCodes variable, which is not generated in per-endpoint mode.

1.70.0

(feat): XML (TwiML) types can now carry XML comments. Comment(text) adds <!--text--> inside the element at its position in the ordered content (interleaved with AddText segments and child elements), while CommentBefore(text) / CommentAfter(text) render a comment immediately before or after the element itself (as a sibling in its parent, or around the root element after the XML declaration). Comments in parsed documents are preserved by FromXml and round-trip through ToXml; XmlElement.AddComment and the new core.XmlComment node expose the same for untyped elements.

1.69.1

(fix): Enum-typed attributes and text on XML (TwiML) types are open on the wire: FromXml keeps a value the enum does not declare (e.g. a voice added after the SDK was generated) instead of returning an error, and it round-trips through ToXml. This matches how the same enums already behave in JSON.

1.69.0

(feat): Add opt-in userAgentOnly config. When enabled, generated clients send the User-Agent header (including the structured form from includePlatformHeaders) but omit the X-Fern-Language, X-Fern-SDK-Name, and X-Fern-SDK-Version headers. Disabled by default, so existing generated output is unchanged. omitFernHeaders still takes precedence and drops the User-Agent too.

1.68.0

(feat): The generated WebhooksHelper HMAC verifier now accepts a per-call algorithm override via a VerifySignatureWithAlgorithm(...) method (VerifySignature keeps the configured default), one of sha1, sha256, sha384 or sha512. When omitted, the algorithm configured in webhook-signature is used, so existing callers are unchanged. This lets one endpoint verify both legacy HMAC-SHA1 (auth-token) and HMAC-SHA256 (shared-key) signed webhooks. The verifier also logs a warning distinguishing an early failure (missing signature header) from a failed verification (signature mismatch); it still returns false and never throws.