From e426baf9ba745b8afa09449d1f765e8f17084b3d Mon Sep 17 00:00:00 2001 From: Lisa Cawley Date: Fri, 31 Jan 2025 08:17:30 -0800 Subject: [PATCH 1/2] [DOCS] Fix overlay for resolve cluster (#3670) (cherry picked from commit f37de4e6a0f0418ebf439b23072c246722be2a79) --- .../elasticsearch-openapi-overlays.yaml | 21 ++++++++++--------- output/openapi/elasticsearch-openapi.json | 4 +++- .../elasticsearch-serverless-openapi.json | 2 ++ output/schema/schema.json | 8 +++++-- .../remote_info/ClusterRemoteInfoResponse.ts | 2 +- 5 files changed, 23 insertions(+), 14 deletions(-) diff --git a/docs/overlays/elasticsearch-openapi-overlays.yaml b/docs/overlays/elasticsearch-openapi-overlays.yaml index 7c18a56ac9..3e5bacc6df 100644 --- a/docs/overlays/elasticsearch-openapi-overlays.yaml +++ b/docs/overlays/elasticsearch-openapi-overlays.yaml @@ -258,16 +258,6 @@ actions: examples: nodesInfoResponseExample1: $ref: "../../specification/nodes/info/examples/200_response/nodesInfoResponseExample1.yaml" - - target: "$.paths['/_resolve/cluster/{name}']['get']" - description: "Add examples for resolve cluster operation" - update: - responses: - 200: - content: - application/json: - examples: - resolveClusterResponseExample1: - $ref: "../../specification/indices/resolve_cluster/examples/200_response/ResolveClusterResponseExample1.yaml" ## Examples for connectors - target: "$.paths['/_connector/_sync_job/{connector_sync_job_id}/_error']['put']" description: "Add examples for connector job sync error operation" @@ -501,6 +491,17 @@ actions: examples: getIndicesRecoveryResponseExample1: $ref: "../../specification/indices/recovery/examples/200_response/indicesRecoveryResponseExample1.yaml" + - target: "$.components['responses']['indices.resolve_cluster#200']" + description: "Add examples for resolve cluster operation" + update: + responses: + content: + application/json: + examples: + resolveClusterResponseExample1: + $ref: "../../specification/indices/resolve_cluster/examples/200_response/ResolveClusterResponseExample1.yaml" + resolveClusterResponseExample2: + $ref: "../../specification/indices/resolve_cluster/examples/200_response/ResolveClusterResponseExample2.yaml" - target: "$.components['requestBodies']['indices.shrink']" description: "Add example for shrink index request" update: diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index fd79fb2e36..dd283c1fcb 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -66189,7 +66189,7 @@ "type": "number" }, "cluster_credentials": { - "description": "This field presents and has value of ::es_redacted:: only when the remote cluster is configured with the API key based model. Otherwise, the field is not present.", + "description": "This field is present and has a value of `::es_redacted::` only when the remote cluster is configured with the API key based model. Otherwise, the field is not present.", "type": "string" } }, @@ -108130,9 +108130,11 @@ "$ref": "#/components/schemas/_types:Duration" }, "allow_partial_search_results": { + "description": "Allow query execution also in case of shard failures.\nIf true, the query will keep running and will return results based on the available shards.\nFor sequences, the behavior can be further refined using allow_partial_sequence_results", "type": "boolean" }, "allow_partial_sequence_results": { + "description": "This flag applies only to sequences and has effect only if allow_partial_search_results=true.\nIf true, the sequence query will return results based on the available shards, ignoring the others.\nIf false, the sequence query will return successfully, but will always have empty results.", "type": "boolean" }, "size": { diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 9cc9a4d648..bc395e1668 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -63602,9 +63602,11 @@ "$ref": "#/components/schemas/_types:Duration" }, "allow_partial_search_results": { + "description": "Allow query execution also in case of shard failures.\nIf true, the query will keep running and will return results based on the available shards.\nFor sequences, the behavior can be further refined using allow_partial_sequence_results", "type": "boolean" }, "allow_partial_sequence_results": { + "description": "This flag applies only to sequences and has effect only if allow_partial_search_results=true.\nIf true, the sequence query will return results based on the available shards, ignoring the others.\nIf false, the sequence query will return successfully, but will always have empty results.", "type": "boolean" }, "size": { diff --git a/output/schema/schema.json b/output/schema/schema.json index b960202491..1cd829f5ba 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -111611,7 +111611,7 @@ } }, { - "description": "This field presents and has value of ::es_redacted:: only when the remote cluster is configured with the API key based model. Otherwise, the field is not present.", + "description": "This field is present and has a value of `::es_redacted::` only when the remote cluster is configured with the API key based model. Otherwise, the field is not present.", "name": "cluster_credentials", "required": false, "type": { @@ -121451,8 +121451,10 @@ } }, { + "description": "Allow query execution also in case of shard failures.\nIf true, the query will keep running and will return results based on the available shards.\nFor sequences, the behavior can be further refined using allow_partial_sequence_results", "name": "allow_partial_search_results", "required": false, + "serverDefault": true, "type": { "kind": "instance_of", "type": { @@ -121462,8 +121464,10 @@ } }, { + "description": "This flag applies only to sequences and has effect only if allow_partial_search_results=true.\nIf true, the sequence query will return results based on the available shards, ignoring the others.\nIf false, the sequence query will return successfully, but will always have empty results.", "name": "allow_partial_sequence_results", "required": false, + "serverDefault": false, "type": { "kind": "instance_of", "type": { @@ -121685,7 +121689,7 @@ } } ], - "specLocation": "eql/search/EqlSearchRequest.ts#L28-L149" + "specLocation": "eql/search/EqlSearchRequest.ts#L28-L161" }, { "kind": "response", diff --git a/specification/cluster/remote_info/ClusterRemoteInfoResponse.ts b/specification/cluster/remote_info/ClusterRemoteInfoResponse.ts index 3afe6d055b..25790ba838 100644 --- a/specification/cluster/remote_info/ClusterRemoteInfoResponse.ts +++ b/specification/cluster/remote_info/ClusterRemoteInfoResponse.ts @@ -78,6 +78,6 @@ export class ClusterRemoteProxyInfo { num_proxy_sockets_connected: integer /** The maximum number of socket connections to the remote cluster when proxy mode is configured. */ max_proxy_socket_connections: integer - /** This field presents and has value of ::es_redacted:: only when the remote cluster is configured with the API key based model. Otherwise, the field is not present. */ + /** This field is present and has a value of `::es_redacted::` only when the remote cluster is configured with the API key based model. Otherwise, the field is not present. */ cluster_credentials?: string } From ee503b8db9fa3506eb5e2335ba87857c3a9f0623 Mon Sep 17 00:00:00 2001 From: lcawl Date: Fri, 31 Jan 2025 09:09:41 -0800 Subject: [PATCH 2/2] Fix overlay --- docs/overlays/elasticsearch-openapi-overlays.yaml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/docs/overlays/elasticsearch-openapi-overlays.yaml b/docs/overlays/elasticsearch-openapi-overlays.yaml index 3e5bacc6df..3f66eb85d8 100644 --- a/docs/overlays/elasticsearch-openapi-overlays.yaml +++ b/docs/overlays/elasticsearch-openapi-overlays.yaml @@ -494,14 +494,13 @@ actions: - target: "$.components['responses']['indices.resolve_cluster#200']" description: "Add examples for resolve cluster operation" update: - responses: - content: - application/json: - examples: - resolveClusterResponseExample1: - $ref: "../../specification/indices/resolve_cluster/examples/200_response/ResolveClusterResponseExample1.yaml" - resolveClusterResponseExample2: - $ref: "../../specification/indices/resolve_cluster/examples/200_response/ResolveClusterResponseExample2.yaml" + content: + application/json: + examples: + resolveClusterResponseExample1: + $ref: "../../specification/indices/resolve_cluster/examples/200_response/ResolveClusterResponseExample1.yaml" + resolveClusterResponseExample2: + $ref: "../../specification/indices/resolve_cluster/examples/200_response/ResolveClusterResponseExample2.yaml" - target: "$.components['requestBodies']['indices.shrink']" description: "Add example for shrink index request" update: