diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 7db507fb18..6bf2dad4da 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -1969,6 +1969,12 @@ "parameters": [ { "$ref": "#/components/parameters/cat.segments#bytes" + }, + { + "$ref": "#/components/parameters/cat.segments#local" + }, + { + "$ref": "#/components/parameters/cat.segments#master_timeout" } ], "responses": { @@ -1992,6 +1998,12 @@ }, { "$ref": "#/components/parameters/cat.segments#bytes" + }, + { + "$ref": "#/components/parameters/cat.segments#local" + }, + { + "$ref": "#/components/parameters/cat.segments#master_timeout" } ], "responses": { @@ -2177,6 +2189,26 @@ "$ref": "#/components/schemas/_types:TimeUnit" }, "style": "form" + }, + { + "in": "query", + "name": "timeout", + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Duration" + }, + "style": "form" + }, + { + "in": "query", + "name": "wait_for_completion", + "description": "If `true`, the request blocks until the task has completed.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], "responses": { @@ -94601,6 +94633,26 @@ }, "style": "form" }, + "cat.segments#local": { + "in": "query", + "name": "local", + "description": "If `true`, the request computes the list of selected nodes from the\nlocal cluster state. If `false` the list of selected nodes are computed\nfrom the cluster state of the master node. In both cases the coordinating\nnode will send requests for further information to each selected node.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + "cat.segments#master_timeout": { + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Duration" + }, + "style": "form" + }, "cat.shards#index": { "in": "path", "name": "index", diff --git a/output/schema/schema.json b/output/schema/schema.json index 47eeedd7aa..3304aeac49 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -99840,9 +99840,35 @@ "namespace": "_types" } } + }, + { + "description": "If `true`, the request computes the list of selected nodes from the\nlocal cluster state. If `false` the list of selected nodes are computed\nfrom the cluster state of the master node. In both cases the coordinating\nnode will send requests for further information to each selected node.", + "name": "local", + "required": false, + "serverDefault": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "description": "Period to wait for a connection to the master node.", + "name": "master_timeout", + "required": false, + "serverDefault": "30s", + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } } ], - "specLocation": "cat/segments/CatSegmentsRequest.ts#L23-L50" + "specLocation": "cat/segments/CatSegmentsRequest.ts#L24-L64" }, { "kind": "response", @@ -101913,9 +101939,35 @@ "namespace": "_types" } } + }, + { + "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "name": "timeout", + "required": false, + "serverDefault": "30s", + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + }, + { + "description": "If `true`, the request blocks until the task has completed.", + "name": "wait_for_completion", + "required": false, + "serverDefault": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } } ], - "specLocation": "cat/tasks/CatTasksRequest.ts#L23-L53" + "specLocation": "cat/tasks/CatTasksRequest.ts#L24-L65" }, { "kind": "response", diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index b59435a5db..a192795a8d 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -89,6 +89,20 @@ ], "response": [] }, + "cat.segments": { + "request": [ + "Request: query parameter 'local' does not exist in the json spec", + "Request: query parameter 'master_timeout' does not exist in the json spec" + ], + "response": [] + }, + "cat.tasks": { + "request": [ + "Request: query parameter 'timeout' does not exist in the json spec", + "Request: query parameter 'wait_for_completion' does not exist in the json spec" + ], + "response": [] + }, "cat.transforms": { "request": [ "request definition cat.transforms:Request / query - Property 'h' is already defined in an ancestor class", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 8c1193d17f..1bfe9544ca 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -8222,6 +8222,8 @@ export type CatRepositoriesResponse = CatRepositoriesRepositoriesRecord[] export interface CatSegmentsRequest extends CatCatRequestBase { index?: Indices bytes?: Bytes + local?: boolean + master_timeout?: Duration } export type CatSegmentsResponse = CatSegmentsSegmentsRecord[] @@ -8541,6 +8543,8 @@ export interface CatTasksRequest extends CatCatRequestBase { nodes?: string[] parent_task_id?: string time?: TimeUnit + timeout?: Duration + wait_for_completion?: boolean } export type CatTasksResponse = CatTasksTasksRecord[] diff --git a/specification/cat/segments/CatSegmentsRequest.ts b/specification/cat/segments/CatSegmentsRequest.ts index be8d65abc4..3aada4f955 100644 --- a/specification/cat/segments/CatSegmentsRequest.ts +++ b/specification/cat/segments/CatSegmentsRequest.ts @@ -19,6 +19,7 @@ import { CatRequestBase } from '@cat/_types/CatBase' import { Bytes, Indices } from '@_types/common' +import { Duration } from '@_types/Time' /** * Get segment information. @@ -46,5 +47,18 @@ export interface Request extends CatRequestBase { * The unit used to display byte values. */ bytes?: Bytes + /** + * If `true`, the request computes the list of selected nodes from the + * local cluster state. If `false` the list of selected nodes are computed + * from the cluster state of the master node. In both cases the coordinating + * node will send requests for further information to each selected node. + * @server_default false + */ + local?: boolean + /** + * Period to wait for a connection to the master node. + * @server_default 30s + */ + master_timeout?: Duration } } diff --git a/specification/cat/tasks/CatTasksRequest.ts b/specification/cat/tasks/CatTasksRequest.ts index 5d524fd160..6743d62e09 100644 --- a/specification/cat/tasks/CatTasksRequest.ts +++ b/specification/cat/tasks/CatTasksRequest.ts @@ -18,7 +18,7 @@ */ import { CatRequestBase } from '@cat/_types/CatBase' -import { TimeUnit } from '@_types/Time' +import { Duration, TimeUnit } from '@_types/Time' /** * Get task information. @@ -49,5 +49,16 @@ export interface Request extends CatRequestBase { * Unit used to display time values. */ time?: TimeUnit + /** + * Period to wait for a response. + * If no response is received before the timeout expires, the request fails and returns an error. + * @server_default 30s + */ + timeout?: Duration + /** + * If `true`, the request blocks until the task has completed. + * @server_default false + */ + wait_for_completion?: boolean } }