All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Fix: Array and List fields are now generated as
IEnumerable<>. Additionally, if the item type is aOneOf, then a new core class calledCollectionItemSerializeris used to deserialize the values.
-
Fix: Enum serializer is now added to enum declarations instead of enum references. This means that using a
JsonSerializer.serialize(myEnum)will also provide the correct value. -
Fix:
OneOfserializer is now added as aCoreclass. It uses reflection to scan all the generic classes and see if there is an opportunity to deserialize into that particular class.
-
Fix: Enum serializer hands reading + writing enum string values. There is now no need to pass in a custom JsonSerializer option but instead the custom serialization will automatically be invoked with any JSONSerializaer.
-
Fix: Non-success status code errors are thrown with the stringified response body.
- Fix: generated GitHub workflows now run on
dotnet-version8.x.
-
Fix: enable
nullableon all csharp files.# nullable enable
-
Fix: make project
.net6,.net7and.net8compatible.<TargetFrameworks>net8.0;net7.0;net6.0</TargetFrameworks>
- Fix: Misc. fixes including
.csprojindentation, settingX-Fern-SDK-Nameto the top level namespace, and passing through serializer options when serializing JSON messages.
-
Fix: Inlined requests that are strictly bodies should be JSON serializable. To achieve this these types of inlined requests now have JSON annotations.
public class SearchRequest { [JsonPropertyName("query")] // added public string Query { get; init; } }
- Fix: The SDK now adds a
JsonEnumMemberStringEnumConverterwhich readsEnumMember(Value="...")annotations on enum values and appropriately serializes them as strings.
-
Fix: If a LICENSE is specified, the generator now packages the license in the
.csprojfile.<ItemGroup> <None Include="..\..\LICENSE" Pack="true" PackagePath=""/> </ItemGroup>
-
Improvement: The C# generator now generates an
Environments.csfile which contains URLs for the different environments. If a default environment is present, then theBaseURLinClientOptions.cswill be initialized to this value.class Environments { public static string PRODUCTION = "https://api.production.com"; public static string STAGING = "https://api.staging.com"; }
- Fix: The C# generator now generates a proper
.csprojfile with version, GitHub url, and a reference to the SDK README.
- Improvement: The generated SDK now publishes Github Actions to build and publish the generated package to Nuget.
- Fix: When an inlined request body is entirely made up of request body properties, then the entire request can be serialized as the request body. This case was previously being overlooked.
- Fix: There were several fixes merged including supporting arbitrary nested clients, query parameter serialization, propert naming for async methods, and properly formatted solution files.