Skip to content

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

Merged
merged 17 commits into from
Jul 21, 2017
Merged

5.5 #2807

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build/Clients.Common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<Prefer32Bit>false</Prefer32Bit>
<DefineConstants Condition="'$(TargetFramework)'=='netstandard1.3' OR '$(DotNetCoreOnly)'=='1'">$(DefineConstants);DOTNETCORE</DefineConstants>
<DebugType Condition="'$(DotNetCoreOnly)'==''">embedded</DebugType>
<DebugType Condition="'$(Configuration)'=='Debug'">full</DebugType>
<SourceLink Condition="'$(DoSourceLink)'!=''">$(BaseIntermediateOutputPath)\sl-$(MsBuildProjectName)-$(TargetFramework).json</SourceLink>
<RepoUri>https://raw.githubusercontent.com/elastic/elasticsearch-net</RepoUri>
</PropertyGroup>
Expand Down
1 change: 1 addition & 0 deletions src/CodeGeneration/ApiGenerator/ApiGenerator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
</ItemGroup>
<ItemGroup>
<Folder Include="RestSpecification\XPack\Info" />
<Folder Include="RestSpecification\XPack\MachineLearning" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using ApiGenerator.Domain;

namespace ApiGenerator.Overrides.Descriptors
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

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

{
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
@@ -1,6 +1,6 @@
{
"exists_source": {
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html",
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/5.5/docs-get.html",
"methods": ["HEAD"],
"url": {
"path": "/{index}/{type}/{id}/_source",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"field_caps": {
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html",
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/5.5/search-field-caps.html",
"methods": ["GET", "POST"],
"url": {
"path": "/_field_caps",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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."
},
Copy link
Contributor

Choose a reason for hiding this comment

The 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.

Copy link
Contributor

Choose a reason for hiding this comment

The 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: ?"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
"typed_keys": {
"type" : "boolean",
"description" : "Specify whether aggregation and suggester names should be prefixed by their respective types in the response"
},
"max_concurrent_searches" : {
"type" : "number",
"description" : "Controls the maximum number of concurrent searches the multi search api will execute"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"remote.info": {
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/remote-info.html",
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/5.5/cluster-remote-info.html",
"methods": ["GET"],
"url": {
"path": "/_remote/info",
Expand Down
666 changes: 347 additions & 319 deletions src/CodeGeneration/ApiGenerator/RestSpecification/Core/root.html

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
"ignore_unavailable": {
"type": "boolean",
"description": "Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown"
},
"verbose": {
"type": "boolean",
"description": "Whether to show verbose snapshot info or only show the basic info found in the repository index blob"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"xpack.info": {
"documentation": "Retrieve information about xpack, including build number/timestamp and license status",
"documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/info-api.html",
"methods": [ "GET" ],
"url": {
"path": "/_xpack",
Expand Down
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"
}
}
}
Loading