Skip to content

Commit e389a3a

Browse files
committed
Fix many _cat API issues
1 parent ae611bc commit e389a3a

24 files changed

+459
-217
lines changed

output/schema/schema.json

Lines changed: 318 additions & 91 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/validation-errors.json

Lines changed: 3 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -68,129 +68,49 @@
6868
"type_alias definition _spec_utils:Stringified / union_of / instance_of - No type definition for '_spec_utils.Stringified:T'"
6969
]
7070
},
71-
"cat.count": {
72-
"request": [
73-
"Request: query parameter 'master_timeout' does not exist in the json spec"
74-
],
75-
"response": []
76-
},
77-
"cat.fielddata": {
78-
"request": [
79-
"Request: query parameter 'master_timeout' does not exist in the json spec"
80-
],
81-
"response": []
82-
},
83-
"cat.health": {
84-
"request": [
85-
"Request: query parameter 'master_timeout' does not exist in the json spec"
86-
],
87-
"response": []
88-
},
8971
"cat.help": {
9072
"request": [
91-
"Request: query parameter 'format' does not exist in the json spec",
92-
"Request: query parameter 'h' does not exist in the json spec",
93-
"Request: query parameter 'master_timeout' does not exist in the json spec",
94-
"Request: query parameter 'v' does not exist in the json spec"
73+
"Request: missing json spec query parameter 'help'",
74+
"Request: missing json spec query parameter 's'"
9575
],
9676
"response": []
9777
},
9878
"cat.ml_data_frame_analytics": {
9979
"request": [
100-
"Request: query parameter 'master_timeout' does not exist in the json spec",
10180
"request definition cat.ml_data_frame_analytics:Request / query - Property 'h' is already defined in an ancestor class",
10281
"request definition cat.ml_data_frame_analytics:Request / query - Property 's' is already defined in an ancestor class"
10382
],
10483
"response": []
10584
},
10685
"cat.ml_datafeeds": {
10786
"request": [
108-
"Request: query parameter 'master_timeout' does not exist in the json spec",
10987
"request definition cat.ml_datafeeds:Request / query - Property 'h' is already defined in an ancestor class",
11088
"request definition cat.ml_datafeeds:Request / query - Property 's' is already defined in an ancestor class"
11189
],
11290
"response": []
11391
},
11492
"cat.ml_jobs": {
11593
"request": [
116-
"Request: query parameter 'master_timeout' does not exist in the json spec",
11794
"request definition cat.ml_jobs:Request / query - Property 'h' is already defined in an ancestor class",
11895
"request definition cat.ml_jobs:Request / query - Property 's' is already defined in an ancestor class"
11996
],
12097
"response": []
12198
},
12299
"cat.ml_trained_models": {
123100
"request": [
124-
"Request: query parameter 'master_timeout' does not exist in the json spec",
125-
"Request: missing json spec query parameter 'time'",
126101
"request definition cat.ml_trained_models:Request / query - Property 'h' is already defined in an ancestor class",
127102
"request definition cat.ml_trained_models:Request / query - Property 's' is already defined in an ancestor class"
128103
],
129104
"response": []
130105
},
131-
"cat.nodes": {
132-
"request": [
133-
"Request: missing json spec query parameter 'time'"
134-
],
135-
"response": []
136-
},
137-
"cat.pending_tasks": {
138-
"request": [
139-
"Request: missing json spec query parameter 'time'"
140-
],
141-
"response": []
142-
},
143-
"cat.plugins": {
144-
"request": [
145-
"Request: missing json spec query parameter 'include_bootstrap'"
146-
],
147-
"response": []
148-
},
149106
"cat.recovery": {
150107
"request": [
151-
"Request: query parameter 'master_timeout' does not exist in the json spec",
152-
"Request: missing json spec query parameter 'index'",
153-
"Request: missing json spec query parameter 'time'"
154-
],
155-
"response": []
156-
},
157-
"cat.repositories": {
158-
"request": [
159-
"Request: missing json spec query parameter 'local'"
160-
],
161-
"response": []
162-
},
163-
"cat.segments": {
164-
"request": [
165-
"Request: query parameter 'local' does not exist in the json spec",
166-
"Request: query parameter 'master_timeout' does not exist in the json spec"
167-
],
168-
"response": []
169-
},
170-
"cat.shards": {
171-
"request": [
172-
"Request: missing json spec query parameter 'time'"
173-
],
174-
"response": []
175-
},
176-
"cat.snapshots": {
177-
"request": [
178-
"Request: missing json spec query parameter 'time'"
179-
],
180-
"response": []
181-
},
182-
"cat.tasks": {
183-
"request": [
184-
"Request: query parameter 'node_id' does not exist in the json spec",
185-
"Request: query parameter 'master_timeout' does not exist in the json spec",
186-
"Request: missing json spec query parameter 'nodes'",
187-
"Request: missing json spec query parameter 'time'"
108+
"Request: missing json spec query parameter 'index'"
188109
],
189110
"response": []
190111
},
191112
"cat.transforms": {
192113
"request": [
193-
"Request: query parameter 'master_timeout' does not exist in the json spec",
194114
"request definition cat.transforms:Request / query - Property 'h' is already defined in an ancestor class",
195115
"request definition cat.transforms:Request / query - Property 's' is already defined in an ancestor class"
196116
],

specification/_spec_utils/behaviors.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,6 @@ export interface CommonCatQueryParameters {
105105
* @server_default false
106106
*/
107107
help?: boolean
108-
/**
109-
* Period to wait for a connection to the master node.
110-
* @server_default 30s
111-
*/
112-
master_timeout?: Duration
113108
/**
114109
* List of columns that determine how the table should be sorted.
115110
* Sorting defaults to ascending and can be changed by setting `:asc`

specification/cat/aliases/CatAliasesRequest.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
import { CatRequestBase } from '@cat/_types/CatBase'
2121
import { ExpandWildcards, Names } from '@_types/common'
22+
import {Duration} from "@_types/Time";
2223

2324
/**
2425
* Get aliases.
@@ -39,5 +40,10 @@ export interface Request extends CatRequestBase {
3940
}
4041
query_parameters: {
4142
expand_wildcards?: ExpandWildcards
43+
/**
44+
* Period to wait for a connection to the master node.
45+
* @server_default 30s
46+
*/
47+
master_timeout?: Duration
4248
}
4349
}

specification/cat/allocation/CatAllocationRequest.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
import { CatRequestBase } from '@cat/_types/CatBase'
2121
import { Bytes, NodeIds } from '@_types/common'
22+
import {Duration} from "@_types/Time";
2223

2324
/**
2425
* Get shard allocation information.
@@ -46,5 +47,10 @@ export interface Request extends CatRequestBase {
4647
* @server_default false
4748
*/
4849
local?: boolean
50+
/**
51+
* Period to wait for a connection to the master node.
52+
* @server_default 30s
53+
*/
54+
master_timeout?: Duration
4955
}
5056
}

specification/cat/component_templates/CatComponentTemplatesRequest.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
*/
1919

2020
import { CatRequestBase } from '@cat/_types/CatBase'
21+
import {Duration} from "@_types/Time";
2122

2223
/**
2324
* Get component templates.
@@ -45,5 +46,10 @@ export interface Request extends CatRequestBase {
4546
* @server_default false
4647
*/
4748
local?: boolean
49+
/**
50+
* Period to wait for a connection to the master node.
51+
* @server_default 30s
52+
*/
53+
master_timeout?: Duration
4854
}
4955
}

specification/cat/help/CatHelpRequest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ import { CatRequestBase } from '@cat/_types/CatBase'
2727
* @availability serverless stability=stable visibility=public
2828
* @doc_id cat
2929
*/
30-
export interface Request extends CatRequestBase {}
30+
export interface Request {}

specification/cat/help/CatHelpResponse.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@
1717
* under the License.
1818
*/
1919

20-
import { HelpRecord } from './types'
21-
20+
/**
21+
* The response is a string with line-separated list of all the `_cat` endpoints, starting with a `=^.^=` emoticon.
22+
*/
2223
export class Response {
23-
body: Array<HelpRecord>
24+
body: string
2425
}

specification/cat/help/types.ts

Lines changed: 0 additions & 22 deletions
This file was deleted.

specification/cat/indices/CatIndicesRequest.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
import { CatRequestBase } from '@cat/_types/CatBase'
2121
import { Bytes, ExpandWildcards, HealthStatus, Indices } from '@_types/common'
22-
import { TimeUnit } from '@_types/Time'
22+
import {Duration, TimeUnit} from '@_types/Time'
2323

2424
/**
2525
* Get index information.
@@ -73,5 +73,10 @@ export interface Request extends CatRequestBase {
7373
pri?: boolean
7474
/** The unit used to display time values. */
7575
time?: TimeUnit
76+
/**
77+
* Period to wait for a connection to the master node.
78+
* @server_default 30s
79+
*/
80+
master_timeout?: Duration
7681
}
7782
}

specification/cat/master/CatMasterRequest.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
*/
1919

2020
import { CatRequestBase } from '@cat/_types/CatBase'
21+
import {Duration} from "@_types/Time";
2122

2223
/**
2324
* Get master node information.
@@ -39,5 +40,10 @@ export interface Request extends CatRequestBase {
3940
* @server_default false
4041
*/
4142
local?: boolean
43+
/**
44+
* Period to wait for a connection to the master node.
45+
* @server_default 30s
46+
*/
47+
master_timeout?: Duration
4248
}
4349
}

specification/cat/ml_trained_models/CatTrainedModelsRequest.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import { CatRequestBase, CatTrainedModelsColumns } from '@cat/_types/CatBase'
2121
import { Bytes, Id } from '@_types/common'
2222
import { integer } from '@_types/Numeric'
23+
import {Duration} from "@_types/Time";
2324

2425
/**
2526
* Get trained models.
@@ -60,5 +61,9 @@ export interface Request extends CatRequestBase {
6061
from?: integer
6162
/** The maximum number of transforms to display. */
6263
size?: integer
64+
/**
65+
* Unit used to display time values.
66+
*/
67+
time?: Duration
6368
}
6469
}

specification/cat/nodeattrs/CatNodeAttributesRequest.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
*/
1919

2020
import { CatRequestBase } from '@cat/_types/CatBase'
21+
import {Duration} from "@_types/Time";
2122

2223
/**
2324
* Get node attribute information.
@@ -39,5 +40,10 @@ export interface Request extends CatRequestBase {
3940
* @server_default false
4041
*/
4142
local?: boolean
43+
/**
44+
* Period to wait for a connection to the master node.
45+
* @server_default 30s
46+
*/
47+
master_timeout?: Duration
4248
}
4349
}

specification/cat/nodes/CatNodesRequest.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
import { CatRequestBase } from '@cat/_types/CatBase'
2121
import { Bytes } from '@_types/common'
22+
import {Duration} from "@_types/Time";
2223

2324
/**
2425
* Get node information.
@@ -46,5 +47,14 @@ export interface Request extends CatRequestBase {
4647
* @server_default false
4748
*/
4849
include_unloaded_segments?: boolean
50+
/**
51+
* Period to wait for a connection to the master node.
52+
* @server_default 30s
53+
*/
54+
master_timeout?: Duration
55+
/**
56+
* Unit used to display time values.
57+
*/
58+
time?: Duration
4959
}
5060
}

specification/cat/pending_tasks/CatPendingTasksRequest.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
*/
1919

2020
import { CatRequestBase } from '@cat/_types/CatBase'
21+
import {Duration} from "@_types/Time";
2122

2223
/**
2324
* Get pending task information.
@@ -39,5 +40,14 @@ export interface Request extends CatRequestBase {
3940
* @server_default false
4041
*/
4142
local?: boolean
43+
/**
44+
* Period to wait for a connection to the master node.
45+
* @server_default 30s
46+
*/
47+
master_timeout?: Duration
48+
/**
49+
* Unit used to display time values.
50+
*/
51+
time?: Duration
4252
}
4353
}

specification/cat/plugins/CatPluginsRequest.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
*/
1919

2020
import { CatRequestBase } from '@cat/_types/CatBase'
21+
import {Duration} from "@_types/Time";
2122

2223
/**
2324
* Get plugin information.
@@ -31,6 +32,11 @@ import { CatRequestBase } from '@cat/_types/CatBase'
3132
*/
3233
export interface Request extends CatRequestBase {
3334
query_parameters: {
35+
/**
36+
* Include bootstrap plugins in the response
37+
* @server_default false
38+
*/
39+
include_bootstrap?: boolean
3440
/**
3541
* If `true`, the request computes the list of selected nodes from the
3642
* local cluster state. If `false` the list of selected nodes are computed
@@ -39,5 +45,10 @@ export interface Request extends CatRequestBase {
3945
* @server_default false
4046
*/
4147
local?: boolean
48+
/**
49+
* Period to wait for a connection to the master node.
50+
* @server_default 30s
51+
*/
52+
master_timeout?: Duration
4253
}
4354
}

0 commit comments

Comments
 (0)