diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index f4bd373de2..9b53c982ef 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -80650,6 +80650,12 @@ }, "_shards": { "$ref": "#/components/schemas/esql._types.EsqlShardInfo" + }, + "failures": { + "type": "array", + "items": { + "$ref": "#/components/schemas/esql._types.EsqlShardFailure" + } } }, "required": [ @@ -80681,12 +80687,6 @@ }, "failed": { "type": "number" - }, - "failures": { - "type": "array", - "items": { - "$ref": "#/components/schemas/esql._types.EsqlShardFailure" - } } }, "required": [ @@ -80697,10 +80697,18 @@ "type": "object", "properties": { "shard": { - "$ref": "#/components/schemas/_types.Id" + "type": "number" }, "index": { - "$ref": "#/components/schemas/_types.IndexName" + "oneOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + }, + { + "nullable": true, + "type": "string" + } + ] }, "node": { "$ref": "#/components/schemas/_types.NodeId" diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 2eb99359b7..26d08377e8 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -52321,6 +52321,12 @@ }, "_shards": { "$ref": "#/components/schemas/esql._types.EsqlShardInfo" + }, + "failures": { + "type": "array", + "items": { + "$ref": "#/components/schemas/esql._types.EsqlShardFailure" + } } }, "required": [ @@ -52352,12 +52358,6 @@ }, "failed": { "type": "number" - }, - "failures": { - "type": "array", - "items": { - "$ref": "#/components/schemas/esql._types.EsqlShardFailure" - } } }, "required": [ @@ -52368,10 +52368,18 @@ "type": "object", "properties": { "shard": { - "$ref": "#/components/schemas/_types.Id" + "type": "number" }, "index": { - "$ref": "#/components/schemas/_types.IndexName" + "oneOf": [ + { + "$ref": "#/components/schemas/_types.IndexName" + }, + { + "nullable": true, + "type": "string" + } + ] }, "node": { "$ref": "#/components/schemas/_types.NodeId" diff --git a/output/schema/schema.json b/output/schema/schema.json index f58f37f0af..d1d711e831 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -128411,9 +128411,23 @@ "namespace": "esql._types" } } + }, + { + "name": "failures", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "EsqlShardFailure", + "namespace": "esql._types" + } + } + } } ], - "specLocation": "esql/_types/EsqlResult.ts#L65-L70" + "specLocation": "esql/_types/EsqlResult.ts#L65-L71" }, { "kind": "interface", @@ -128536,7 +128550,7 @@ "name": "EsqlClusterStatus", "namespace": "esql._types" }, - "specLocation": "esql/_types/EsqlResult.ts#L72-L78" + "specLocation": "esql/_types/EsqlResult.ts#L73-L79" }, { "kind": "interface", @@ -128723,7 +128737,7 @@ "type": { "kind": "instance_of", "type": { - "name": "Id", + "name": "integer", "namespace": "_types" } } @@ -128732,11 +128746,23 @@ "name": "index", "required": true, "type": { - "kind": "instance_of", - "type": { - "name": "IndexName", - "namespace": "_types" - } + "kind": "union_of", + "items": [ + { + "kind": "instance_of", + "type": { + "name": "IndexName", + "namespace": "_types" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ] } }, { @@ -128814,23 +128840,9 @@ "namespace": "_types" } } - }, - { - "name": "failures", - "required": false, - "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "EsqlShardFailure", - "namespace": "esql._types" - } - } - } } ], - "specLocation": "esql/_types/EsqlResult.ts#L80-L86" + "specLocation": "esql/_types/EsqlResult.ts#L81-L86" }, { "kind": "interface", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 0c5884d960..2f4cbc247f 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -10773,6 +10773,7 @@ export interface EsqlEsqlClusterDetails { indices: string took?: DurationValue _shards?: EsqlEsqlShardInfo + failures?: EsqlEsqlShardFailure[] } export interface EsqlEsqlClusterInfo { @@ -10805,8 +10806,8 @@ export interface EsqlEsqlResult { } export interface EsqlEsqlShardFailure { - shard: Id - index: IndexName + shard: integer + index: IndexName | null node?: NodeId reason: ErrorCause } @@ -10816,7 +10817,6 @@ export interface EsqlEsqlShardInfo { successful?: integer skipped?: integer failed?: integer - failures?: EsqlEsqlShardFailure[] } export interface EsqlTableValuesContainer { diff --git a/specification/esql/_types/EsqlResult.ts b/specification/esql/_types/EsqlResult.ts index 6a7cefa8bd..649e323d2b 100644 --- a/specification/esql/_types/EsqlResult.ts +++ b/specification/esql/_types/EsqlResult.ts @@ -17,7 +17,7 @@ * under the License. */ -import { FieldValue, Id, IndexName, NodeId } from '@_types/common' +import { FieldValue, IndexName, NodeId } from '@_types/common' import { ErrorCause } from '@_types/Errors' import { integer } from '@_types/Numeric' import { DurationValue, UnitMillis } from '@_types/Time' @@ -67,6 +67,7 @@ export class EsqlClusterDetails { indices: string took?: DurationValue _shards?: EsqlShardInfo + failures?: EsqlShardFailure[] } export enum EsqlClusterStatus { @@ -82,12 +83,11 @@ export class EsqlShardInfo { successful?: integer skipped?: integer failed?: integer - failures?: EsqlShardFailure[] } export class EsqlShardFailure { - shard: Id - index: IndexName + shard: integer + index: IndexName | null node?: NodeId reason: ErrorCause }