From 3c67b98f152c12700d98ad6764a3e272878ed6a4 Mon Sep 17 00:00:00 2001 From: Margaret Pearce Date: Tue, 12 Nov 2024 00:23:28 -0500 Subject: [PATCH] Set parameter nodes instead of node_id on task.list (#3113) Co-authored-by: Quentin Pradet (cherry picked from commit d7200dc5f8e68dedcfd91363bab7090060d67d04) --- output/openapi/elasticsearch-openapi.json | 7 ++----- output/schema/schema.json | 13 +++++-------- output/schema/validation-errors.json | 4 +--- output/typescript/types.ts | 2 +- specification/tasks/list/ListTasksRequest.ts | 4 ++-- 5 files changed, 11 insertions(+), 19 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 82af57704b..d8eb5f4b91 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -32995,14 +32995,11 @@ }, { "in": "query", - "name": "node_id", + "name": "nodes", "description": "Comma-separated list of node IDs or names used to limit returned information.", "deprecated": false, "schema": { - "type": "array", - "items": { - "type": "string" - } + "$ref": "#/components/schemas/_types:NodeIds" }, "style": "form" }, diff --git a/output/schema/schema.json b/output/schema/schema.json index 2bdc35d88d..851cfc317d 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -205721,16 +205721,13 @@ }, { "description": "Comma-separated list of node IDs or names used to limit returned information.", - "name": "node_id", + "name": "nodes", "required": false, "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } + "kind": "instance_of", + "type": { + "name": "NodeIds", + "namespace": "_types" } } }, diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index 3e6e4455ba..a1ea93de9b 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -1190,9 +1190,7 @@ }, "tasks.list": { "request": [ - "Request: query parameter 'node_id' does not exist in the json spec", - "Request: query parameter 'master_timeout' does not exist in the json spec", - "Request: missing json spec query parameter 'nodes'" + "Request: query parameter 'master_timeout' does not exist in the json spec" ], "response": [] }, diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 680b3e10c5..892961f78b 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -19547,7 +19547,7 @@ export interface TasksListRequest extends RequestBase { actions?: string | string[] detailed?: boolean group_by?: TasksGroupBy - node_id?: string[] + nodes?: NodeIds parent_task_id?: Id master_timeout?: Duration timeout?: Duration diff --git a/specification/tasks/list/ListTasksRequest.ts b/specification/tasks/list/ListTasksRequest.ts index c829cb4a2e..00ba85ef35 100644 --- a/specification/tasks/list/ListTasksRequest.ts +++ b/specification/tasks/list/ListTasksRequest.ts @@ -19,7 +19,7 @@ import { GroupBy } from '@tasks/_types/GroupBy' import { RequestBase } from '@_types/Base' -import { Id } from '@_types/common' +import { Id, NodeIds } from '@_types/common' import { Duration } from '@_types/Time' /** @@ -48,7 +48,7 @@ export interface Request extends RequestBase { /** * Comma-separated list of node IDs or names used to limit returned information. */ - node_id?: string[] + nodes?: NodeIds /** * Parent task ID used to limit returned information. To return all tasks, omit this parameter or use a value of `-1`. */