2.15.0
(feat): Add support for explicit nullable/optional type handling with the new Optional<T> type.
When experimental-explicit-nullable-optional: true is configured in generators.yml, the SDK will use Optional<T?> for nullable optional fields, enabling three-state semantics for PATCH requests:
- Undefined: Field not set - won’t be included in the request (leave unchanged on server)
- Defined with null: Field explicitly set to null - will send
null(clear the field on server) - Defined with value: Field set to a value - will send the value (update the field on server)
Example usage:
The Optional<T> type includes:
IsDefinedproperty to check if a value is setValueproperty to access the value (throws if undefined)TryGetValuemethod for safe value access- Implicit conversion operators for ergonomic usage
- Full JSON serialization support
IEquatable<Optional<T>>implementation for proper equality checks
(fix): Fix query parameter serialization to properly handle nullable struct types (DateTime?, DateOnly?, etc.) by adding .Value accessor when needed.
(fix): Improve nullable and optional type handling throughout the generator, including collection value types and type mapping.
2.14.1
(fix): When include-exception-handler: true is configured, the generated exception interceptor class
now accepts ClientOptions in its constructor. This allows the interceptor to access client
configuration when capturing exceptions.
2.14.0
(feat): Refactor WebSocket API code generation to use composition over inheritance.
Key changes:
- Replace
AsyncApi<T>base class withWebSocketClientinternal class using composition - Flatten namespace from
{root}.Core.Async.*to{root}.Core.WebSockets - Generated WebSocket clients now implement
IAsyncDisposable,IDisposable, andINotifyPropertyChangeddirectly - Store
OptionsandWebSocketClientas private fields instead of using inheritance - Forward
Status,Connected,Closed, andExceptionOccurredevents from internal client - Simplify
INotifyPropertyChangedto only notify forStatusproperty changes
This refactoring improves code clarity and reduces complexity.