-
Notifications
You must be signed in to change notification settings - Fork 1.2k
5.5 #2807
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
5.5 #2807
Changes from all commits
6fa7f6b
4e813f5
87ae230
fa50dac
6fb0c10
98bf770
adafd85
173aeb6
0c2f0ae
c173c53
81800de
7c9b72a
6f6faea
0b4b765
6d3b017
100cf7c
62079b9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using ApiGenerator.Domain; | ||
|
||
namespace ApiGenerator.Overrides.Descriptors | ||
{ | ||
public class RefreshDescriptorOverrides : DescriptorOverridesBase | ||
{ | ||
public override CsharpMethod PatchMethod(CsharpMethod method) | ||
{ | ||
method.Url.Params.Add("force", new NoopApiQueryParameters() { Type = "boolean" }); | ||
method.Url.Params.Add("operation_threading", new NoopApiQueryParameters()); | ||
return method; | ||
} | ||
|
||
private class NoopApiQueryParameters : ApiQueryParameters | ||
{ | ||
public NoopApiQueryParameters() | ||
{ | ||
this.Obsolete = "calling this is a noop"; | ||
this.FluentGenerator = (queryStringParamName, mm, original, setter) => $"public {queryStringParamName} {mm.ToPascalCase()}({CsharpType(mm)} {mm}) => this;"; | ||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,14 +25,6 @@ | |
"options" : ["open","closed","none","all"], | ||
"default" : "open", | ||
"description" : "Whether to expand wildcard expression to concrete indices that are open, closed or both." | ||
}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks like a breaking API change which is going to break binary compatibility for Elasticsearch.Net. Reading elastic/elasticsearch#25234, it looks like these should have been removed from the rest api specs for 5.x, but given these are methods on the client, I think they should still exist as Noops in 5.x to not break binary compatibility. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed: 7c9b72a |
||
"force": { | ||
"type" : "boolean", | ||
"description" : "Force a refresh even if not required", | ||
"default": false | ||
}, | ||
"operation_threading": { | ||
"description" : "TODO: ?" | ||
} | ||
} | ||
}, | ||
|
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"xpack.ml.close_job": { | ||
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-close-job.html", | ||
"methods": [ "POST" ], | ||
"url": { | ||
"path": "/_xpack/ml/anomaly_detectors/{job_id}/_close", | ||
"paths": [ "/_xpack/ml/anomaly_detectors/{job_id}/_close" ], | ||
"parts": { | ||
"job_id": { | ||
"type": "string", | ||
"required": true, | ||
"description": "The name of the job to close" | ||
} | ||
}, | ||
"params": { | ||
"force": { | ||
"type": "boolean", | ||
"required": false, | ||
"description": "True if the job should be forcefully closed" | ||
}, | ||
"timeout": { | ||
"type": "time", | ||
"description": "Controls the time to wait until a job has closed. Default to 30 minutes" | ||
} | ||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"xpack.ml.delete_datafeed": { | ||
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-datafeed.html", | ||
"methods": [ "DELETE" ], | ||
"url": { | ||
"path": "/_xpack/ml/datafeeds/{datafeed_id}", | ||
"paths": [ "/_xpack/ml/datafeeds/{datafeed_id}" ], | ||
"parts": { | ||
"datafeed_id": { | ||
"type": "string", | ||
"required": true, | ||
"description": "The ID of the datafeed to delete" | ||
} | ||
}, | ||
"params": { | ||
"force": { | ||
"type": "boolean", | ||
"required": false, | ||
"description": "True if the datafeed should be forcefully deleted" | ||
} | ||
} | ||
}, | ||
"body": null | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"xpack.ml.delete_expired_data": { | ||
"methods": [ "DELETE" ], | ||
"url": { | ||
"path": "/_xpack/ml/_delete_expired_data", | ||
"paths": [ "/_xpack/ml/_delete_expired_data" ], | ||
"parts": {} | ||
}, | ||
"body": null | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"xpack.ml.delete_filter": { | ||
"methods": [ "DELETE" ], | ||
"url": { | ||
"path": "/_xpack/ml/filters/{filter_id}", | ||
"paths": [ "/_xpack/ml/filters/{filter_id}" ], | ||
"parts": { | ||
"filter_id": { | ||
"type" : "string", | ||
"required" : true, | ||
"description" : "The ID of the filter to delete" | ||
} | ||
} | ||
}, | ||
"body": null | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"xpack.ml.delete_job": { | ||
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html", | ||
"methods": [ "DELETE" ], | ||
"url": { | ||
"path": "/_xpack/ml/anomaly_detectors/{job_id}", | ||
"paths": [ "/_xpack/ml/anomaly_detectors/{job_id}" ], | ||
"parts": { | ||
"job_id": { | ||
"type": "string", | ||
"required": true, | ||
"description": "The ID of the job to delete" | ||
} | ||
}, | ||
"params": { | ||
"force": { | ||
"type": "boolean", | ||
"required": false, | ||
"description": "True if the job should be forcefully deleted" | ||
} | ||
} | ||
}, | ||
"body": null | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"xpack.ml.delete_model_snapshot": { | ||
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-snapshot.html", | ||
"methods": [ "DELETE" ], | ||
"url": { | ||
"path": "/_xpack/ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}", | ||
"paths": [ "/_xpack/ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}" ], | ||
"parts": { | ||
"job_id": { | ||
"type": "string", | ||
"required": true, | ||
"description": "The ID of the job to fetch" | ||
}, | ||
"snapshot_id": { | ||
"type": "string", | ||
"required": true, | ||
"description": "The ID of the snapshot to delete" | ||
} | ||
} | ||
}, | ||
"body": null | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
"xpack.ml.flush_job": { | ||
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html", | ||
"methods": [ | ||
"POST" | ||
], | ||
"url": { | ||
"path": "/_xpack/ml/anomaly_detectors/{job_id}/_flush", | ||
"paths": [ | ||
"/_xpack/ml/anomaly_detectors/{job_id}/_flush" | ||
], | ||
"parts": { | ||
"job_id": { | ||
"type": "string", | ||
"required": true, | ||
"description": "The name of the job to flush" | ||
} | ||
}, | ||
"params": { | ||
"calc_interim": { | ||
"type": "boolean", | ||
"description": "Calculates interim results for the most recent bucket or all buckets within the latency period" | ||
}, | ||
"start": { | ||
"type": "string", | ||
"description": "When used in conjunction with calc_interim, specifies the range of buckets on which to calculate interim results" | ||
}, | ||
"end": { | ||
"type": "string", | ||
"description": "When used in conjunction with calc_interim, specifies the range of buckets on which to calculate interim results" | ||
}, | ||
"advance_time": { | ||
"type": "string", | ||
"description": "Setting this tells the Engine API that no data prior to advance_time is expected" | ||
} | ||
} | ||
}, | ||
"body": { | ||
"description": "Flush parameters" | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
{ | ||
"xpack.ml.get_buckets": { | ||
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html", | ||
"methods": [ "GET", "POST" ], | ||
"url": { | ||
"path": "/_xpack/ml/anomaly_detectors/{job_id}/results/buckets/{timestamp}", | ||
"paths": [ | ||
"/_xpack/ml/anomaly_detectors/{job_id}/results/buckets/{timestamp}", | ||
"/_xpack/ml/anomaly_detectors/{job_id}/results/buckets" | ||
], | ||
"parts": { | ||
"job_id": { | ||
"type" : "string", | ||
"required": true, | ||
"description": "ID of the job to get bucket results from" | ||
}, | ||
"timestamp": { | ||
"type" : "string", | ||
"description" : "The timestamp of the desired single bucket result" | ||
} | ||
}, | ||
"params": { | ||
"expand": { | ||
"type": "boolean", | ||
"description" : "Include anomaly records" | ||
}, | ||
"exclude_interim": { | ||
"type": "boolean", | ||
"description" : "Exclude interim results" | ||
}, | ||
"from": { | ||
"type": "int", | ||
"description": "skips a number of buckets" | ||
}, | ||
"size": { | ||
"type": "int", | ||
"description": "specifies a max number of buckets to get" | ||
}, | ||
"start": { | ||
"type": "string", | ||
"description" : "Start time filter for buckets" | ||
}, | ||
"end": { | ||
"type": "string", | ||
"description" : "End time filter for buckets" | ||
}, | ||
"anomaly_score": { | ||
"type": "double", | ||
"description": "Filter for the most anomalous buckets" | ||
}, | ||
"sort": { | ||
"type": "string", | ||
"description": "Sort buckets by a particular field" | ||
}, | ||
"desc": { | ||
"type": "boolean", | ||
"description": "Set the sort direction" | ||
} | ||
} | ||
}, | ||
"body": { | ||
"description" : "Bucket selection details if not provided in URI" | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"xpack.ml.get_categories": { | ||
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html", | ||
"methods": [ "GET", "POST" ], | ||
"url": { | ||
"path": "/_xpack/ml/anomaly_detectors/{job_id}/results/categories/{category_id}", | ||
"paths": [ | ||
"/_xpack/ml/anomaly_detectors/{job_id}/results/categories/{category_id}", | ||
"/_xpack/ml/anomaly_detectors/{job_id}/results/categories/" | ||
], | ||
"parts": { | ||
"job_id": { | ||
"type" : "string", | ||
"required": true, | ||
"description": "The name of the job" | ||
}, | ||
"category_id": { | ||
"type" : "long", | ||
"description" : "The identifier of the category definition of interest" | ||
} | ||
}, | ||
"params": { | ||
"from": { | ||
"type": "int", | ||
"description": "skips a number of categories" | ||
}, | ||
"size": { | ||
"type": "int", | ||
"description": "specifies a max number of categories to get" | ||
} | ||
} | ||
}, | ||
"body": { | ||
"description" : "Category selection details if not provided in URI" | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can also be achieved by adding an
*.obsolete.json
companion file to the rest spec itself see:https://github.com/elastic/elasticsearch-net/blob/100cf7c3f81553456fb039ca7a499a97c7990028/src/CodeGeneration/ApiGenerator/RestSpecification/Core/cat.thread_pool.obsolete.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move the *.obsolete.json and *.patch.json files to a different directory to the downloaded specs? I think it'll make it easier to manage