From e99c85135240b78a912e1cff614b1c301552386d Mon Sep 17 00:00:00 2001 From: Mary Gouseti Date: Wed, 29 Jan 2025 19:03:10 +0200 Subject: [PATCH] Add templates and ilm_policies to the Deprecation API response. (#3648) * Add new fields in the deprecation API response. * Generate files * Add new fields to elasticsearch-openapi.json (cherry picked from commit 7665cdbf49d4b3f8539c494a443009b2300204a0) --- output/openapi/elasticsearch-openapi.json | 22 +++++++- output/schema/schema.json | 54 ++++++++++++++++++- output/typescript/types.ts | 2 + .../deprecations/DeprecationInfoResponse.ts | 9 ++++ 4 files changed, 85 insertions(+), 2 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index d7b88b4201..38fb598692 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -95873,6 +95873,24 @@ "items": { "$ref": "#/components/schemas/migration.deprecations:Deprecation" } + }, + "templates": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/migration.deprecations:Deprecation" + } + } + }, + "ilm_policies": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/components/schemas/migration.deprecations:Deprecation" + } + } } }, "required": [ @@ -95880,7 +95898,9 @@ "index_settings", "data_streams", "node_settings", - "ml_settings" + "ml_settings", + "templates", + "ilm_policies" ] } } diff --git a/output/schema/schema.json b/output/schema/schema.json index 57e119b4ed..839f041a4e 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -155557,6 +155557,58 @@ } } } + }, + { + "description": "Template warnings are sectioned off per template and include deprecations for both component templates and\nindex templates.", + "name": "templates", + "required": true, + "type": { + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "singleKey": false, + "value": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "Deprecation", + "namespace": "migration.deprecations" + } + } + } + } + }, + { + "description": "ILM policy warnings are sectioned off per policy.", + "name": "ilm_policies", + "required": true, + "type": { + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "singleKey": false, + "value": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "Deprecation", + "namespace": "migration.deprecations" + } + } + } + } } ] }, @@ -155564,7 +155616,7 @@ "name": "Response", "namespace": "migration.deprecations" }, - "specLocation": "migration/deprecations/DeprecationInfoResponse.ts#L23-L45" + "specLocation": "migration/deprecations/DeprecationInfoResponse.ts#L23-L54" }, { "kind": "interface", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 95cfb73367..d4dbf3caf2 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -13998,6 +13998,8 @@ export interface MigrationDeprecationsResponse { data_streams: Record node_settings: MigrationDeprecationsDeprecation[] ml_settings: MigrationDeprecationsDeprecation[] + templates: Record + ilm_policies: Record } export interface MigrationGetFeatureUpgradeStatusMigrationFeature { diff --git a/specification/migration/deprecations/DeprecationInfoResponse.ts b/specification/migration/deprecations/DeprecationInfoResponse.ts index beb24705f9..d95ff30182 100644 --- a/specification/migration/deprecations/DeprecationInfoResponse.ts +++ b/specification/migration/deprecations/DeprecationInfoResponse.ts @@ -41,5 +41,14 @@ export class Response { * Machine learning-related deprecation warnings. */ ml_settings: Deprecation[] + /** + * Template warnings are sectioned off per template and include deprecations for both component templates and + * index templates. + */ + templates: Dictionary + /** + * ILM policy warnings are sectioned off per policy. + */ + ilm_policies: Dictionary } }