diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 415666fdcd..6148c10cfe 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -70195,10 +70195,17 @@ }, "percents": { "description": "The percentiles to calculate.", - "type": "array", - "items": { - "type": "number" - } + "oneOf": [ + { + "type": "number" + }, + { + "type": "array", + "items": { + "type": "number" + } + } + ] }, "hdr": { "description": "Uses the alternative High Dynamic Range Histogram algorithm to calculate percentiles.", diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index cf5429bf8d..86e419a08f 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -46410,10 +46410,17 @@ }, "percents": { "description": "The percentiles to calculate.", - "type": "array", - "items": { - "type": "number" - } + "oneOf": [ + { + "type": "number" + }, + { + "type": "array", + "items": { + "type": "number" + } + } + ] }, "hdr": { "description": "Uses the alternative High Dynamic Range Histogram algorithm to calculate percentiles.", diff --git a/output/schema/schema.json b/output/schema/schema.json index 0637f49b48..5fc5261a1f 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -69556,14 +69556,26 @@ "name": "percents", "required": false, "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "double", - "namespace": "_types" + "kind": "union_of", + "items": [ + { + "kind": "instance_of", + "type": { + "name": "double", + "namespace": "_types" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "double", + "namespace": "_types" + } + } } - } + ] } }, { diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 5da2be1259..27e6442d87 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -4175,7 +4175,7 @@ export interface AggregationsPercentilesAggregateBase extends AggregationsAggreg export interface AggregationsPercentilesAggregation extends AggregationsFormatMetricAggregationBase { keyed?: boolean - percents?: double[] + percents?: double | double[] hdr?: AggregationsHdrMethod tdigest?: AggregationsTDigest } diff --git a/specification/_types/aggregations/metric.ts b/specification/_types/aggregations/metric.ts index fb6a9b6775..d1e833fce6 100644 --- a/specification/_types/aggregations/metric.ts +++ b/specification/_types/aggregations/metric.ts @@ -227,7 +227,7 @@ export class PercentilesAggregation extends FormatMetricAggregationBase { /** * The percentiles to calculate. */ - percents?: double[] + percents?: double | double[] /** * Uses the alternative High Dynamic Range Histogram algorithm to calculate percentiles. */