Skip to content

Latest commit

 

History

History
110 lines (86 loc) · 3.47 KB

release-notes-8.0.6.asciidoc

File metadata and controls

110 lines (86 loc) · 3.47 KB

Release notes v8.0.6

Bug fixes

  • #7244 Fix code-gen for single or many types. Includes support for deserializing numbers represented as strings in the JSON payload. (issues: #7221, #7234, #7240).

  • #7253 Fix code-gen for enums with aliases (issue: #7236)

  • #7262 Update to Elastic.Transport 0.4.7 which includes fixes for helpers used during application testing.

Features

  • #7272 Support custom JsonSerializerOptions.

Breaking changes

DynamicTemplate

DynamicTemplate forms part of the TypeMapping object, included on GetIndexRespone.

  • The type for the Mapping property has changed from Elastic.Clients.Elasticsearch.Properties to Elastic.Clients.Elasticsearch.IProperty. This breaking change fixes an error introduced by the code-generator. Before introducing this fix, the type could not correctly deserialize responses for GET index requests and prevented dynamic templates from being configured for indices via PUT index.

Before

public sealed partial class DynamicTemplate
{
   ...
   public Elastic.Clients.Elasticsearch.Mapping.Properties? Mapping { get; set; }
   ...
}

After

public sealed partial class DynamicTemplate
{
   ...
   public Elastic.Clients.Elasticsearch.Mapping.IProperty? Mapping { get; set; }
   ...
}

TypeMapping

Among other uses, TypeMapping forms part of the GetIndexRespone.

  • The DynamicTemplates property has been simplified to make it easier to work with and to fix deserialization failures on certain responses. Rather than use a Union to describe the fact that this property may be a single dictionary of dynamic templates, or an array of dictionaries, this is now code-generated as a specialised single or many collection. The API exposes this as an ICollection of dictionaries and the JSON converter is able to handle either an array or individual dictionary in responses.

Before

public sealed partial class TypeMapping
{
   ...
   public Union<IDictionary<string, Elastic.Clients.Elasticsearch.Mapping.DynamicTemplate>?, ICollection<IDictionary<string, Elastic.Clients.Elasticsearch.Mapping.DynamicTemplate>>?>? DynamicTemplates { get; set; }
   ...
}

After

public sealed partial class TypeMapping
{
   ...
   public ICollection<IDictionary<string, Elastic.Clients.Elasticsearch.Mapping.DynamicTemplate>>? DynamicTemplates { get; set; }
   ...
}

SystemTextJsonSerializer

The SystemTextJsonSerializer is used as a base type for the built-in serializers. Two breaking changes have been made after adding better support for customizing source serialization.

The public Options property has been made internal.

A new public abstract method CreateJsonSerializerOptions has been added, which derived types must implement.

protected abstract JsonSerializerOptions CreateJsonSerializerOptions();