2.30.3
(fix): Add better support for the google.rpc.Status type, and stop
generating redundant wrapper types for google.api and
google.rpc types.
2.30.2
(fix): Fix gRPC code generation to support enums with numeric identifiers.
2.30.1
(fix): Fix gRPC code generation to support enums with numeric identifiers.
2.30.0
(feat): Add sln-format configuration option. Set to "sln" to generate both a legacy
.sln solution file and the modern .slnx file. The default value "slnx" generates
only the .slnx file. This is useful for teams that need compatibility with older
.NET tooling or CI systems that do not yet support the .slnx format.
2.29.0
(feat): Rework enum JSON serialization to eliminate reflection. Each enum now gets
a generated serializer with static dictionary lookups instead of the generic
EnumSerializer<T> / StringEnumSerializer<T> that used Enum.GetValues,
GetField, GetCustomAttributes, and Activator.CreateInstance at runtime.
Serializer initialization is ~1,000x faster (18 ns vs 18 us) and allocates
160x less memory; steady-state throughput is unchanged. The generated code is
also NativeAOT and IL-trimming compatible.
2.28.0
(feat): Generate a separate WireMock server for each test fixture instead of sharing
a single global server across all mock server tests. Each test class now starts
and stops its own WireMockServer in [OneTimeSetUp]/[OneTimeTearDown],
and test fixtures are annotated with [Parallelizable(ParallelScope.Self)]
so NUnit can run them in parallel.
2.27.1
(fix): Fix retry test assertions to match the SDK’s indented JSON serialization.
2.27.0
(feat): Improve gRPC code generation with the following:
- Updated enum representation and .ToProto + .FromProto mappers.
- Fix an issue with rendering the gRPC client reference.
- Update protoc-gen-openapi to unwrap synthetic oneof types (re: https://github.com/fern-api/protoc-gen-openapi/releases/tag/v0.1.7)
2.26.0
(feat): Add omit-fern-headers configuration option. When enabled, Fern platform headers
(X-Fern-Language, X-Fern-SDK-Name, X-Fern-SDK-Version, User-Agent) are omitted
from generated SDK requests.
2.25.0
(feat): Add generate-literals configuration option. When enabled, string and boolean
literal properties emit a self-contained readonly struct with a built-in
JsonConverter instead of using a string property with an Assert setter.
The struct type validates the literal value at the JSON deserialization boundary
and supports implicit conversion to string or bool.
The previous experimental-readonly-constants option is now deprecated and
will log a warning when used. Use generate-literals instead.
2.24.5
(chore): Add concurrency configuration to generated CI workflow with cancel-in-progress: false
to prevent stacked runs from being cancelled when a newer run starts.
2.24.4
(fix): Fix dynamic snippet generation for undiscriminated unions when use-undiscriminated-unions: true
is set. Previously, snippets always emitted OneOf<A, B, C> regardless of the config setting.
Now, when the setting is enabled, snippets use the SDK’s generated union wrapper type (e.g.
MixedType) instead, matching the actual SDK types and producing compilable code.
2.24.3
(fix): Re-throw errors after logging for README.md and reference.md generation failures.
Documentation generation errors now break the generation flow so they are treated
as important to fix.
2.24.2
(fix): Fix dynamic snippets to include global headers in generated code examples.
Previously, required global headers (e.g., X-Organization-ID) configured via
x-fern-global-headers were missing from dynamic snippet output. Also fixes
header value lookup to use wire values instead of a non-existent property.
2.24.1
(chore): Improve error logging for README.md and reference.md generation failures.
The generator now logs the actual error message and stack trace instead
of a generic “this is OK” message, making it easier to diagnose generation issues.
2.24.0
(feat): Upgrade IR SDK from v62 to v65. Adds support for dateTimeRfc2822 primitive,
validation on LongType, and uri/path pagination types (currently skipped
with a warning as they are not yet fully supported in C#).
2.23.12
(chore): Parallelize endpoint snippet generation in populateSnippetsCache(). All
endpoints are now processed concurrently via Promise.all instead of
sequentially, reducing snippet generation time for large APIs.
2.23.11
(chore): Remove unnecessary NuGet package restore from the generator Dockerfile.
NuGet packages are not needed at generation time since the generator only
writes files and runs csharpier; no dotnet restore occurs during generation.
2.23.10
(chore): Optimize context construction performance: replace expensive O(n) string
split/filter/join in ModelNavigator’s tree indexing with O(1) incremental
path building, skip recursion into name-casing variant branches that only
contain primitive values, and lazily initialize the CsharpFormatter so
the csharpier tool path is only resolved when formatting is actually needed.
2.23.9
(chore): Sync and cache NuGet dependencies across all C# Dockerfiles. Updates test
framework packages to match generated SDK versions and adds NuGet restore
caching to the generator Dockerfiles.
2.23.8
(chore): Reduce dotnet CLI process spawns during project setup by generating
the .slnx solution file and test project reference directly as
templates instead of invoking 5 separate dotnet CLI commands
(dotnet new sln, dotnet sln add ×2, dotnet remove reference,
dotnet add reference). This eliminates ~5-10s of cold .NET CLI
startup overhead per generation run.
2.23.7
(chore): Parallelize file writes during project persistence using batched concurrency
(100 files per batch via Promise.all), significantly reducing generation time
for large projects with thousands of files.
2.23.6
(fix): Refactor HeaderValue to use a single Func<ValueTask<string>> resolver
instead of string-based type discrimination with unchecked casts. The old
static factory methods (FromString, FromFunc, FromValueTaskFunc,
FromTaskFunc) are retained (without deprecation) for backwards compatibility.
2.23.5
(fix): Pass cancellation token to ReadAsStringAsync() calls in generated endpoint methods,
ensuring cancellation is respected during response body reading. A polyfill extension
method is included for target frameworks older than .NET 5 where the overload is not
natively available.
2.23.4
(chore): Remove unused using System.Text.Json.Serialization import from StringEnum.cs.
2.23.3
(fix): Remove duplicate WithRawResponse<T> and WithRawResponseTask<T> structs
from the internal Core namespace. These types were already generated in the
public root namespace (via Core/Public/), making the Core/ copies redundant.
2.23.2
(fix): Fix incorrect XML doc comment on MaxRetries property in ClientOptions,
RequestOptions, and IRequestOptions. The summary previously read
“The http client used to make requests.” (copy-paste from HttpClient)
and now correctly reads “The max number of retries to attempt.”
(fix): Add missing readonly modifier to _client field in generated sub-clients.
The root client already had private readonly RawClient _client but sub-clients
only had private RawClient _client, despite the field being assigned once in
the constructor and never reassigned.
2.23.1
(chore): Replace Node.js built-in imports (assert, path) in csharp-codegen with
browser-compatible alternatives, enabling the dynamic snippets package to
run in browser environments without Node.js polyfills.
2.23.0
(feat): Add AdditionalQueryParameters and AdditionalHeaders documentation
sections to the generated README.md, so users can discover how to
pass extra query parameters and headers via RequestOptions.
2.22.9
(chore): Make BaseUrl optional in BaseRequest and omit it from generated
endpoint code unless required (e.g. multiple-base-URL environments).
The RawClient now falls back to Options.BaseUrl when BaseUrl is
not set on the request, removing the redundant
BaseUrl = _client.Options.BaseUrl from every generated API call.
2.22.8
(chore): Modernize generated CI workflow: consolidate three separate jobs
(compile, unit-tests, publish) into a single job, update to
actions/checkout@v6 and actions/setup-dotnet@v5, remove redundant
duplicate checkout step, and require tests to pass before publishing.
2.22.7
(chore): Make OneOf single-type serialization test whitespace insensitive for
consistency with all other JSON test assertions.