From b1d47cc7d40e54d1fd97d94373cd8159b26f446f Mon Sep 17 00:00:00 2001 From: pquentin <42327+pquentin@users.noreply.github.com> Date: Tue, 8 Jul 2025 04:12:53 +0000 Subject: [PATCH 1/2] Update rest-api-spec --- output/schema/validation-errors.json | 15 +-------------- .../cluster.get_component_template.json | 8 ++++++++ .../cluster.put_component_template.json | 7 ++++--- specification/_json_spec/open_point_in_time.json | 5 +++++ 4 files changed, 18 insertions(+), 17 deletions(-) diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index 9ec979b999..c3ffdb7537 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -9,14 +9,7 @@ }, "cluster.get_component_template": { "request": [ - "Request: query parameter 'flat_settings' does not exist in the json spec" - ], - "response": [] - }, - "cluster.put_component_template": { - "request": [ - "Request: query parameter 'cause' does not exist in the json spec", - "Request: missing json spec query parameter 'timeout'" + "Request: missing json spec query parameter 'settings_filter'" ], "response": [] }, @@ -55,12 +48,6 @@ ], "response": [] }, - "open_point_in_time": { - "request": [ - "Request: query parameter 'max_concurrent_shard_requests' does not exist in the json spec" - ], - "response": [] - }, "reindex": { "request": [ "Request: query parameter 'require_alias' does not exist in the json spec", diff --git a/specification/_json_spec/cluster.get_component_template.json b/specification/_json_spec/cluster.get_component_template.json index d2d243120d..99f2611c81 100644 --- a/specification/_json_spec/cluster.get_component_template.json +++ b/specification/_json_spec/cluster.get_component_template.json @@ -40,6 +40,14 @@ "include_defaults": { "type": "boolean", "description": "Return all default configurations for the component template (default: false)" + }, + "flat_settings": { + "type": "boolean", + "description": "Return settings in flat format (default: false)" + }, + "settings_filter": { + "type": "string", + "description": "Filter out results, for example to filter out sensitive information. Supports wildcards or full settings keys" } } } diff --git a/specification/_json_spec/cluster.put_component_template.json b/specification/_json_spec/cluster.put_component_template.json index eed8da7344..a6ed996756 100644 --- a/specification/_json_spec/cluster.put_component_template.json +++ b/specification/_json_spec/cluster.put_component_template.json @@ -30,9 +30,10 @@ "description": "Whether the index template should only be added if new or can also replace an existing one", "default": false }, - "timeout": { - "type": "time", - "description": "Explicit operation timeout" + "cause": { + "type": "string", + "description": "User defined reason for create the component template", + "default": "api" }, "master_timeout": { "type": "time", diff --git a/specification/_json_spec/open_point_in_time.json b/specification/_json_spec/open_point_in_time.json index 3870c1f95f..b16d67286b 100644 --- a/specification/_json_spec/open_point_in_time.json +++ b/specification/_json_spec/open_point_in_time.json @@ -51,6 +51,11 @@ "allow_partial_search_results": { "type": "boolean", "description": "Specify whether to tolerate shards missing when creating the point-in-time, or otherwise throw an exception. (default: false)" + }, + "max_concurrent_shard_requests": { + "type": "number", + "description": "The number of concurrent shard requests per node executed concurrently when opening this point-in-time. This value should be used to limit the impact of opening the point-in-time on the cluster", + "default": 5 } }, "body": { From 3da3caaea405db85bc0414fa8145cee4cde36cbe Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Tue, 8 Jul 2025 10:52:55 +0400 Subject: [PATCH 2/2] Add settings_filter to cluster.get_component_template --- output/openapi/elasticsearch-openapi.json | 26 +++++++++++++++++ .../elasticsearch-serverless-openapi.json | 26 +++++++++++++++++ output/schema/schema.json | 29 ++++++++++++++++++- output/schema/validation-errors.json | 6 ---- output/typescript/types.ts | 1 + .../ClusterGetComponentTemplateRequest.ts | 4 +++ 6 files changed, 85 insertions(+), 7 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 4ffea9c32f..65ff4880a8 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -4333,6 +4333,9 @@ { "$ref": "#/components/parameters/cluster.get_component_template-flat_settings" }, + { + "$ref": "#/components/parameters/cluster.get_component_template-settings_filter" + }, { "$ref": "#/components/parameters/cluster.get_component_template-include_defaults" }, @@ -4644,6 +4647,9 @@ { "$ref": "#/components/parameters/cluster.get_component_template-flat_settings" }, + { + "$ref": "#/components/parameters/cluster.get_component_template-settings_filter" + }, { "$ref": "#/components/parameters/cluster.get_component_template-include_defaults" }, @@ -110361,6 +110367,26 @@ }, "style": "form" }, + "cluster.get_component_template-settings_filter": { + "in": "query", + "name": "settings_filter", + "description": "Filter out results, for example to filter out sensitive information. Supports wildcards or full settings keys", + "deprecated": false, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "style": "form" + }, "cluster.get_component_template-include_defaults": { "in": "query", "name": "include_defaults", diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index f3d20223b4..e40e1113cc 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -1678,6 +1678,9 @@ { "$ref": "#/components/parameters/cluster.get_component_template-flat_settings" }, + { + "$ref": "#/components/parameters/cluster.get_component_template-settings_filter" + }, { "$ref": "#/components/parameters/cluster.get_component_template-include_defaults" }, @@ -1879,6 +1882,9 @@ { "$ref": "#/components/parameters/cluster.get_component_template-flat_settings" }, + { + "$ref": "#/components/parameters/cluster.get_component_template-settings_filter" + }, { "$ref": "#/components/parameters/cluster.get_component_template-include_defaults" }, @@ -66595,6 +66601,26 @@ }, "style": "form" }, + "cluster.get_component_template-settings_filter": { + "in": "query", + "name": "settings_filter", + "description": "Filter out results, for example to filter out sensitive information. Supports wildcards or full settings keys", + "deprecated": false, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "style": "form" + }, "cluster.get_component_template-include_defaults": { "in": "query", "name": "include_defaults", diff --git a/output/schema/schema.json b/output/schema/schema.json index 1e830083a4..13d21fa4e1 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -120604,6 +120604,33 @@ } } }, + { + "description": "Filter out results, for example to filter out sensitive information. Supports wildcards or full settings keys", + "name": "settings_filter", + "required": false, + "type": { + "kind": "union_of", + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ] + } + }, { "availability": { "serverless": { @@ -120653,7 +120680,7 @@ } } ], - "specLocation": "cluster/get_component_template/ClusterGetComponentTemplateRequest.ts#L24-L77" + "specLocation": "cluster/get_component_template/ClusterGetComponentTemplateRequest.ts#L24-L81" }, { "kind": "response", diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index c3ffdb7537..f0914c731f 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -7,12 +7,6 @@ ], "response": [] }, - "cluster.get_component_template": { - "request": [ - "Request: missing json spec query parameter 'settings_filter'" - ], - "response": [] - }, "create": { "request": [ "Request: query parameter 'if_primary_term' does not exist in the json spec", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 461516175a..1c7feeae91 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -9449,6 +9449,7 @@ export type ClusterExistsComponentTemplateResponse = boolean export interface ClusterGetComponentTemplateRequest extends RequestBase { name?: Name flat_settings?: boolean + settings_filter?: string | string[] include_defaults?: boolean local?: boolean master_timeout?: Duration diff --git a/specification/cluster/get_component_template/ClusterGetComponentTemplateRequest.ts b/specification/cluster/get_component_template/ClusterGetComponentTemplateRequest.ts index cef948d618..4cb810c3d7 100644 --- a/specification/cluster/get_component_template/ClusterGetComponentTemplateRequest.ts +++ b/specification/cluster/get_component_template/ClusterGetComponentTemplateRequest.ts @@ -55,6 +55,10 @@ export interface Request extends RequestBase { * @server_default false */ flat_settings?: boolean + /** + * Filter out results, for example to filter out sensitive information. Supports wildcards or full settings keys + */ + settings_filter?: string | string[] /** * @server_default false * @availability stack since=8.11.0 stability=stable