From b5690ea4c1ecd952afe266d249a2c72fea1d8fb9 Mon Sep 17 00:00:00 2001 From: Steve Gordon Date: Tue, 28 Feb 2023 08:42:22 +0000 Subject: [PATCH 1/3] Stub out file for 8.0.6 release notes documentation --- docs/release-notes/release-notes-8.0.6.asciidoc | 12 ++++++++++++ docs/release-notes/release-notes.asciidoc | 2 ++ 2 files changed, 14 insertions(+) create mode 100644 docs/release-notes/release-notes-8.0.6.asciidoc 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..68ec3509dfe --- /dev/null +++ b/docs/release-notes/release-notes-8.0.6.asciidoc @@ -0,0 +1,12 @@ +[[release-notes-8.0.6]] +== Release notes v8.0.6 + +[discrete] +=== Bug fixes + +TODO + +[discrete] +=== Breaking changes + +TODO 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[] From 7668d99fb5f8af4c7212c3648496a647c7d1ae27 Mon Sep 17 00:00:00 2001 From: Steve Gordon Date: Tue, 28 Feb 2023 09:02:51 +0000 Subject: [PATCH 2/3] Update release notes for 8.0.6 --- .../release-notes-8.0.6.asciidoc | 83 ++++++++++++++++++- 1 file changed, 81 insertions(+), 2 deletions(-) diff --git a/docs/release-notes/release-notes-8.0.6.asciidoc b/docs/release-notes/release-notes-8.0.6.asciidoc index 68ec3509dfe..12e26ce22d7 100644 --- a/docs/release-notes/release-notes-8.0.6.asciidoc +++ b/docs/release-notes/release-notes-8.0.6.asciidoc @@ -4,9 +4,88 @@ [discrete] === Bug fixes -TODO +- 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] === Breaking changes -TODO +[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; } + ... +} +---- \ No newline at end of file From 2e31f500475afc15939beab154d411fb48845c07 Mon Sep 17 00:00:00 2001 From: Steve Gordon Date: Tue, 7 Mar 2023 13:13:36 +0000 Subject: [PATCH 3/3] Update release notes with serialization changes --- .../release-notes-8.0.6.asciidoc | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/docs/release-notes/release-notes-8.0.6.asciidoc b/docs/release-notes/release-notes-8.0.6.asciidoc index 12e26ce22d7..301f18470fd 100644 --- a/docs/release-notes/release-notes-8.0.6.asciidoc +++ b/docs/release-notes/release-notes-8.0.6.asciidoc @@ -15,6 +15,11 @@ enums with aliases (issue: https://github.com/elastic/elasticsearch-net/issues/7 `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 @@ -88,4 +93,18 @@ public sealed partial class TypeMapping public ICollection>? DynamicTemplates { get; set; } ... } ----- \ No newline at end of file +---- + +[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(); +----