Skip to content

Commit

Permalink
Fix #3315 obsolete the update_all_types querystring parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
Mpdreamz committed Aug 13, 2018
1 parent 67eb409 commit f890877
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/CodeGeneration/ApiGenerator/Overrides/GlobalOverrides.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ public class GlobalOverrides : EndpointOverridesBase

public override IDictionary<string, string> ObsoleteQueryStringParams { get; set; } = new Dictionary<string, string>
{
{ "parent", "the parent parameter has been deprecated from elasticsearch, please use routing instead directly."}
{ "parent", "the parent parameter has been deprecated from elasticsearch, please use routing instead directly."},
{ "update_all_types", "Elasticsearch 6.x only allows a single type per index so this parameter is now useless"}
};

public override IEnumerable<string> SkipQueryStringParams { get; } = new[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1000,6 +1000,7 @@ public partial class CreateIndexRequestParameters : RequestParameters<CreateInde
///<summary>Specify timeout for connection to master</summary>
public TimeSpan MasterTimeout { get => Q<TimeSpan>("master_timeout"); set => Q("master_timeout", value); }
///<summary>Whether to update the mapping for all fields with the same name across all types or not</summary>
[Obsolete("Scheduled to be removed in 7.0, Elasticsearch 6.x only allows a single type per index so this parameter is now useless")]
public bool? UpdateAllTypes { get => Q<bool?>("update_all_types"); set => Q("update_all_types", value); }
}
///<summary>Request options for IndicesDelete<pre>http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-index.html</pre></summary>
Expand Down Expand Up @@ -1312,6 +1313,7 @@ public partial class PutMappingRequestParameters : RequestParameters<PutMappingR
///<summary>Whether to expand wildcard expression to concrete indices that are open, closed or both.</summary>
public ExpandWildcards? ExpandWildcards { get => Q<ExpandWildcards?>("expand_wildcards"); set => Q("expand_wildcards", value); }
///<summary>Whether to update the mapping for all fields with the same name across all types or not</summary>
[Obsolete("Scheduled to be removed in 7.0, Elasticsearch 6.x only allows a single type per index so this parameter is now useless")]
public bool? UpdateAllTypes { get => Q<bool?>("update_all_types"); set => Q("update_all_types", value); }
}
///<summary>Request options for IndicesPutSettingsForAll<pre>http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-update-settings.html</pre></summary>
Expand Down
2 changes: 2 additions & 0 deletions src/Nest/_Generated/_Descriptors.generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1681,6 +1681,7 @@ public partial class CreateIndexDescriptor : RequestDescriptorBase<CreateIndexD
///<summary>Specify timeout for connection to master</summary>
public CreateIndexDescriptor MasterTimeout(Time masterTimeout) => Qs("master_timeout", masterTimeout);
///<summary>Whether to update the mapping for all fields with the same name across all types or not</summary>
[Obsolete("Scheduled to be removed in 7.0, Elasticsearch 6.x only allows a single type per index so this parameter is now useless")]
public CreateIndexDescriptor UpdateAllTypes(bool? updateAllTypes = true) => Qs("update_all_types", updateAllTypes);
}
///<summary>descriptor for IndicesDelete <pre>http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-delete-index.html</pre></summary>
Expand Down Expand Up @@ -2291,6 +2292,7 @@ public partial class PutMappingDescriptor<T> : RequestDescriptorBase<PutMapping
///<summary>Whether to expand wildcard expression to concrete indices that are open, closed or both.</summary>
public PutMappingDescriptor<T> ExpandWildcards(ExpandWildcards? expandWildcards) => Qs("expand_wildcards", expandWildcards);
///<summary>Whether to update the mapping for all fields with the same name across all types or not</summary>
[Obsolete("Scheduled to be removed in 7.0, Elasticsearch 6.x only allows a single type per index so this parameter is now useless")]
public PutMappingDescriptor<T> UpdateAllTypes(bool? updateAllTypes = true) => Qs("update_all_types", updateAllTypes);
}
///<summary>descriptor for IndicesPutSettingsForAll <pre>http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-update-settings.html</pre></summary>
Expand Down
3 changes: 3 additions & 0 deletions src/Nest/_Generated/_Requests.generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1351,6 +1351,7 @@ public partial class CreateIndexRequest : PlainRequestBase<CreateIndexRequestPar
///<summary>Specify timeout for connection to master</summary>
public Time MasterTimeout { get => Q<Time>("master_timeout"); set => Q("master_timeout", value); }
///<summary>Whether to update the mapping for all fields with the same name across all types or not</summary>
[Obsolete("Scheduled to be removed in 7.0, Elasticsearch 6.x only allows a single type per index so this parameter is now useless")]
public bool? UpdateAllTypes { get => Q<bool?>("update_all_types"); set => Q("update_all_types", value); }
}
[JsonObject(MemberSerialization = MemberSerialization.OptIn)]
Expand Down Expand Up @@ -4124,6 +4125,7 @@ public partial class PutMappingRequest<T> : PlainRequestBase<PutMappingRequestPa
///<summary>Whether to expand wildcard expression to concrete indices that are open, closed or both.</summary>
public ExpandWildcards? ExpandWildcards { get => Q<ExpandWildcards?>("expand_wildcards"); set => Q("expand_wildcards", value); }
///<summary>Whether to update the mapping for all fields with the same name across all types or not</summary>
[Obsolete("Scheduled to be removed in 7.0, Elasticsearch 6.x only allows a single type per index so this parameter is now useless")]
public bool? UpdateAllTypes { get => Q<bool?>("update_all_types"); set => Q("update_all_types", value); }
} ///<summary>Request parameters for IndicesPutMapping <pre>http://www.elastic.co/guide/en/elasticsearch/reference/master/indices-put-mapping.html</pre></summary>
public partial class PutMappingRequest : PlainRequestBase<PutMappingRequestParameters>, IPutMappingRequest
Expand Down Expand Up @@ -4155,6 +4157,7 @@ public partial class PutMappingRequest : PlainRequestBase<PutMappingRequestParam
///<summary>Whether to expand wildcard expression to concrete indices that are open, closed or both.</summary>
public ExpandWildcards? ExpandWildcards { get => Q<ExpandWildcards?>("expand_wildcards"); set => Q("expand_wildcards", value); }
///<summary>Whether to update the mapping for all fields with the same name across all types or not</summary>
[Obsolete("Scheduled to be removed in 7.0, Elasticsearch 6.x only allows a single type per index so this parameter is now useless")]
public bool? UpdateAllTypes { get => Q<bool?>("update_all_types"); set => Q("update_all_types", value); }
}
[JsonObject(MemberSerialization = MemberSerialization.OptIn)]
Expand Down

0 comments on commit f890877

Please sign in to comment.