From 9c414285720ecadedc1b2ca746540154dede399b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 15 Nov 2024 10:09:29 +0400 Subject: [PATCH] [Backport 8.16] Add missing fields to `IndexTemplate` (#3137) Co-authored-by: Quentin Pradet Co-authored-by: Niels Bauman <33722607+nielsbauman@users.noreply.github.com> --- output/openapi/elasticsearch-openapi.json | 7 ++++ .../elasticsearch-serverless-openapi.json | 7 ++++ output/schema/schema-serverless.json | 42 +++++++++++++++++-- output/schema/schema.json | 42 +++++++++++++++++-- output/typescript/types.ts | 2 + specification/indices/_types/IndexTemplate.ts | 14 +++++++ 6 files changed, 108 insertions(+), 6 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 4df9bbb243..84c676afc4 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -67414,6 +67414,13 @@ }, "data_stream": { "$ref": "#/components/schemas/indices._types:IndexTemplateDataStreamConfiguration" + }, + "deprecated": { + "description": "Marks this index template as deprecated.\nWhen creating or updating a non-deprecated index template that uses deprecated components,\nElasticsearch will emit a deprecation warning.", + "type": "boolean" + }, + "ignore_missing_component_templates": { + "$ref": "#/components/schemas/_types:Names" } }, "required": [ diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 854c825479..be1b1f8c6c 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -45295,6 +45295,13 @@ }, "data_stream": { "$ref": "#/components/schemas/indices._types:IndexTemplateDataStreamConfiguration" + }, + "deprecated": { + "description": "Marks this index template as deprecated.\nWhen creating or updating a non-deprecated index template that uses deprecated components,\nElasticsearch will emit a deprecation warning.", + "type": "boolean" + }, + "ignore_missing_component_templates": { + "$ref": "#/components/schemas/_types:Names" } }, "required": [ diff --git a/output/schema/schema-serverless.json b/output/schema/schema-serverless.json index 8b42ba5c09..e6493ff083 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -119609,9 +119609,45 @@ "namespace": "indices._types" } } + }, + { + "availability": { + "serverless": {}, + "stack": { + "since": "8.12.0" + } + }, + "description": "Marks this index template as deprecated.\nWhen creating or updating a non-deprecated index template that uses deprecated components,\nElasticsearch will emit a deprecation warning.", + "name": "deprecated", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "availability": { + "serverless": {}, + "stack": { + "since": "8.7.0" + } + }, + "description": "A list of component template names that are allowed to be absent.", + "name": "ignore_missing_component_templates", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Names", + "namespace": "_types" + } + } } ], - "specLocation": "indices/_types/IndexTemplate.ts#L28-L67" + "specLocation": "indices/_types/IndexTemplate.ts#L28-L81" }, { "kind": "interface", @@ -119688,7 +119724,7 @@ } } ], - "specLocation": "indices/_types/IndexTemplate.ts#L82-L104" + "specLocation": "indices/_types/IndexTemplate.ts#L96-L118" }, { "kind": "interface", @@ -119724,7 +119760,7 @@ } } ], - "specLocation": "indices/_types/IndexTemplate.ts#L69-L80" + "specLocation": "indices/_types/IndexTemplate.ts#L83-L94" }, { "kind": "interface", diff --git a/output/schema/schema.json b/output/schema/schema.json index 7fd523b8b6..9ec258633b 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -125204,9 +125204,45 @@ "namespace": "indices._types" } } + }, + { + "availability": { + "serverless": {}, + "stack": { + "since": "8.12.0" + } + }, + "description": "Marks this index template as deprecated.\nWhen creating or updating a non-deprecated index template that uses deprecated components,\nElasticsearch will emit a deprecation warning.", + "name": "deprecated", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "availability": { + "serverless": {}, + "stack": { + "since": "8.7.0" + } + }, + "description": "A list of component template names that are allowed to be absent.", + "name": "ignore_missing_component_templates", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Names", + "namespace": "_types" + } + } } ], - "specLocation": "indices/_types/IndexTemplate.ts#L28-L67" + "specLocation": "indices/_types/IndexTemplate.ts#L28-L81" }, { "kind": "interface", @@ -125242,7 +125278,7 @@ } } ], - "specLocation": "indices/_types/IndexTemplate.ts#L69-L80" + "specLocation": "indices/_types/IndexTemplate.ts#L83-L94" }, { "kind": "interface", @@ -125319,7 +125355,7 @@ } } ], - "specLocation": "indices/_types/IndexTemplate.ts#L82-L104" + "specLocation": "indices/_types/IndexTemplate.ts#L96-L118" }, { "kind": "interface", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 901d31e482..380d4f34f1 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -11100,6 +11100,8 @@ export interface IndicesIndexTemplate { _meta?: Metadata allow_auto_create?: boolean data_stream?: IndicesIndexTemplateDataStreamConfiguration + deprecated?: boolean + ignore_missing_component_templates?: Names } export interface IndicesIndexTemplateDataStreamConfiguration { diff --git a/specification/indices/_types/IndexTemplate.ts b/specification/indices/_types/IndexTemplate.ts index 3d759530be..f0fe9dad47 100644 --- a/specification/indices/_types/IndexTemplate.ts +++ b/specification/indices/_types/IndexTemplate.ts @@ -64,6 +64,20 @@ export class IndexTemplate { * Data streams require a matching index template with a `data_stream` object. */ data_stream?: IndexTemplateDataStreamConfiguration + /** + * Marks this index template as deprecated. + * When creating or updating a non-deprecated index template that uses deprecated components, + * Elasticsearch will emit a deprecation warning. + * @availability stack since=8.12.0 + * @availability serverless + */ + deprecated?: boolean + /** + * A list of component template names that are allowed to be absent. + * @availability stack since=8.7.0 + * @availability serverless + */ + ignore_missing_component_templates?: Names } export class IndexTemplateDataStreamConfiguration {