diff --git a/docs/release-notes/release-notes-8.0.6.asciidoc b/docs/release-notes/release-notes-8.0.6.asciidoc new file mode 100644 index 00000000000..301f18470fd --- /dev/null +++ b/docs/release-notes/release-notes-8.0.6.asciidoc @@ -0,0 +1,110 @@ +[[release-notes-8.0.6]] +== Release notes v8.0.6 + +[discrete] +=== Bug fixes + +- https://github.com/elastic/elasticsearch-net/pull/7244[#7244] Fix code-gen for +single or many types. Includes support for deserializing numbers represented as +strings in the JSON payload. (issues: https://github.com/elastic/elasticsearch-net/issues/7221[#7221], +https://github.com/elastic/elasticsearch-net/issues/7234[#7234], +https://github.com/elastic/elasticsearch-net/issues/7240[#7240]). +- https://github.com/elastic/elasticsearch-net/pull/7253[#7253] Fix code-gen for +enums with aliases (issue: https://github.com/elastic/elasticsearch-net/issues/7236[#7236]) +- https://github.com/elastic/elasticsearch-net/pull/7262[#7262] Update to +`Elastic.Transport` 0.4.7 which includes fixes for helpers used during application +testing. + +[discrete] +=== Features + +- https://github.com/elastic/elasticsearch-net/pull/7272[#7272] Support custom JsonSerializerOptions. + +[discrete] +=== Breaking changes + +[discrete] +==== 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_* + +[source,csharp] +---- +public sealed partial class DynamicTemplate +{ + ... + public Elastic.Clients.Elasticsearch.Mapping.Properties? Mapping { get; set; } + ... +} +---- + +*_After_* + +[source,csharp] +---- +public sealed partial class DynamicTemplate +{ + ... + public Elastic.Clients.Elasticsearch.Mapping.IProperty? Mapping { get; set; } + ... +} +---- + +[discrete] +==== 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_* + +[source,csharp] +---- +public sealed partial class TypeMapping +{ + ... + public Union?, ICollection>?>? DynamicTemplates { get; set; } + ... +} +---- + +*_After_* + +[source,csharp] +---- +public sealed partial class TypeMapping +{ + ... + public ICollection>? DynamicTemplates { get; set; } + ... +} +---- + +[discrete] +==== 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 <>. + +The public `Options` property has been made internal. + +A new public abstract method `CreateJsonSerializerOptions` has been added, which derived types must implement. + +[source,csharp] +---- +protected abstract JsonSerializerOptions CreateJsonSerializerOptions(); +---- diff --git a/docs/release-notes/release-notes.asciidoc b/docs/release-notes/release-notes.asciidoc index 60a1ff944f9..1193b2cc93f 100644 --- a/docs/release-notes/release-notes.asciidoc +++ b/docs/release-notes/release-notes.asciidoc @@ -6,6 +6,7 @@ [discrete] == Version 8.0 +* <> * <> * <> * <> @@ -14,6 +15,7 @@ * <> include::breaking-change-policy.asciidoc[] +include::release-notes-8.0.6.asciidoc[] include::release-notes-8.0.5.asciidoc[] include::release-notes-8.0.4.asciidoc[] include::release-notes-8.0.3.asciidoc[]