From ab633713d578c19b802a2b318a31b36787e5618c Mon Sep 17 00:00:00 2001 From: pquentin <42327+pquentin@users.noreply.github.com> Date: Tue, 15 Jul 2025 11:36:31 +0000 Subject: [PATCH 1/3] Update rest-api-spec --- output/openapi/elasticsearch-openapi.json | 2 ++ .../elasticsearch-serverless-openapi.json | 2 ++ output/schema/schema.json | 2 ++ output/schema/validation-errors.json | 14 ++------------ specification/_json_spec/create.json | 8 ++++++++ specification/_json_spec/eql.search.json | 19 +++++++++++++++++++ .../snapshot.repository_analyze.json | 4 ++++ 7 files changed, 39 insertions(+), 12 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 21b61df647..02b73a5bd8 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -117037,6 +117037,7 @@ "eql.search-allow_no_indices": { "in": "query", "name": "allow_no_indices", + "description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)", "deprecated": false, "schema": { "type": "boolean" @@ -117066,6 +117067,7 @@ "eql.search-expand_wildcards": { "in": "query", "name": "expand_wildcards", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index c85adb07e4..b48c2c07d6 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -70732,6 +70732,7 @@ "eql.search-allow_no_indices": { "in": "query", "name": "allow_no_indices", + "description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)", "deprecated": false, "schema": { "type": "boolean" @@ -70761,6 +70762,7 @@ "eql.search-expand_wildcards": { "in": "query", "name": "expand_wildcards", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.", "deprecated": false, "schema": { "$ref": "#/components/schemas/_types.ExpandWildcards" diff --git a/output/schema/schema.json b/output/schema/schema.json index 94052d62c7..45b5ee0339 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -135947,6 +135947,7 @@ ], "query": [ { + "description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)", "name": "allow_no_indices", "required": false, "serverDefault": true, @@ -135985,6 +135986,7 @@ } }, { + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both.", "name": "expand_wildcards", "required": false, "serverDefault": "open", diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index 78cbf554d3..2785e071a6 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -4,17 +4,13 @@ "request": [ "Request: query parameter 'if_primary_term' does not exist in the json spec", "Request: query parameter 'if_seq_no' does not exist in the json spec", - "Request: query parameter 'op_type' does not exist in the json spec", - "Request: query parameter 'require_alias' does not exist in the json spec", - "Request: query parameter 'require_data_stream' does not exist in the json spec" + "Request: query parameter 'op_type' does not exist in the json spec" ], "response": [] }, "eql.search": { "request": [ - "Request: query parameter 'allow_no_indices' does not exist in the json spec", - "Request: query parameter 'expand_wildcards' does not exist in the json spec", - "Request: query parameter 'ignore_unavailable' does not exist in the json spec" + "Request: missing json spec query parameter 'ccs_minimize_roundtrips'" ], "response": [] }, @@ -41,12 +37,6 @@ ], "response": [] }, - "snapshot.repository_analyze": { - "request": [ - "Request: query parameter 'register_operation_count' does not exist in the json spec" - ], - "response": [] - }, "xpack.info": { "request": [ "request definition xpack.info:Request / query - Property 'human' is already defined in an ancestor class" diff --git a/specification/_json_spec/create.json b/specification/_json_spec/create.json index ffa5e0f26e..03038a9366 100644 --- a/specification/_json_spec/create.json +++ b/specification/_json_spec/create.json @@ -62,6 +62,14 @@ "include_source_on_error": { "type": "boolean", "description": "True or false if to include the document source in the error message in case of parsing errors. Defaults to true." + }, + "require_alias": { + "type": "boolean", + "description": "When true, requires destination to be an alias. Default is false" + }, + "require_data_stream": { + "type": "boolean", + "description": "When true, requires destination to be a data stream (existing or to be created). Default is false" } }, "body": { diff --git a/specification/_json_spec/eql.search.json b/specification/_json_spec/eql.search.json index 1d9831a6e8..92568e69b1 100644 --- a/specification/_json_spec/eql.search.json +++ b/specification/_json_spec/eql.search.json @@ -48,6 +48,25 @@ "type": "boolean", "description": "Control whether a sequence query should return partial results or no results at all in case of shard failures. This option has effect only if [allow_partial_search_results] is true.", "default": false + }, + "ccs_minimize_roundtrips": { + "type": "boolean", + "description": "Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution", + "default": true + }, + "ignore_unavailable": { + "type": "boolean", + "description": "Whether specified concrete indices should be ignored when unavailable (missing or closed)" + }, + "allow_no_indices": { + "type": "boolean", + "description": "Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)" + }, + "expand_wildcards": { + "type": "enum", + "options": ["open", "closed", "hidden", "none", "all"], + "default": "open", + "description": "Whether to expand wildcard expression to concrete indices that are open, closed or both." } }, "body": { diff --git a/specification/_json_spec/snapshot.repository_analyze.json b/specification/_json_spec/snapshot.repository_analyze.json index d80c4bc122..2967e427be 100644 --- a/specification/_json_spec/snapshot.repository_analyze.json +++ b/specification/_json_spec/snapshot.repository_analyze.json @@ -32,6 +32,10 @@ "type": "number", "description": "Number of operations to run concurrently during the test. Defaults to 10." }, + "register_operation_count": { + "type": "number", + "description": "The minimum number of linearizable register operations to perform in total. Defaults to 10." + }, "read_node_count": { "type": "number", "description": "Number of nodes on which to read a blob after writing. Defaults to 10." From 5964b74721c031941c4d30b3dea72e392672125d Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Tue, 15 Jul 2025 15:42:46 +0400 Subject: [PATCH 2/3] Add ccs_minimize_roundtrips --- output/openapi/elasticsearch-openapi.json | 16 ++++++++++++++++ .../elasticsearch-serverless-openapi.json | 16 ++++++++++++++++ output/schema/schema.json | 15 ++++++++++++++- output/schema/validation-errors.json | 6 ------ output/typescript/types.ts | 1 + specification/eql/search/EqlSearchRequest.ts | 5 +++++ 6 files changed, 52 insertions(+), 7 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 02b73a5bd8..df5790622f 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -10487,6 +10487,9 @@ { "$ref": "#/components/parameters/eql.search-expand_wildcards" }, + { + "$ref": "#/components/parameters/eql.search-ccs_minimize_roundtrips" + }, { "$ref": "#/components/parameters/eql.search-ignore_unavailable" }, @@ -10543,6 +10546,9 @@ { "$ref": "#/components/parameters/eql.search-expand_wildcards" }, + { + "$ref": "#/components/parameters/eql.search-ccs_minimize_roundtrips" + }, { "$ref": "#/components/parameters/eql.search-ignore_unavailable" }, @@ -117074,6 +117080,16 @@ }, "style": "form" }, + "eql.search-ccs_minimize_roundtrips": { + "in": "query", + "name": "ccs_minimize_roundtrips", + "description": "Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, "eql.search-ignore_unavailable": { "in": "query", "name": "ignore_unavailable", diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index b48c2c07d6..bd6ca1d615 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -6040,6 +6040,9 @@ { "$ref": "#/components/parameters/eql.search-expand_wildcards" }, + { + "$ref": "#/components/parameters/eql.search-ccs_minimize_roundtrips" + }, { "$ref": "#/components/parameters/eql.search-ignore_unavailable" }, @@ -6096,6 +6099,9 @@ { "$ref": "#/components/parameters/eql.search-expand_wildcards" }, + { + "$ref": "#/components/parameters/eql.search-ccs_minimize_roundtrips" + }, { "$ref": "#/components/parameters/eql.search-ignore_unavailable" }, @@ -70769,6 +70775,16 @@ }, "style": "form" }, + "eql.search-ccs_minimize_roundtrips": { + "in": "query", + "name": "ccs_minimize_roundtrips", + "description": "Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, "eql.search-ignore_unavailable": { "in": "query", "name": "ignore_unavailable", diff --git a/output/schema/schema.json b/output/schema/schema.json index 45b5ee0339..ff09f77c9b 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -135998,6 +135998,19 @@ } } }, + { + "description": "Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution", + "name": "ccs_minimize_roundtrips", + "required": false, + "serverDefault": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, { "description": "If true, missing or closed indices are not included in the response.", "name": "ignore_unavailable", @@ -136050,7 +136063,7 @@ } } ], - "specLocation": "eql/search/EqlSearchRequest.ts#L28-L161" + "specLocation": "eql/search/EqlSearchRequest.ts#L28-L166" }, { "kind": "response", diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index 2785e071a6..7e8c1455f8 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -8,12 +8,6 @@ ], "response": [] }, - "eql.search": { - "request": [ - "Request: missing json spec query parameter 'ccs_minimize_roundtrips'" - ], - "response": [] - }, "msearch": { "request": [ "Request: query parameter 'allow_no_indices' does not exist in the json spec", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 2c15997c27..e1a16a14e4 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -10834,6 +10834,7 @@ export interface EqlSearchRequest extends RequestBase { allow_partial_search_results?: boolean allow_partial_sequence_results?: boolean expand_wildcards?: ExpandWildcards + ccs_minimize_roundtrips?: boolean ignore_unavailable?: boolean keep_alive?: Duration keep_on_completion?: boolean diff --git a/specification/eql/search/EqlSearchRequest.ts b/specification/eql/search/EqlSearchRequest.ts index bea2938a0b..7365746f20 100644 --- a/specification/eql/search/EqlSearchRequest.ts +++ b/specification/eql/search/EqlSearchRequest.ts @@ -65,6 +65,11 @@ export interface Request extends RequestBase { * @server_default open */ expand_wildcards?: ExpandWildcards + /** + * Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution + * @server_default true + */ + ccs_minimize_roundtrips?: boolean /** * If true, missing or closed indices are not included in the response. * @server_default true From 11c4e8ef8b316779db06216d96e733b306974511 Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Tue, 15 Jul 2025 15:46:19 +0400 Subject: [PATCH 3/3] Remove invalid query parameters from CreateRequest --- output/openapi/elasticsearch-openapi.json | 62 +++---------------- .../elasticsearch-serverless-openapi.json | 62 +++---------------- output/schema/schema.json | 42 +------------ output/schema/validation-errors.json | 8 --- output/typescript/types.ts | 3 - specification/_global/create/CreateRequest.ts | 22 ------- 6 files changed, 15 insertions(+), 184 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index df5790622f..441003ddae 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -8309,18 +8309,9 @@ { "$ref": "#/components/parameters/create-id" }, - { - "$ref": "#/components/parameters/create-if_primary_term" - }, - { - "$ref": "#/components/parameters/create-if_seq_no" - }, { "$ref": "#/components/parameters/create-include_source_on_error" }, - { - "$ref": "#/components/parameters/create-op_type" - }, { "$ref": "#/components/parameters/create-pipeline" }, @@ -8383,18 +8374,9 @@ { "$ref": "#/components/parameters/create-id" }, - { - "$ref": "#/components/parameters/create-if_primary_term" - }, - { - "$ref": "#/components/parameters/create-if_seq_no" - }, { "$ref": "#/components/parameters/create-include_source_on_error" }, - { - "$ref": "#/components/parameters/create-op_type" - }, { "$ref": "#/components/parameters/create-pipeline" }, @@ -82095,13 +82077,6 @@ "scheduled" ] }, - "_types.OpType": { - "type": "string", - "enum": [ - "index", - "create" - ] - }, "_types.WriteResponseBase": { "type": "object", "properties": { @@ -84650,6 +84625,13 @@ "phase" ] }, + "_types.OpType": { + "type": "string", + "enum": [ + "index", + "create" + ] + }, "indices._types.IndicesBlockOptions": { "type": "string", "enum": [ @@ -116878,26 +116860,6 @@ }, "style": "simple" }, - "create-if_primary_term": { - "in": "query", - "name": "if_primary_term", - "description": "Only perform the operation if the document has this primary term.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "create-if_seq_no": { - "in": "query", - "name": "if_seq_no", - "description": "Only perform the operation if the document has this sequence number.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.SequenceNumber" - }, - "style": "form" - }, "create-include_source_on_error": { "in": "query", "name": "include_source_on_error", @@ -116908,16 +116870,6 @@ }, "style": "form" }, - "create-op_type": { - "in": "query", - "name": "op_type", - "description": "Set to `create` to only index the document if it does not already exist (put if absent).\nIf a document with the specified `_id` already exists, the indexing operation will fail.\nThe behavior is the same as using the `/_create` endpoint.\nIf a document ID is specified, this paramater defaults to `index`.\nOtherwise, it defaults to `create`.\nIf the request targets a data stream, an `op_type` of `create` is required.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.OpType" - }, - "style": "form" - }, "create-pipeline": { "in": "query", "name": "pipeline", diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index bd6ca1d615..3e7aa35336 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -4178,18 +4178,9 @@ { "$ref": "#/components/parameters/create-id" }, - { - "$ref": "#/components/parameters/create-if_primary_term" - }, - { - "$ref": "#/components/parameters/create-if_seq_no" - }, { "$ref": "#/components/parameters/create-include_source_on_error" }, - { - "$ref": "#/components/parameters/create-op_type" - }, { "$ref": "#/components/parameters/create-pipeline" }, @@ -4252,18 +4243,9 @@ { "$ref": "#/components/parameters/create-id" }, - { - "$ref": "#/components/parameters/create-if_primary_term" - }, - { - "$ref": "#/components/parameters/create-if_seq_no" - }, { "$ref": "#/components/parameters/create-include_source_on_error" }, - { - "$ref": "#/components/parameters/create-op_type" - }, { "$ref": "#/components/parameters/create-pipeline" }, @@ -53252,13 +53234,6 @@ "scheduled" ] }, - "_types.OpType": { - "type": "string", - "enum": [ - "index", - "create" - ] - }, "_types.WriteResponseBase": { "type": "object", "properties": { @@ -54178,6 +54153,13 @@ "weight" ] }, + "_types.OpType": { + "type": "string", + "enum": [ + "index", + "create" + ] + }, "indices._types.IndicesBlockOptions": { "type": "string", "enum": [ @@ -70573,26 +70555,6 @@ }, "style": "simple" }, - "create-if_primary_term": { - "in": "query", - "name": "if_primary_term", - "description": "Only perform the operation if the document has this primary term.", - "deprecated": false, - "schema": { - "type": "number" - }, - "style": "form" - }, - "create-if_seq_no": { - "in": "query", - "name": "if_seq_no", - "description": "Only perform the operation if the document has this sequence number.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.SequenceNumber" - }, - "style": "form" - }, "create-include_source_on_error": { "in": "query", "name": "include_source_on_error", @@ -70603,16 +70565,6 @@ }, "style": "form" }, - "create-op_type": { - "in": "query", - "name": "op_type", - "description": "Set to `create` to only index the document if it does not already exist (put if absent).\nIf a document with the specified `_id` already exists, the indexing operation will fail.\nThe behavior is the same as using the `/_create` endpoint.\nIf a document ID is specified, this paramater defaults to `index`.\nOtherwise, it defaults to `create`.\nIf the request targets a data stream, an `op_type` of `create` is required.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types.OpType" - }, - "style": "form" - }, "create-pipeline": { "in": "query", "name": "pipeline", diff --git a/output/schema/schema.json b/output/schema/schema.json index ff09f77c9b..d092b2a9b0 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -26283,34 +26283,6 @@ } ], "query": [ - { - "description": "Only perform the operation if the document has this primary term.", - "extDocId": "optimistic-concurrency", - "extDocUrl": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/optimistic-concurrency-control", - "name": "if_primary_term", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "long", - "namespace": "_types" - } - } - }, - { - "description": "Only perform the operation if the document has this sequence number.", - "extDocId": "optimistic-concurrency", - "extDocUrl": "https://www.elastic.co/docs/reference/elasticsearch/rest-apis/optimistic-concurrency-control", - "name": "if_seq_no", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "SequenceNumber", - "namespace": "_types" - } - } - }, { "description": "True or false if to include the document source in the error message in case of parsing errors.", "name": "include_source_on_error", @@ -26324,18 +26296,6 @@ } } }, - { - "description": "Set to `create` to only index the document if it does not already exist (put if absent).\nIf a document with the specified `_id` already exists, the indexing operation will fail.\nThe behavior is the same as using the `/_create` endpoint.\nIf a document ID is specified, this paramater defaults to `index`.\nOtherwise, it defaults to `create`.\nIf the request targets a data stream, an `op_type` of `create` is required.", - "name": "op_type", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "OpType", - "namespace": "_types" - } - } - }, { "description": "The ID of the pipeline to use to preprocess incoming documents.\nIf the index has a default ingest pipeline specified, setting the value to `_none` turns off the default ingest pipeline for this request.\nIf a final pipeline is configured, it will always run regardless of the value of this parameter.", "name": "pipeline", @@ -26450,7 +26410,7 @@ } } ], - "specLocation": "_global/create/CreateRequest.ts#L35-L221" + "specLocation": "_global/create/CreateRequest.ts#L35-L202" }, { "kind": "response", diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index 7e8c1455f8..c3c8b12ffb 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -1,13 +1,5 @@ { "endpointErrors": { - "create": { - "request": [ - "Request: query parameter 'if_primary_term' does not exist in the json spec", - "Request: query parameter 'if_seq_no' does not exist in the json spec", - "Request: query parameter 'op_type' does not exist in the json spec" - ], - "response": [] - }, "msearch": { "request": [ "Request: query parameter 'allow_no_indices' does not exist in the json spec", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index e1a16a14e4..5de35d3bc2 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -159,10 +159,7 @@ export interface CountResponse { export interface CreateRequest extends RequestBase { id: Id index: IndexName - if_primary_term?: long - if_seq_no?: SequenceNumber include_source_on_error?: boolean - op_type?: OpType pipeline?: string refresh?: Refresh require_alias?: boolean diff --git a/specification/_global/create/CreateRequest.ts b/specification/_global/create/CreateRequest.ts index 35dcdcb72d..06e19ff024 100644 --- a/specification/_global/create/CreateRequest.ts +++ b/specification/_global/create/CreateRequest.ts @@ -21,15 +21,12 @@ import { RequestBase } from '@_types/Base' import { Id, IndexName, - OpType, Refresh, Routing, - SequenceNumber, VersionNumber, VersionType, WaitForActiveShards } from '@_types/common' -import { long } from '@_types/Numeric' import { Duration } from '@_types/Time' /** @@ -134,30 +131,11 @@ export interface Request extends RequestBase { index: IndexName } query_parameters: { - /** - * Only perform the operation if the document has this primary term. - * @ext_doc_id optimistic-concurrency - */ - if_primary_term?: long - /** - * Only perform the operation if the document has this sequence number. - * @ext_doc_id optimistic-concurrency - */ - if_seq_no?: SequenceNumber /** * True or false if to include the document source in the error message in case of parsing errors. * @server_default true */ include_source_on_error?: boolean - /** - * Set to `create` to only index the document if it does not already exist (put if absent). - * If a document with the specified `_id` already exists, the indexing operation will fail. - * The behavior is the same as using the `/_create` endpoint. - * If a document ID is specified, this paramater defaults to `index`. - * Otherwise, it defaults to `create`. - * If the request targets a data stream, an `op_type` of `create` is required. - */ - op_type?: OpType /** * The ID of the pipeline to use to preprocess incoming documents. * If the index has a default ingest pipeline specified, setting the value to `_none` turns off the default ingest pipeline for this request.