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.
2.22.6
(fix): Fix ObjectDisposedException when retrying HTTP requests with a body. The
CloneRequestAsync method now deep-copies the request content into a new
MemoryStream instead of reusing the original (already-disposed) content
reference. Also fixes multipart retry cloning to preserve per-part headers
(e.g. Content-Disposition) instead of incorrectly copying the parent
multipart headers onto each part.
2.22.5
(fix): Fix mock server test generation for singleProperty union variants to use
the correct property wire name from the union type definition (e.g. “value”)
instead of the discriminant variant name (e.g. “integerValue”).
(fix): Fix CS0555 build error for union types with optional member types where the
underlying type name matches the inner class name, causing a self-conversion
implicit operator.
(fix): Fix union deserialization to strip the discriminant property from JSON before
deserializing samePropertiesAsObject variants, preventing the discriminant from
leaking into AdditionalProperties.
(fix): Fix OAuth client credentials custom flow to pass additional properties and
scopes to the OAuthTokenProvider constructor.
(fix): Align OAuth custom property filter with Java generator: skip only literal
properties instead of filtering to only primitives. This ensures non-primitive,
non-literal custom OAuth properties are correctly propagated.
2.22.4
(chore): Use generator-cli JS API directly instead of subprocess spawning.
Remove generator-cli from Docker image since it is now bundled via esbuild.
2.22.3
(fix): Replace lodash-es template engine with Eta for processing template files.
Eta is a modern, lightweight, TypeScript-native engine with zero dependencies
that uses the same <% %> / <%= %> syntax. This resolves crashes when
template files contain backticks (template literals).
2.22.2
(fix): Change [TIMING] log statements from info to debug level so they are only
printed when debug logging is enabled.
2.22.1
(chore): Add [TIMING] log statements throughout the C# generator to help identify performance bottlenecks during code generation, project creation, formatting, and output.
2.22.0
(feat): Add redact-response-body-on-error option to prevent raw response bodies from leaking into exception messages and logs. When enabled, deserialization error exceptions pass null instead of the raw response body, streaming errors use a fixed message with the original exception as an inner exception, and the base API exception class includes a custom ToString() override that excludes the response body.
2.21.0
(feat): Convert HTML tags in OpenAPI descriptions to idiomatic C# XMLDoc equivalents in generated /// comments (<code> → <c>, <a href> → <see href>, <ul><li> → <list type="bullet"><item>, <strong> → <b>, <em> → <i>, <p> → <para>, <pre><code> → <code>, <tt> → <c>).
2.20.5
(chore): Upgrade CSharpier formatter to 1.2.6.
2.20.4
(fix): Fix query string parameters not being included in HTTP requests for custom pagination endpoints.