Skip to content

Commit 0ff4c48

Browse files
committed
Update REST API spec to 5.6.5
- Maintain backwards binary compatibility for: - Count Routing param as string - Cancel Tasks NodeId and ParentTask method names - List Tasks NodeId and ParentTask method names - Add Grok Processor patterns - Add DescriptorForAttribute for RemoteInfoDescriptor
1 parent f640b05 commit 0ff4c48

38 files changed

+1407
-586
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using System.Collections.Generic;
2+
using ApiGenerator.Domain;
3+
4+
namespace ApiGenerator.Overrides.Descriptors
5+
{
6+
public class CancelTasksDescriptorOverrides : DescriptorOverridesBase
7+
{
8+
public override IDictionary<string, string> RenameQueryStringParams => new Dictionary<string, string>
9+
{
10+
{ "parent_task_id", "parent_task"},
11+
{ "nodes", "node_id"},
12+
};
13+
}
14+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using ApiGenerator.Domain;
2+
3+
namespace ApiGenerator.Overrides.Descriptors
4+
{
5+
public class CountDescriptorOverrides : DescriptorOverridesBase
6+
{
7+
public override CsharpMethod PatchMethod(CsharpMethod method)
8+
{
9+
method.Url.Params["routing"].Type = "string";
10+
return method;
11+
}
12+
}
13+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using System.Collections.Generic;
2+
3+
namespace ApiGenerator.Overrides.Descriptors
4+
{
5+
public class ListTasksDescriptorOverrides : DescriptorOverridesBase
6+
{
7+
public override IDictionary<string, string> RenameQueryStringParams => new Dictionary<string, string>
8+
{
9+
{ "parent_task_id", "parent_task"},
10+
{ "nodes", "node_id"},
11+
};
12+
}
13+
}

src/CodeGeneration/ApiGenerator/RestSpecification/Core/cat.segments.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
"type" : "string",
1717
"description" : "a short version of the Accept header, e.g. json, yaml"
1818
},
19+
"bytes": {
20+
"type": "enum",
21+
"description" : "The unit in which to display byte values",
22+
"options": [ "b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb" ]
23+
},
1924
"h": {
2025
"type": "list",
2126
"description" : "Comma-separated list of column names to display"

src/CodeGeneration/ApiGenerator/RestSpecification/Core/cat.shards.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
"type" : "string",
1717
"description" : "a short version of the Accept header, e.g. json, yaml"
1818
},
19+
"bytes": {
20+
"type": "enum",
21+
"description" : "The unit in which to display byte values",
22+
"options": [ "b", "k", "kb", "m", "mb", "g", "gb", "t", "tb", "p", "pb" ]
23+
},
1924
"local": {
2025
"type" : "boolean",
2126
"description" : "Return local information, do not retrieve the state from master node (default: false)"
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"cluster.remote_info": {
3+
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/5.x/cluster-remote-info.html",
4+
"methods": ["GET"],
5+
"url": {
6+
"path": "/_remote/info",
7+
"paths": ["/_remote/info"],
8+
"params": {}
9+
},
10+
"body": null
11+
}
12+
}

src/CodeGeneration/ApiGenerator/RestSpecification/Core/count.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
"description" : "Specify the node or shard the operation should be performed on (default: random)"
4040
},
4141
"routing": {
42-
"type" : "string",
43-
"description" : "Specific routing value"
42+
"type" : "list",
43+
"description" : "A comma-separated list of specific routing values"
4444
},
4545
"q": {
4646
"type" : "string",
@@ -67,6 +67,10 @@
6767
"lenient": {
6868
"type" : "boolean",
6969
"description" : "Specify whether format-based query failures (such as providing text to a numeric field) should be ignored"
70+
},
71+
"terminate_after" : {
72+
"type" : "number",
73+
"description" : "The maximum count for each shard, upon reaching which the query execution will terminate early"
7074
}
7175
}
7276
},

src/CodeGeneration/ApiGenerator/RestSpecification/Core/delete_script.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@
1818
}
1919
},
2020
"params" : {
21+
"timeout": {
22+
"type" : "time",
23+
"description" : "Explicit operation timeout"
24+
},
25+
"master_timeout": {
26+
"type" : "time",
27+
"description" : "Specify timeout for connection to master"
28+
}
2129
}
2230
},
2331
"body": null

src/CodeGeneration/ApiGenerator/RestSpecification/Core/exists_source.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"exists_source": {
3-
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/5.5/docs-get.html",
3+
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html",
44
"methods": ["HEAD"],
55
"url": {
66
"path": "/{index}/{type}/{id}/_source",

src/CodeGeneration/ApiGenerator/RestSpecification/Core/field_caps.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"field_caps": {
3-
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/5.5/search-field-caps.html",
3+
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/5.x/search-field-caps.html",
44
"methods": ["GET", "POST"],
55
"url": {
66
"path": "/_field_caps",

0 commit comments

Comments
 (0)