From 287dcb37c0afd1fe26a1f4d7b22148504d20e844 Mon Sep 17 00:00:00 2001 From: Luigi DellAquila Date: Thu, 19 Dec 2024 15:12:03 +0100 Subject: [PATCH] Add shard_failures to EQL response spec --- output/openapi/elasticsearch-openapi.json | 7 +++++++ .../elasticsearch-serverless-openapi.json | 7 +++++++ output/schema/schema-serverless.json | 17 ++++++++++++++++- output/schema/schema.json | 17 ++++++++++++++++- output/typescript/types.ts | 1 + .../eql/_types/EqlSearchResponseBase.ts | 5 +++++ 6 files changed, 52 insertions(+), 2 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 94de5772b8..ecc388bce0 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -65830,6 +65830,13 @@ }, "hits": { "$ref": "#/components/schemas/eql._types:EqlHits" + }, + "shard_failures": { + "description": "Contains information about shard failures (if any), in case allow_partial_search_results=true", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types:ShardFailure" + } } }, "required": [ diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 0747b2fb73..0438fe0dc4 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -44305,6 +44305,13 @@ }, "hits": { "$ref": "#/components/schemas/eql._types:EqlHits" + }, + "shard_failures": { + "description": "Contains information about shard failures (if any), in case allow_partial_search_results=true", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types:ShardFailure" + } } }, "required": [ diff --git a/output/schema/schema-serverless.json b/output/schema/schema-serverless.json index 3220c6a119..979b9746e2 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -117597,9 +117597,24 @@ "namespace": "eql._types" } } + }, + { + "description": "Contains information about shard failures (if any), in case allow_partial_search_results=true", + "name": "shard_failures", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "ShardFailure", + "namespace": "_types" + } + } + } } ], - "specLocation": "eql/_types/EqlSearchResponseBase.ts#L24-L49" + "specLocation": "eql/_types/EqlSearchResponseBase.ts#L25-L54" }, { "generics": [ diff --git a/output/schema/schema.json b/output/schema/schema.json index bd918dbdb7..bf21a4431e 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -118065,9 +118065,24 @@ "namespace": "eql._types" } } + }, + { + "description": "Contains information about shard failures (if any), in case allow_partial_search_results=true", + "name": "shard_failures", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "ShardFailure", + "namespace": "_types" + } + } + } } ], - "specLocation": "eql/_types/EqlSearchResponseBase.ts#L24-L49" + "specLocation": "eql/_types/EqlSearchResponseBase.ts#L25-L54" }, { "kind": "interface", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index bfe38b2423..58020ba889 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -10327,6 +10327,7 @@ export interface EqlEqlSearchResponseBase { took?: DurationValue timed_out?: boolean hits: EqlEqlHits + shard_failures?: ShardFailure[] } export interface EqlHitsEvent { diff --git a/specification/eql/_types/EqlSearchResponseBase.ts b/specification/eql/_types/EqlSearchResponseBase.ts index f296ffd6bf..6789a5471d 100644 --- a/specification/eql/_types/EqlSearchResponseBase.ts +++ b/specification/eql/_types/EqlSearchResponseBase.ts @@ -18,6 +18,7 @@ */ import { Id } from '@_types/common' +import { ShardFailure } from '@_types/Errors' import { DurationValue, UnitMillis } from '@_types/Time' import { EqlHits } from './EqlHits' @@ -46,4 +47,8 @@ export class EqlSearchResponseBase { * Contains matching events and sequences. Also contains related metadata. */ hits: EqlHits + /** + * Contains information about shard failures (if any), in case allow_partial_search_results=true + */ + shard_failures?: ShardFailure[] }