Skip to content

Commit f27d114

Browse files
authored
update low level client for master (#4380)
* update low level client for master * make provisions for unions
1 parent e4c1d35 commit f27d114

File tree

121 files changed

+1458
-573
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+1458
-573
lines changed

src/ApiGenerator/Domain/Specification/QueryParameters.cs

+11-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ public class QueryParameters
1111
{
1212
"fields", "_source_includes", "_source_excludes",
1313
};
14-
14+
15+
1516
public bool Skip { get; set; }
1617

1718
public string ClsArgumentName => ClsName.ToCamelCase();
@@ -72,7 +73,15 @@ public IEnumerable<string> DescriptionHighLevel
7273

7374
public string SetterLowLevel => "value";
7475

75-
public string Type { get; set; }
76+
private string _type;
77+
public string Type
78+
{
79+
// TODO support unions
80+
get => !_type.Contains("|")
81+
? _type
82+
: _type.Split('|', StringSplitOptions.RemoveEmptyEntries).First().Trim();
83+
set => _type = value;
84+
}
7685

7786
public string TypeHighLevel
7887
{
@@ -127,7 +136,6 @@ public string TypeLowLevel
127136
}
128137
}
129138

130-
131139
public string InitializerGenerator(string @namespace, string type, string name, string key, string setter, params string[] doc) =>
132140
CodeGenerator.Property(@namespace, type, name, key, setter, Obsolete, doc);
133141
}

src/ApiGenerator/RestSpecification/Core/bulk.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"false",
5959
"wait_for"
6060
],
61-
"description":"If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes."
61+
"description":"If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes."
6262
},
6363
"routing":{
6464
"type":"string",

src/ApiGenerator/RestSpecification/Core/cat.indices.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,13 @@
8989
"type":"enum",
9090
"description":"The unit in which to display time values",
9191
"options":[
92-
"d (Days)",
93-
"h (Hours)",
94-
"m (Minutes)",
95-
"s (Seconds)",
96-
"ms (Milliseconds)",
97-
"micros (Microseconds)",
98-
"nanos (Nanoseconds)"
92+
"d",
93+
"h",
94+
"m",
95+
"s",
96+
"ms",
97+
"micros",
98+
"nanos"
9999
]
100100
},
101101
"v":{

src/ApiGenerator/RestSpecification/Core/cat.nodes.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@
6262
"type":"enum",
6363
"description":"The unit in which to display time values",
6464
"options":[
65-
"d (Days)",
66-
"h (Hours)",
67-
"m (Minutes)",
68-
"s (Seconds)",
69-
"ms (Milliseconds)",
70-
"micros (Microseconds)",
71-
"nanos (Nanoseconds)"
65+
"d",
66+
"h",
67+
"m",
68+
"s",
69+
"ms",
70+
"micros",
71+
"nanos"
7272
]
7373
},
7474
"v":{

src/ApiGenerator/RestSpecification/Core/cat.pending_tasks.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@
4545
"type":"enum",
4646
"description":"The unit in which to display time values",
4747
"options":[
48-
"d (Days)",
49-
"h (Hours)",
50-
"m (Minutes)",
51-
"s (Seconds)",
52-
"ms (Milliseconds)",
53-
"micros (Microseconds)",
54-
"nanos (Nanoseconds)"
48+
"d",
49+
"h",
50+
"m",
51+
"s",
52+
"ms",
53+
"micros",
54+
"nanos"
5555
]
5656
},
5757
"v":{

src/ApiGenerator/RestSpecification/Core/cat.recovery.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@
8080
"type":"enum",
8181
"description":"The unit in which to display time values",
8282
"options":[
83-
"d (Days)",
84-
"h (Hours)",
85-
"m (Minutes)",
86-
"s (Seconds)",
87-
"ms (Milliseconds)",
88-
"micros (Microseconds)",
89-
"nanos (Nanoseconds)"
83+
"d",
84+
"h",
85+
"m",
86+
"s",
87+
"ms",
88+
"micros",
89+
"nanos"
9090
]
9191
},
9292
"v":{

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

+7-7
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@
7474
"type":"enum",
7575
"description":"The unit in which to display time values",
7676
"options":[
77-
"d (Days)",
78-
"h (Hours)",
79-
"m (Minutes)",
80-
"s (Seconds)",
81-
"ms (Milliseconds)",
82-
"micros (Microseconds)",
83-
"nanos (Nanoseconds)"
77+
"d",
78+
"h",
79+
"m",
80+
"s",
81+
"ms",
82+
"micros",
83+
"nanos"
8484
]
8585
},
8686
"v":{

src/ApiGenerator/RestSpecification/Core/cat.snapshots.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,13 @@
5858
"type":"enum",
5959
"description":"The unit in which to display time values",
6060
"options":[
61-
"d (Days)",
62-
"h (Hours)",
63-
"m (Minutes)",
64-
"s (Seconds)",
65-
"ms (Milliseconds)",
66-
"micros (Microseconds)",
67-
"nanos (Nanoseconds)"
61+
"d",
62+
"h",
63+
"m",
64+
"s",
65+
"ms",
66+
"micros",
67+
"nanos"
6868
]
6969
},
7070
"v":{

src/ApiGenerator/RestSpecification/Core/cat.tasks.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@
5353
"type":"enum",
5454
"description":"The unit in which to display time values",
5555
"options":[
56-
"d (Days)",
57-
"h (Hours)",
58-
"m (Minutes)",
59-
"s (Seconds)",
60-
"ms (Milliseconds)",
61-
"micros (Microseconds)",
62-
"nanos (Nanoseconds)"
56+
"d",
57+
"h",
58+
"m",
59+
"s",
60+
"ms",
61+
"micros",
62+
"nanos"
6363
]
6464
},
6565
"v":{

src/ApiGenerator/RestSpecification/Core/delete.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"false",
6363
"wait_for"
6464
],
65-
"description":"If `true` then refresh the effected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes."
65+
"description":"If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes."
6666
},
6767
"routing":{
6868
"type":"string",

src/ApiGenerator/RestSpecification/Core/delete_by_query.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@
146146
},
147147
"refresh":{
148148
"type":"boolean",
149-
"description":"Should the effected indexes be refreshed?"
149+
"description":"Should the affected indexes be refreshed?"
150150
},
151151
"timeout":{
152152
"type":"time",
@@ -173,9 +173,9 @@
173173
"description":"The throttle for this request in sub-requests per second. -1 means no throttle."
174174
},
175175
"slices":{
176-
"type":"number",
176+
"type":"number|string",
177177
"default":1,
178-
"description":"The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks."
178+
"description":"The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks. Can be set to `auto`."
179179
}
180180
},
181181
"body":{

src/ApiGenerator/RestSpecification/Core/reindex.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"params":{
1919
"refresh":{
2020
"type":"boolean",
21-
"description":"Should the effected indexes be refreshed?"
21+
"description":"Should the affected indexes be refreshed?"
2222
},
2323
"timeout":{
2424
"type":"time",
@@ -45,9 +45,9 @@
4545
"default":"5m"
4646
},
4747
"slices":{
48-
"type":"number",
48+
"type":"number|string",
4949
"default":1,
50-
"description":"The number of slices this task should be divided into. Defaults to 1 meaning the task isn't sliced into subtasks."
50+
"description":"The number of slices this task should be divided into. Defaults to 1, meaning the task isn't sliced into subtasks. Can be set to `auto`."
5151
},
5252
"max_docs":{
5353
"type":"number",

0 commit comments

Comments
 (0)