Skip to content

Commit 060e13b

Browse files
authored
Feature/7.x/update ll client (#4381)
* make provisions for unions * update code and specs to latest for 7.x
1 parent 8156ea7 commit 060e13b

39 files changed

+822
-172
lines changed

src/ApiGenerator/Domain/Specification/QueryParameters.cs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@ namespace ApiGenerator.Domain.Specification
77
{
88
public class QueryParameters
99
{
10-
private static readonly string[] FieldsParams =
11-
{
12-
"fields", "_source_includes", "_source_excludes",
13-
};
10+
private static readonly string[] FieldsParams = { "fields", "_source_includes", "_source_excludes", };
1411

1512
public bool Skip { get; set; }
1613

@@ -72,7 +69,16 @@ public IEnumerable<string> DescriptionHighLevel
7269

7370
public string SetterLowLevel => "value";
7471

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

7783
public string TypeHighLevel
7884
{

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

Lines changed: 7 additions & 7 deletions
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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@
7070
"type":"enum",
7171
"description":"The unit in which to display time values",
7272
"options":[
73-
"d (Days)",
74-
"h (Hours)",
75-
"m (Minutes)",
76-
"s (Seconds)",
77-
"ms (Milliseconds)",
78-
"micros (Microseconds)",
79-
"nanos (Nanoseconds)"
73+
"d",
74+
"h",
75+
"m",
76+
"s",
77+
"ms",
78+
"micros",
79+
"nanos"
8080
]
8181
},
8282
"v":{

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

Lines changed: 7 additions & 7 deletions
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

Lines changed: 7 additions & 7 deletions
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

Lines changed: 7 additions & 7 deletions
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

Lines changed: 7 additions & 7 deletions
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

Lines changed: 7 additions & 7 deletions
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/reindex.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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)