IMPORTANT: No additional bug fixes or documentation updates
will be released for this version. For the latest information, see the
current release documentation.
Release notes v8.0.6
editRelease notes v8.0.6
editBug fixes
edit- #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
edit- #7272 Support custom JsonSerializerOptions.
Breaking changes
editDynamicTemplate
editDynamicTemplate
forms part of the TypeMapping
object, included on GetIndexRespone
.
-
The type for the
Mapping
property has changed fromElastic.Clients.Elasticsearch.Properties
toElastic.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
editAmong 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 aUnion
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 anICollection
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
editThe 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();