From 2c94880087755e1659734dd9d1bac720cd21700c Mon Sep 17 00:00:00 2001 From: Niels Bauman <33722607+nielsbauman@users.noreply.github.com> Date: Fri, 15 Nov 2024 06:44:27 +0100 Subject: [PATCH] Add missing fields to `IndexTemplate` (#3129) Co-authored-by: Quentin Pradet --- 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 d38e6437b8..d49ea162ac 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -67499,6 +67499,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 482e2d7d28..261d6563c3 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -45095,6 +45095,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 b172454c53..3a97ce424f 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -119244,9 +119244,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", @@ -119323,7 +119359,7 @@ } } ], - "specLocation": "indices/_types/IndexTemplate.ts#L82-L104" + "specLocation": "indices/_types/IndexTemplate.ts#L96-L118" }, { "kind": "interface", @@ -119359,7 +119395,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 2e761262d0..7aba15d81b 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -125515,9 +125515,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", @@ -125553,7 +125589,7 @@ } } ], - "specLocation": "indices/_types/IndexTemplate.ts#L69-L80" + "specLocation": "indices/_types/IndexTemplate.ts#L83-L94" }, { "kind": "interface", @@ -125630,7 +125666,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 39ac6b77e4..1d952fa3ac 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -11122,6 +11122,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 {