Skip to content

Commit

Permalink
obsolete copy_settings as of 6.4 (#3416)
Browse files Browse the repository at this point in the history
It will no longer allow false and will be removed on the server in 8.x, and in the client in 7.x 

(cherry picked from commit 559367b)
  • Loading branch information
Mpdreamz authored and russcam committed Oct 26, 2018
1 parent 8af76c5 commit 81950a4
Show file tree
Hide file tree
Showing 4 changed files with 8 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 @@ -35,7 +35,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."},
{ "update_all_types", "Elasticsearch 6.x only allows a single type per index so this parameter is now useless"}
{ "update_all_types", "Elasticsearch 6.x only allows a single type per index so this parameter is now useless"},
{ "copy_settings", "Elasticsearch 6.4 will throw an exception if this is turned off see elastic/elasticsearch#30404"}
};

public override IEnumerable<string> SkipQueryStringParams { get; } = new[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1434,6 +1434,7 @@ public partial class ShrinkIndexRequestParameters : RequestParameters<ShrinkInde
{
public override HttpMethod DefaultHttpMethod => HttpMethod.PUT;
///<summary>whether or not to copy settings from the source index (defaults to false)</summary>
[Obsolete("Scheduled to be removed in 7.0, Elasticsearch 6.4 will throw an exception if this is turned off see elastic/elasticsearch#30404")]
public bool? CopySettings { get => Q<bool?>("copy_settings"); set => Q("copy_settings", value); }
///<summary>Explicit operation timeout</summary>
public TimeSpan Timeout { get => Q<TimeSpan>("timeout"); set => Q("timeout", value); }
Expand All @@ -1447,6 +1448,7 @@ public partial class SplitIndexRequestParameters : RequestParameters<SplitIndexR
{
public override HttpMethod DefaultHttpMethod => HttpMethod.PUT;
///<summary>whether or not to copy settings from the source index (defaults to false)</summary>
[Obsolete("Scheduled to be removed in 7.0, Elasticsearch 6.4 will throw an exception if this is turned off see elastic/elasticsearch#30404")]
public bool? CopySettings { get => Q<bool?>("copy_settings"); set => Q("copy_settings", value); }
///<summary>Explicit operation timeout</summary>
public TimeSpan Timeout { get => Q<TimeSpan>("timeout"); set => Q("timeout", value); }
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 @@ -2513,6 +2513,7 @@ public ShrinkIndexDescriptor(IndexName index, IndexName target) : base(r=>r.Requ
// Request parameters

///<summary>whether or not to copy settings from the source index (defaults to false)</summary>
[Obsolete("Scheduled to be removed in 7.0, Elasticsearch 6.4 will throw an exception if this is turned off see elastic/elasticsearch#30404")]
public ShrinkIndexDescriptor CopySettings(bool? copySettings = true) => Qs("copy_settings", copySettings);
///<summary>Explicit operation timeout</summary>
public ShrinkIndexDescriptor Timeout(Time timeout) => Qs("timeout", timeout);
Expand Down Expand Up @@ -2541,6 +2542,7 @@ public SplitIndexDescriptor(IndexName index, IndexName target) : base(r=>r.Requi
// Request parameters

///<summary>whether or not to copy settings from the source index (defaults to false)</summary>
[Obsolete("Scheduled to be removed in 7.0, Elasticsearch 6.4 will throw an exception if this is turned off see elastic/elasticsearch#30404")]
public SplitIndexDescriptor CopySettings(bool? copySettings = true) => Qs("copy_settings", copySettings);
///<summary>Explicit operation timeout</summary>
public SplitIndexDescriptor Timeout(Time timeout) => Qs("timeout", timeout);
Expand Down
2 changes: 2 additions & 0 deletions src/Nest/_Generated/_Requests.generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5550,6 +5550,7 @@ public ShrinkIndexRequest(IndexName index, IndexName target) : base(r=>r.Require

// Request parameters
///<summary>whether or not to copy settings from the source index (defaults to false)</summary>
[Obsolete("Scheduled to be removed in 7.0, Elasticsearch 6.4 will throw an exception if this is turned off see elastic/elasticsearch#30404")]
public bool? CopySettings { get => Q<bool?>("copy_settings"); set => Q("copy_settings", value); }
///<summary>Explicit operation timeout</summary>
public Time Timeout { get => Q<Time>("timeout"); set => Q("timeout", value); }
Expand Down Expand Up @@ -5881,6 +5882,7 @@ public SplitIndexRequest(IndexName index, IndexName target) : base(r=>r.Required

// Request parameters
///<summary>whether or not to copy settings from the source index (defaults to false)</summary>
[Obsolete("Scheduled to be removed in 7.0, Elasticsearch 6.4 will throw an exception if this is turned off see elastic/elasticsearch#30404")]
public bool? CopySettings { get => Q<bool?>("copy_settings"); set => Q("copy_settings", value); }
///<summary>Explicit operation timeout</summary>
public Time Timeout { get => Q<Time>("timeout"); set => Q("timeout", value); }
Expand Down

0 comments on commit 81950a4

Please sign in to comment.