2.66.0

(feat): Add a default-timeout-in-seconds config option to the C# SDK generator. When set, the generated ClientOptions.Timeout defaults to the configured value (or Timeout.InfiniteTimeSpan when set to "infinity") instead of the previously hardcoded 30 seconds. SDK users can still override the timeout per-request via RequestOptions.Timeout.

(feat): Add an opt-in user-agent-name-from-package custom config option. When set to true, the generated client falls back to a <NuGetPackageId>/<version> User-Agent header when no platformHeaders.userAgent is set in the IR (e.g. for SDKs imported from OpenAPI), matching the TypeScript generator’s npm-package-name fallback. Defaults to false, preserving the existing behavior of emitting no User-Agent header in that case.


2.65.2

(chore): Bump generator container Node.js base image to node:22.22-alpine3.23 and apply latest Alpine package security updates at build time.

2.65.1

(chore): Patch the C# SDK generator container to remediate the 40 vulnerabilities reported by the 2026-05-06 grype scan. Bump the Node.js base image to 22.22.2-alpine3.22 (fixes Node binary CVEs and upgrades npm-bundled cross-spawn, minimatch, glob, tar, and diff), remove the unused PowerShell install bundled with dotnet/sdk:10.0-alpine to drop the vulnerable System.Security.Cryptography.Xml 10.0.5 DLL flagged by GHSA-37gx-xxp4-5rgx and GHSA-w3x6-4m5h-cxqf, run apk upgrade to pick up the nghttp2-libs CVE-2026-27135 fix, and patch npm’s bundled ip-address (10.1.1), picomatch (4.0.4), and brace-expansion (2.0.3).


2.65.0

(feat): Generate CONTRIBUTING.md for C# SDKs, matching the pattern used by the TypeScript generator. The file is skipped for whitelabel SDKs.

2.64.2

(fix): Dedup auth-derived headers in the generated client constructor when multiple auth schemes resolve to the same HTTP header name (for example, an oauth2 bearer scheme plus an apiKey-in-header scheme both named Authorization). Previously the constructor’s Dictionary<string, string> collection initializer added the same key twice and threw System.ArgumentException: An item with the same key has already been added at runtime. Earlier auth schemes win, preserving the ordering established by the IR.

(fix): Fix literal boolean auth-header values being emitted as "True" regardless of the configured value. The generated client constructor’s auth-header dictionary tested the truthiness of the Literal discriminated-union object instead of reading its boolean field, so a literal false header incorrectly produced "True".


2.64.1

(fix): Fix namespace collision when referencing nested discriminated union variant types in generated test code. When the enclosing type name matches a segment of the test file’s namespace, the C# compiler resolves it as the namespace instead of the SDK type (CS0234). Now emits fully qualified type references in this case.

(fix): Fix OneOfSerializer to prefer strongly-typed deserialization over catch-all matches. When a discriminated union type inside a OneOf uses a catch-all for unknown discriminators, the serializer now tries all types and selects the best match instead of returning the first success.

(fix): Fix serialization round-trip tests to account for WhenWritingNull normalization. The Roundtrips test now verifies idempotency of the serialized form rather than comparing against the raw input JSON, which may include null optional properties that are intentionally omitted by the serializer.

2.64.0

(feat): Add retryStatusCodes config with "legacy" and "recommended" modes. Legacy (default) preserves current behavior (408, 429, >= 500). Recommended retries only transient codes (408, 429, 502, 503, 504), avoiding idempotency issues with 500. A 3.0.0 migration auto-pins legacy for upgrading users.

2.63.3

(fix): Fix dynamic snippets emitting wrong property name when PascalCase(property) collides with class name (e.g. CatalogV1Id.catalog_v1_id). The snippet generator now uses the same rename logic as the SDK (appending ”_”) so that generated examples compile without CS0542 / CS0117 errors.


2.63.2

(fix): Fix multi-value query parameter snippets when the example value is already a list, which previously produced uncompilable list-of-list initializers like [new List<T>() { value }] in mock server tests, reference docs, and snippets.

2.63.1

(fix): Fix WireMock test generation to use percent-encoded query parameter keys, matching what spec-compliant HTTP clients send. Also split comma-delimited query parameter examples into multiple values in a single WithParam() call, since WireMock.Net parses comma-separated values into arrays.


2.63.0

(feat): Support x-fern-default as fallback value for parameters in generated C# SDKs. When a header, query parameter, or path parameter has a clientDefault value in the IR, the generated C# SDK makes that parameter optional with the default value automatically applied.


2.62.0

(feat): Use auth scheme placeholder values in snippets when configured via placeholder field on auth schemes.


2.61.2

(chore): Bump @fern-api/generator-cli to 0.9.11. The GitHub pipeline step now creates signed commits via the GitHub REST API (matching fiddle’s legacy InMemoryGitRepo push path), restoring verified fern-api[bot] commits on replay-enabled orgs.

2.61.1

(fix): Emit a Body property of type System.IO.Stream on wrapped request records for endpoints whose request body is bytes. Previously the endpoint client method emitted Body = request.Body but the generated request record did not declare a Body property, producing a CS1061 compile error on any endpoint that combined a binary body with other wrapped parameters (e.g. query parameters, headers, or path parameters).

2.61.0

(feat): Add offset-semantics config option. When set to "page-index", offset pagination increments by 1 each page instead of by the number of items returned ("item-index", the default).

2.60.2

(chore): Add crash reporting via Sentry to the generator runtime, and classify thrown errors using the new shared GeneratorError taxonomy so user-facing failures (config, validation, auth, network, environment) are kept distinct from internal Fern bugs — only the latter are forwarded to Sentry. No change to generated output.


2.60.1

(chore): Bump @fern-api/generator-cli to 0.9.8. Changelog URLs in generated PRs now use the commit SHA instead of the PR branch name, keeping the link valid after the branch is deleted or squash-merged.


2.59.6

(fix): Add domain-specific event properties (e.g. AssistantMessage, ChatMetadata, AudioOutput) and UnknownMessage to the generated WebSocket client interface. Previously, these events were only available on the concrete class, forcing consumers to downcast from the interface type to access them.

2.59.5

(fix): Skip mock server test examples with empty string path parameters. An empty path parameter causes the mock server to register a collapsed URL (e.g. /v0/tools/version/1) while the SDK client sends a double-slash URL (e.g. /v0/tools//version/1), resulting in a 404 from WireMock.

(fix): Fix dynamic snippet generation for literal types when generate-literals (or experimental-readonly-constants) is enabled. Inline literal properties now correctly omit the value (relying on the = new() default initializer), and named literal alias types emit new TypeName() instead of a raw string, preventing CS0029 compilation errors.

(fix): Fix file upload request properties declared as list<file> generating a single FileParameter field instead of List<FileParameter>.

2.59.4

(fix): Add GetSingle() fallback to JsonElementComparer number comparison. When two JSON numbers differ as decimals but match as singles, they represent the same float32 value and are now considered equal. This fixes mock server test failures for fields declared as format: float where C#‘s System.Text.Json serializes System.Single with a shorter decimal representation than the original JSON string (e.g. 0.10722749680280685 vs 0.1072275).