From 8febe64e089da86e01413dcc448ec486c1c8d7ec Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Fri, 31 Oct 2025 10:13:22 +0400 Subject: [PATCH] Fix indices.put_data_lifecycle API (#5583) (cherry picked from commit 5c8d75f0979890f64184a42c7f59b4b3c50aa2c2) --- output/openapi/elasticsearch-openapi.json | 9 ++++----- output/openapi/elasticsearch-serverless-openapi.json | 9 ++++----- output/schema/schema.json | 11 +++++++---- output/typescript/types.ts | 2 +- .../IndicesPutDataLifecycleRequest.ts | 4 ++-- 5 files changed, 18 insertions(+), 17 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index eb8fa9f3de..2cea2f787d 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -15893,11 +15893,10 @@ }, "downsampling": { "description": "The downsampling configuration to execute for the managed backing index after rollover.", - "allOf": [ - { - "$ref": "#/components/schemas/indices._types.DataStreamLifecycleDownsampling" - } - ] + "type": "array", + "items": { + "$ref": "#/components/schemas/indices._types.DownsamplingRound" + } }, "enabled": { "description": "If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle\nthat's disabled (enabled: `false`) will have no effect on the data stream.", diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index edc7f370a1..3fbf0f0212 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -9280,11 +9280,10 @@ }, "downsampling": { "description": "The downsampling configuration to execute for the managed backing index after rollover.", - "allOf": [ - { - "$ref": "#/components/schemas/indices._types.DataStreamLifecycleDownsampling" - } - ] + "type": "array", + "items": { + "$ref": "#/components/schemas/indices._types.DownsamplingRound" + } }, "enabled": { "description": "If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle\nthat's disabled (enabled: `false`) will have no effect on the data stream.", diff --git a/output/schema/schema.json b/output/schema/schema.json index ca2ceee9c1..a276234f54 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -160787,10 +160787,13 @@ "name": "downsampling", "required": false, "type": { - "kind": "instance_of", - "type": { - "name": "DataStreamLifecycleDownsampling", - "namespace": "indices._types" + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "DownsamplingRound", + "namespace": "indices._types" + } } } }, diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 97e2dff24f..42b4db43fb 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -13017,7 +13017,7 @@ export interface IndicesPutDataLifecycleRequest extends RequestBase { timeout?: Duration body?: { data_retention?: Duration - downsampling?: IndicesDataStreamLifecycleDownsampling + downsampling?: IndicesDownsamplingRound[] enabled?: boolean } } diff --git a/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleRequest.ts b/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleRequest.ts index 0fb80b6c41..32570f3ec2 100644 --- a/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleRequest.ts +++ b/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleRequest.ts @@ -20,7 +20,7 @@ import { RequestBase } from '@_types/Base' import { DataStreamNames, ExpandWildcards } from '@_types/common' import { Duration } from '@_types/Time' -import { DataStreamLifecycleDownsampling } from '@indices/_types/DataStreamLifecycleDownsampling' +import { DownsamplingRound } from '@indices/_types/DownsamplingRound' /** * Update data stream lifecycles. @@ -82,7 +82,7 @@ export interface Request extends RequestBase { /** * The downsampling configuration to execute for the managed backing index after rollover. */ - downsampling?: DataStreamLifecycleDownsampling + downsampling?: DownsamplingRound[] /** * If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle * that's disabled (enabled: `false`) will have no effect on the data stream.