From ff0f0031e7c7a8936c98b517a958da09fc219ab1 Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Tue, 28 Oct 2025 15:41:08 +0400 Subject: [PATCH] Mark GeoLineAggregation sort as optional While it's required most of the time, it's optional when in a sub-aggregation inside a time_series aggregation, as mentioned in the comment. --- output/openapi/elasticsearch-openapi.json | 3 +-- output/openapi/elasticsearch-serverless-openapi.json | 3 +-- output/schema/schema.json | 2 +- output/typescript/types.ts | 2 +- specification/_types/aggregations/metric.ts | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 415666fdcd..6284cacb39 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -69072,8 +69072,7 @@ } }, "required": [ - "point", - "sort" + "point" ] }, "_types.aggregations.GeoLinePoint": { diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index cf5429bf8d..e8360e450f 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -45287,8 +45287,7 @@ } }, "required": [ - "point", - "sort" + "point" ] }, "_types.aggregations.GeoLinePoint": { diff --git a/output/schema/schema.json b/output/schema/schema.json index 0637f49b48..b0912fe160 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -66211,7 +66211,7 @@ { "description": "The name of the numeric field to use as the sort key for ordering the points.\nWhen the `geo_line` aggregation is nested inside a `time_series` aggregation, this field defaults to `@timestamp`, and any other value will result in error.", "name": "sort", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 5da2be1259..cedd9df86b 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -3767,7 +3767,7 @@ export interface AggregationsGeoLineAggregate extends AggregationsAggregateBase export interface AggregationsGeoLineAggregation { point: AggregationsGeoLinePoint - sort: AggregationsGeoLineSort + sort?: AggregationsGeoLineSort include_sort?: boolean sort_order?: SortOrder size?: integer diff --git a/specification/_types/aggregations/metric.ts b/specification/_types/aggregations/metric.ts index fb6a9b6775..1d57786cdb 100644 --- a/specification/_types/aggregations/metric.ts +++ b/specification/_types/aggregations/metric.ts @@ -140,7 +140,7 @@ export class GeoLineAggregation { * The name of the numeric field to use as the sort key for ordering the points. * When the `geo_line` aggregation is nested inside a `time_series` aggregation, this field defaults to `@timestamp`, and any other value will result in error. */ - sort: GeoLineSort + sort?: GeoLineSort /** * When `true`, returns an additional array of the sort values in the feature properties. */