|
| 1 | +[[release-notes-8.0.6]] |
| 2 | +== Release notes v8.0.6 |
| 3 | + |
| 4 | +[discrete] |
| 5 | +=== Bug fixes |
| 6 | + |
| 7 | +- https://github.com/elastic/elasticsearch-net/pull/7244[#7244] Fix code-gen for |
| 8 | +single or many types. Includes support for deserializing numbers represented as |
| 9 | +strings in the JSON payload. (issues: https://github.com/elastic/elasticsearch-net/issues/7221[#7221], |
| 10 | +https://github.com/elastic/elasticsearch-net/issues/7234[#7234], |
| 11 | +https://github.com/elastic/elasticsearch-net/issues/7240[#7240]). |
| 12 | +- https://github.com/elastic/elasticsearch-net/pull/7253[#7253] Fix code-gen for |
| 13 | +enums with aliases (issue: https://github.com/elastic/elasticsearch-net/issues/7236[#7236]) |
| 14 | +- https://github.com/elastic/elasticsearch-net/pull/7262[#7262] Update to |
| 15 | +`Elastic.Transport` 0.4.7 which includes fixes for helpers used during application |
| 16 | +testing. |
| 17 | + |
| 18 | +[discrete] |
| 19 | +=== Features |
| 20 | + |
| 21 | +- https://github.com/elastic/elasticsearch-net/pull/7272[#7272] Support custom JsonSerializerOptions. |
| 22 | + |
| 23 | +[discrete] |
| 24 | +=== Breaking changes |
| 25 | + |
| 26 | +[discrete] |
| 27 | +==== DynamicTemplate |
| 28 | + |
| 29 | +`DynamicTemplate` forms part of the `TypeMapping` object, included on `GetIndexRespone`. |
| 30 | + |
| 31 | +* The type for the `Mapping` property has changed from `Elastic.Clients.Elasticsearch.Properties` |
| 32 | +to `Elastic.Clients.Elasticsearch.IProperty`. This breaking change fixes an error |
| 33 | +introduced by the code-generator. Before introducing this fix, the type could |
| 34 | +not correctly deserialize responses for GET index requests and prevented dynamic |
| 35 | +templates from being configured for indices via PUT index. |
| 36 | + |
| 37 | +*_Before_* |
| 38 | + |
| 39 | +[source,csharp] |
| 40 | +---- |
| 41 | +public sealed partial class DynamicTemplate |
| 42 | +{ |
| 43 | + ... |
| 44 | + public Elastic.Clients.Elasticsearch.Mapping.Properties? Mapping { get; set; } |
| 45 | + ... |
| 46 | +} |
| 47 | +---- |
| 48 | + |
| 49 | +*_After_* |
| 50 | + |
| 51 | +[source,csharp] |
| 52 | +---- |
| 53 | +public sealed partial class DynamicTemplate |
| 54 | +{ |
| 55 | + ... |
| 56 | + public Elastic.Clients.Elasticsearch.Mapping.IProperty? Mapping { get; set; } |
| 57 | + ... |
| 58 | +} |
| 59 | +---- |
| 60 | + |
| 61 | +[discrete] |
| 62 | +==== TypeMapping |
| 63 | + |
| 64 | +Among other uses, `TypeMapping` forms part of the `GetIndexRespone`. |
| 65 | + |
| 66 | +* The `DynamicTemplates` property has been simplified to make it easier to work |
| 67 | +with and to fix deserialization failures on certain responses. Rather than use a |
| 68 | +`Union` to describe the fact that this property may be a single dictionary of |
| 69 | +dynamic templates, or an array of dictionaries, this is now code-generated as a |
| 70 | +specialised single or many collection. The API exposes this as an `ICollection` |
| 71 | +of dictionaries and the JSON converter is able to handle either an array or |
| 72 | +individual dictionary in responses. |
| 73 | + |
| 74 | +*_Before_* |
| 75 | + |
| 76 | +[source,csharp] |
| 77 | +---- |
| 78 | +public sealed partial class TypeMapping |
| 79 | +{ |
| 80 | + ... |
| 81 | + public Union<IDictionary<string, Elastic.Clients.Elasticsearch.Mapping.DynamicTemplate>?, ICollection<IDictionary<string, Elastic.Clients.Elasticsearch.Mapping.DynamicTemplate>>?>? DynamicTemplates { get; set; } |
| 82 | + ... |
| 83 | +} |
| 84 | +---- |
| 85 | + |
| 86 | +*_After_* |
| 87 | + |
| 88 | +[source,csharp] |
| 89 | +---- |
| 90 | +public sealed partial class TypeMapping |
| 91 | +{ |
| 92 | + ... |
| 93 | + public ICollection<IDictionary<string, Elastic.Clients.Elasticsearch.Mapping.DynamicTemplate>>? DynamicTemplates { get; set; } |
| 94 | + ... |
| 95 | +} |
| 96 | +---- |
| 97 | + |
| 98 | +[discrete] |
| 99 | +==== SystemTextJsonSerializer |
| 100 | + |
| 101 | +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, customizing source serialization>>. |
| 102 | + |
| 103 | +The public `Options` property has been made internal. |
| 104 | + |
| 105 | +A new public abstract method `CreateJsonSerializerOptions` has been added, which derived types must implement. |
| 106 | + |
| 107 | +[source,csharp] |
| 108 | +---- |
| 109 | +protected abstract JsonSerializerOptions CreateJsonSerializerOptions(); |
| 110 | +---- |
0 commit comments