|
4 | 4 | [discrete]
|
5 | 5 | === Bug fixes
|
6 | 6 |
|
7 |
| -TODO |
| 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. |
8 | 17 |
|
9 | 18 | [discrete]
|
10 | 19 | === Breaking changes
|
11 | 20 |
|
12 |
| -TODO |
| 21 | +[discrete] |
| 22 | +==== DynamicTemplate |
| 23 | + |
| 24 | +`DynamicTemplate` forms part of the `TypeMapping` object, included on `GetIndexRespone`. |
| 25 | + |
| 26 | +* The type for the `Mapping` property has changed from `Elastic.Clients.Elasticsearch.Properties` |
| 27 | +to `Elastic.Clients.Elasticsearch.IProperty`. This breaking change fixes an error |
| 28 | +introduced by the code-generator. Before introducing this fix, the type could |
| 29 | +not correctly deserialize responses for GET index requests and prevented dynamic |
| 30 | +templates from being configured for indices via PUT index. |
| 31 | + |
| 32 | +*_Before_* |
| 33 | + |
| 34 | +[source,csharp] |
| 35 | +---- |
| 36 | +public sealed partial class DynamicTemplate |
| 37 | +{ |
| 38 | + ... |
| 39 | + public Elastic.Clients.Elasticsearch.Mapping.Properties? Mapping { get; set; } |
| 40 | + ... |
| 41 | +} |
| 42 | +---- |
| 43 | + |
| 44 | +*_After_* |
| 45 | + |
| 46 | +[source,csharp] |
| 47 | +---- |
| 48 | +public sealed partial class DynamicTemplate |
| 49 | +{ |
| 50 | + ... |
| 51 | + public Elastic.Clients.Elasticsearch.Mapping.IProperty? Mapping { get; set; } |
| 52 | + ... |
| 53 | +} |
| 54 | +---- |
| 55 | + |
| 56 | +[discrete] |
| 57 | +==== TypeMapping |
| 58 | + |
| 59 | +Among other uses, `TypeMapping` forms part of the `GetIndexRespone`. |
| 60 | + |
| 61 | +* The `DynamicTemplates` property has been simplified to make it easier to work |
| 62 | +with and to fix deserialization failures on certain responses. Rather than use a |
| 63 | +`Union` to describe the fact that this property may be a single dictionary of |
| 64 | +dynamic templates, or an array of dictionaries, this is now code-generated as a |
| 65 | +specialised single or many collection. The API exposes this as an `ICollection` |
| 66 | +of dictionaries and the JSON converter is able to handle either an array or |
| 67 | +individual dictionary in responses. |
| 68 | + |
| 69 | +*_Before_* |
| 70 | + |
| 71 | +[source,csharp] |
| 72 | +---- |
| 73 | +public sealed partial class TypeMapping |
| 74 | +{ |
| 75 | + ... |
| 76 | + public Union<IDictionary<string, Elastic.Clients.Elasticsearch.Mapping.DynamicTemplate>?, ICollection<IDictionary<string, Elastic.Clients.Elasticsearch.Mapping.DynamicTemplate>>?>? DynamicTemplates { get; set; } |
| 77 | + ... |
| 78 | +} |
| 79 | +---- |
| 80 | + |
| 81 | +*_After_* |
| 82 | + |
| 83 | +[source,csharp] |
| 84 | +---- |
| 85 | +public sealed partial class TypeMapping |
| 86 | +{ |
| 87 | + ... |
| 88 | + public ICollection<IDictionary<string, Elastic.Clients.Elasticsearch.Mapping.DynamicTemplate>>? DynamicTemplates { get; set; } |
| 89 | + ... |
| 90 | +} |
| 91 | +---- |
0 commit comments