From 5ab68c3b0692b6252a2dc8a3c8784befe04d2317 Mon Sep 17 00:00:00 2001 From: Niels Bauman Date: Thu, 14 Nov 2024 14:45:11 +0100 Subject: [PATCH 1/3] Add missing fields to `IndexTemplate` Adds the missing `deprecated` and `ignore_missing_component_templates` fields to `IndexTemplate`. --- specification/indices/_types/IndexTemplate.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/specification/indices/_types/IndexTemplate.ts b/specification/indices/_types/IndexTemplate.ts index 3d759530be..0f57b39a84 100644 --- a/specification/indices/_types/IndexTemplate.ts +++ b/specification/indices/_types/IndexTemplate.ts @@ -64,6 +64,16 @@ 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. + */ + deprecated?: boolean + /** + * A list of component template names that are allowed to be absent. + */ + ignore_missing_component_templates?: Names } export class IndexTemplateDataStreamConfiguration { From bfc5bc69df8b666be940bc88efd6e05b526cfe30 Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Fri, 15 Nov 2024 09:06:26 +0400 Subject: [PATCH 2/3] Add availability annotations --- specification/indices/_types/IndexTemplate.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/specification/indices/_types/IndexTemplate.ts b/specification/indices/_types/IndexTemplate.ts index 0f57b39a84..f0fe9dad47 100644 --- a/specification/indices/_types/IndexTemplate.ts +++ b/specification/indices/_types/IndexTemplate.ts @@ -68,10 +68,14 @@ export class IndexTemplate { * 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 } From f3ea565b50a0fa250431e487b1e2eabd926c6be3 Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Fri, 15 Nov 2024 09:07:15 +0400 Subject: [PATCH 3/3] Run make contrib --- 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 + 5 files changed, 94 insertions(+), 6 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 60c66ad20c..092a8e5359 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -67492,6 +67492,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 a9cbf66396..9d9590da5b 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -45088,6 +45088,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 b4f72f1491..fc10775e09 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -119221,9 +119221,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", @@ -119300,7 +119336,7 @@ } } ], - "specLocation": "indices/_types/IndexTemplate.ts#L82-L104" + "specLocation": "indices/_types/IndexTemplate.ts#L96-L118" }, { "kind": "interface", @@ -119336,7 +119372,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 7395844be7..de9bab7953 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 4e1be9944d..83e85ff550 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 {