Skip to content

Commit 2494fa8

Browse files
Use Fields type for Field|Field[] and Field[] (#8084) (#8086)
Co-authored-by: Florian Bernd <[email protected]>
1 parent d3e81eb commit 2494fa8

File tree

124 files changed

+251
-72
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+251
-72
lines changed

src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/AsyncSearch/SubmitAsyncSearchRequest.g.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -911,6 +911,7 @@ public SubmitAsyncSearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices
911911
/// <para>List of stored fields to return as part of a hit. If no fields are specified,<br/>no stored fields are included in the response. If this field is specified, the _source<br/>parameter defaults to false. You can pass _source: true to return both source fields<br/>and stored fields in the search response.</para>
912912
/// </summary>
913913
[JsonInclude, JsonPropertyName("stored_fields")]
914+
[JsonConverter(typeof(SingleOrManyFieldsConverter))]
914915
public Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFields { get; set; }
915916
[JsonInclude, JsonPropertyName("suggest")]
916917
public Elastic.Clients.Elasticsearch.Serverless.Core.Search.Suggester? Suggest { get; set; }

src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/FieldCapsRequest.g.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ public FieldCapsRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indice
134134
/// <para>List of fields to retrieve capabilities for. Wildcard (`*`) expressions are supported.</para>
135135
/// </summary>
136136
[JsonInclude, JsonPropertyName("fields")]
137+
[JsonConverter(typeof(SingleOrManyFieldsConverter))]
137138
public Elastic.Clients.Elasticsearch.Serverless.Fields? Fields { get; set; }
138139

139140
/// <summary>

src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchMvtRequest.g.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ public SearchMvtRequest(Elastic.Clients.Elasticsearch.Serverless.Indices indices
7979
/// <para>Fields to return in the `hits` layer. Supports wildcards (`*`).<br/>This parameter does not support fields with array values. Fields with array<br/>values may return inconsistent results.</para>
8080
/// </summary>
8181
[JsonInclude, JsonPropertyName("fields")]
82+
[JsonConverter(typeof(SingleOrManyFieldsConverter))]
8283
public Elastic.Clients.Elasticsearch.Serverless.Fields? Fields { get; set; }
8384

8485
/// <summary>

src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Api/SearchRequest.g.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -956,6 +956,7 @@ public SearchRequest(Elastic.Clients.Elasticsearch.Serverless.Indices? indices)
956956
/// <para>List of stored fields to return as part of a hit.<br/>If no fields are specified, no stored fields are included in the response.<br/>If this field is specified, the `_source` parameter defaults to `false`.<br/>You can pass `_source: true` to return both source fields and stored fields in the search response.</para>
957957
/// </summary>
958958
[JsonInclude, JsonPropertyName("stored_fields")]
959+
[JsonConverter(typeof(SingleOrManyFieldsConverter))]
959960
public Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFields { get; set; }
960961

961962
/// <summary>

src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/MatrixStatsAggregation.g.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public sealed partial class MatrixStatsAggregation
3333
/// <para>An array of fields for computing the statistics.</para>
3434
/// </summary>
3535
[JsonInclude, JsonPropertyName("fields")]
36+
[JsonConverter(typeof(SingleOrManyFieldsConverter))]
3637
public Elastic.Clients.Elasticsearch.Serverless.Fields? Fields { get; set; }
3738
[JsonInclude, JsonPropertyName("meta")]
3839
public IDictionary<string, object>? Meta { get; set; }

src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/SignificantTextAggregation.g.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ public sealed partial class SignificantTextAggregation
133133
/// <para>Overrides the JSON `_source` fields from which text will be analyzed.</para>
134134
/// </summary>
135135
[JsonInclude, JsonPropertyName("source_fields")]
136+
[JsonConverter(typeof(SingleOrManyFieldsConverter))]
136137
public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceFields { get; set; }
137138

138139
public static implicit operator Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation(SignificantTextAggregation significantTextAggregation) => Elastic.Clients.Elasticsearch.Serverless.Aggregations.Aggregation.SignificantText(significantTextAggregation);

src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Aggregations/TopHitsAggregation.g.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public sealed partial class TopHitsAggregation
3333
/// <para>Fields for which to return doc values.</para>
3434
/// </summary>
3535
[JsonInclude, JsonPropertyName("docvalue_fields")]
36+
[JsonConverter(typeof(SingleOrManyFieldsConverter))]
3637
public Elastic.Clients.Elasticsearch.Serverless.Fields? DocvalueFields { get; set; }
3738

3839
/// <summary>
@@ -102,6 +103,7 @@ public sealed partial class TopHitsAggregation
102103
/// <para>Returns values for the specified stored fields (fields that use the `store` mapping option).</para>
103104
/// </summary>
104105
[JsonInclude, JsonPropertyName("stored_fields")]
106+
[JsonConverter(typeof(SingleOrManyFieldsConverter))]
105107
public Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFields { get; set; }
106108

107109
/// <summary>

src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/MGet/MultiGetOperation.g.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ public sealed partial class MultiGetOperation
5757
/// <para>The stored fields you want to retrieve.</para>
5858
/// </summary>
5959
[JsonInclude, JsonPropertyName("stored_fields")]
60+
[JsonConverter(typeof(SingleOrManyFieldsConverter))]
6061
public Elastic.Clients.Elasticsearch.Serverless.Fields? StoredFields { get; set; }
6162
[JsonInclude, JsonPropertyName("version")]
6263
public long? Version { get; set; }

src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Mtermvectors/MultiTermVectorsOperation.g.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public sealed partial class MultiTermVectorsOperation
3939
/// <para>Comma-separated list or wildcard expressions of fields to include in the statistics.<br/>Used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters.</para>
4040
/// </summary>
4141
[JsonInclude, JsonPropertyName("fields")]
42+
[JsonConverter(typeof(SingleOrManyFieldsConverter))]
4243
public Elastic.Clients.Elasticsearch.Serverless.Fields? Fields { get; set; }
4344

4445
/// <summary>

src/Elastic.Clients.Elasticsearch.Serverless/_Generated/Types/Core/Reindex/Source.g.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ public sealed partial class Source
6868
/// <para>If `true` reindexes all source fields.<br/>Set to a list to reindex select fields.</para>
6969
/// </summary>
7070
[JsonInclude, JsonPropertyName("_source")]
71+
[JsonConverter(typeof(SingleOrManyFieldsConverter))]
7172
public Elastic.Clients.Elasticsearch.Serverless.Fields? SourceFields { get; set; }
7273
}
7374

0 commit comments

Comments
 (0)