Release Notes
Version 9.0.3
New Features
FromHeader Parameter Support
- Added
[FromHeader]parameter support in WebClient models for C#, TypeScript, and Python code generation
Route Constraint Parsing
- Improved route segment parsing to handle type-constrained route templates (e.g.,
{value:int},{text:string})
Python Indentation
- Changed Python code generation to use spaces instead of tabs for PEP 8 compliance
Unit Tests
- Added dedicated unit test projects for each language target:
Albatross.CodeGen.WebClient.CSharp.UnitTest- C# web client generation testsAlbatross.CodeGen.WebClient.Python.UnitTest- Python web client generation testsAlbatross.CodeGen.CSharp.UnitTest- Core C# code generation testsAlbatross.CodeGen.Python.UnitTest- Core Python code generation testsAlbatross.CodeGen.TypeScript.UnitTest- Core TypeScript code generation tests
Documentation
- Added documentation articles for C# and Python web client settings
- Added build-vs-buy codegen decision checklist
Project Structure
- Migrated solution to new
.slnxformat - Removed legacy Slack sink options from CLI entry point
- Updated project files with
Albatross.Testingdependency for unit tests
Version 9.0.2
Current release with full support for .NET 10.0.
Breaking Changes - C# Web Client Generation
The C# web client code generation has been completely redesigned with the following changes:
Class Naming
- Generated client classes are now named
*Clientinstead of*ProxyService(e.g.,HttpMethodTestClientinstead ofHttpMethodTestProxyService)
Base Class and Dependencies
- Generated clients no longer inherit from
ClientBase - Dependency changed from
Albatross.WebClienttoAlbatross.Http - Constructor no longer requires an
ILoggerparameter - onlyHttpClientis needed - Each client now manages its own
HttpClientandJsonSerializerOptionsfields
Method Signatures
- All async methods now include a
CancellationTokenparameter as the last argument
Request Building
- Replaced the old
CreateRequest/CreateJsonRequestpattern with a new fluentRequestBuilderAPI:var builder = new RequestBuilder() .WithMethod(HttpMethod.Get) .WithRelativeUrl($"{ControllerPath}/{id}"); - Query string handling uses
builder.AddQueryString()andbuilder.AddQueryStringIfSet()instead ofNameValueCollection
Response Handling
- Uses new HttpClient extension methods:
client.Send<T>(),client.Execute<T>(),client.ExecuteOrThrow<T>(),client.ExecuteOrThrowStruct<T>() - Methods accept
jsonSerializerOptionsandcancellationTokenparameters
Date/Time Formatting
- Date formatting extension changed from
ISO8601String()toISO8601()
Legacy Support
The previous C# web client generators have been preserved for backward compatibility:
LegacyConvertWebApiToCSharpFileandLegacyCreateHttpClientRegistrations(marked as[Obsolete])- Use
codegen csharp legacy-web-clientcommand to generate clients using the previous pattern that depends onAlbatross.WebClient
Target Frameworks
- .NET 10.0 (primary)
- .NET Standard 2.0 (core libraries)
Version 9.0.1
Changes
- Upgraded target framework to .NET 10.0
- Updated Microsoft.CodeAnalysis dependencies
- Enhanced C# file declaration with indexing support
- Fixed member access expression generation
Version 8.x
Changes
- Added Python async HTTP client generation
- Improved TypeScript type mapping
- Enhanced generic type support
- Various bug fixes and performance improvements