diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 049e2830cf..5d7573411d 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -1567,6 +1567,9 @@ }, { "$ref": "#/components/parameters/cluster.put_component_template#master_timeout" + }, + { + "$ref": "#/components/parameters/cluster.put_component_template#cause" } ], "requestBody": { @@ -1597,6 +1600,9 @@ }, { "$ref": "#/components/parameters/cluster.put_component_template#master_timeout" + }, + { + "$ref": "#/components/parameters/cluster.put_component_template#cause" } ], "requestBody": { @@ -5814,6 +5820,12 @@ }, { "$ref": "#/components/parameters/indices.put_index_template#create" + }, + { + "$ref": "#/components/parameters/indices.put_index_template#master_timeout" + }, + { + "$ref": "#/components/parameters/indices.put_index_template#cause" } ], "requestBody": { @@ -5841,6 +5853,12 @@ }, { "$ref": "#/components/parameters/indices.put_index_template#create" + }, + { + "$ref": "#/components/parameters/indices.put_index_template#master_timeout" + }, + { + "$ref": "#/components/parameters/indices.put_index_template#cause" } ], "requestBody": { @@ -6736,17 +6754,14 @@ { "$ref": "#/components/parameters/indices.put_template#create" }, - { - "$ref": "#/components/parameters/indices.put_template#flat_settings" - }, { "$ref": "#/components/parameters/indices.put_template#master_timeout" }, { - "$ref": "#/components/parameters/indices.put_template#timeout" + "$ref": "#/components/parameters/indices.put_template#order" }, { - "$ref": "#/components/parameters/indices.put_template#order" + "$ref": "#/components/parameters/indices.put_template#cause" } ], "requestBody": { @@ -6775,17 +6790,14 @@ { "$ref": "#/components/parameters/indices.put_template#create" }, - { - "$ref": "#/components/parameters/indices.put_template#flat_settings" - }, { "$ref": "#/components/parameters/indices.put_template#master_timeout" }, { - "$ref": "#/components/parameters/indices.put_template#timeout" + "$ref": "#/components/parameters/indices.put_template#order" }, { - "$ref": "#/components/parameters/indices.put_template#order" + "$ref": "#/components/parameters/indices.put_template#cause" } ], "requestBody": { @@ -21633,6 +21645,15 @@ }, "style": "form" }, + "cluster.put_component_template#cause": { + "in": "query", + "name": "cause", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, "count#index": { "in": "path", "name": "index", @@ -22851,6 +22872,26 @@ }, "style": "form" }, + "indices.put_index_template#master_timeout": { + "in": "query", + "name": "master_timeout", + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Duration" + }, + "style": "form" + }, + "indices.put_index_template#cause": { + "in": "query", + "name": "cause", + "description": "User defined reason for creating/updating the index template", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, "indices.put_mapping#index": { "in": "path", "name": "index", @@ -23024,16 +23065,6 @@ }, "style": "form" }, - "indices.put_template#flat_settings": { - "in": "query", - "name": "flat_settings", - "description": "If `true`, returns settings in flat format.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, "indices.put_template#master_timeout": { "in": "query", "name": "master_timeout", @@ -23044,23 +23075,22 @@ }, "style": "form" }, - "indices.put_template#timeout": { + "indices.put_template#order": { "in": "query", - "name": "timeout", - "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "name": "order", + "description": "Order in which Elasticsearch applies this template if index\nmatches multiple templates.\n\nTemplates with lower 'order' values are merged first. Templates with higher\n'order' values are merged later, overriding templates with lower values.", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types:Duration" + "type": "number" }, "style": "form" }, - "indices.put_template#order": { + "indices.put_template#cause": { "in": "query", - "name": "order", - "description": "Order in which Elasticsearch applies this template if index\nmatches multiple templates.\n\nTemplates with lower 'order' values are merged first. Templates with higher\n'order' values are merged later, overriding templates with lower values.", + "name": "cause", "deprecated": false, "schema": { - "type": "number" + "type": "string" }, "style": "form" }, @@ -25826,10 +25856,6 @@ "schema": { "type": "object", "properties": { - "allow_auto_create": { - "description": "This setting overrides the value of the `action.auto_create_index` cluster setting.\nIf set to `true` in a template, then indices can be automatically created using that\ntemplate even if auto-creation of indices is disabled via `actions.auto_create_index`.\nIf set to `false` then data streams matching the template must always be explicitly created.", - "type": "boolean" - }, "template": { "$ref": "#/components/schemas/indices._types:IndexState" }, @@ -26149,6 +26175,21 @@ }, "_meta": { "$ref": "#/components/schemas/_types:Metadata" + }, + "allow_auto_create": { + "description": "This setting overrides the value of the `action.auto_create_index` cluster setting.\nIf set to `true` in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via `actions.auto_create_index`.\nIf set to `false`, then indices or data streams matching the template must always be explicitly created, and may never be automatically created.", + "type": "boolean" + }, + "ignore_missing_component_templates": { + "description": "The configuration option ignore_missing_component_templates can be used when an index template\nreferences a component template that might not exist", + "type": "array", + "items": { + "type": "string" + } + }, + "deprecated": { + "description": "Marks this index template as deprecated. When creating or updating a non-deprecated index template\nthat uses deprecated components, Elasticsearch will emit a deprecation warning.", + "type": "boolean" } } } @@ -26361,6 +26402,10 @@ "items": { "type": "string" } + }, + "deprecated": { + "description": "Marks this index template as deprecated. When creating or updating a non-deprecated index template\nthat uses deprecated components, Elasticsearch will emit a deprecation warning.", + "type": "boolean" } } } diff --git a/output/schema/schema.json b/output/schema/schema.json index 5ad5b346dd..348d3f38a2 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -101049,18 +101049,6 @@ "body": { "kind": "properties", "properties": [ - { - "description": "This setting overrides the value of the `action.auto_create_index` cluster setting.\nIf set to `true` in a template, then indices can be automatically created using that\ntemplate even if auto-creation of indices is disabled via `actions.auto_create_index`.\nIf set to `false` then data streams matching the template must always be explicitly created.", - "name": "allow_auto_create", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" - } - } - }, { "description": "The template to be applied which includes mappings, settings, or aliases configuration.", "name": "template", @@ -101151,9 +101139,20 @@ "namespace": "_types" } } + }, + { + "name": "cause", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } } ], - "specLocation": "cluster/put_component_template/ClusterPutComponentTemplateRequest.ts#L29-L99" + "specLocation": "cluster/put_component_template/ClusterPutComponentTemplateRequest.ts#L26-L91" }, { "body": { @@ -121317,7 +121316,7 @@ } } ], - "specLocation": "indices/put_index_template/IndicesPutIndexTemplateRequest.ts#L97-L119" + "specLocation": "indices/put_index_template/IndicesPutIndexTemplateRequest.ts#L121-L143" }, { "attachedBehaviors": [ @@ -121414,6 +121413,45 @@ "namespace": "_types" } } + }, + { + "description": "This setting overrides the value of the `action.auto_create_index` cluster setting.\nIf set to `true` in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via `actions.auto_create_index`.\nIf set to `false`, then indices or data streams matching the template must always be explicitly created, and may never be automatically created.", + "name": "allow_auto_create", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "description": "The configuration option ignore_missing_component_templates can be used when an index template\nreferences a component template that might not exist", + "name": "ignore_missing_component_templates", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + }, + { + "description": "Marks this index template as deprecated. When creating or updating a non-deprecated index template\nthat uses deprecated components, Elasticsearch will emit a deprecation warning.", + "name": "deprecated", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } } ] }, @@ -121456,9 +121494,34 @@ "namespace": "_builtins" } } + }, + { + "description": "Period to wait for a connection to the master node.\nIf no response is received before the timeout expires, the request fails and returns an error.", + "name": "master_timeout", + "required": false, + "serverDefault": "30s", + "type": { + "kind": "instance_of", + "type": { + "name": "Duration", + "namespace": "_types" + } + } + }, + { + "description": "User defined reason for creating/updating the index template", + "name": "cause", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } } ], - "specLocation": "indices/put_index_template/IndicesPutIndexTemplateRequest.ts#L36-L95" + "specLocation": "indices/put_index_template/IndicesPutIndexTemplateRequest.ts#L37-L119" }, { "body": { @@ -122105,19 +122168,6 @@ } } }, - { - "description": "If `true`, returns settings in flat format.", - "name": "flat_settings", - "required": false, - "serverDefault": false, - "type": { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" - } - } - }, { "description": "Period to wait for a connection to the master node. If no response is\nreceived before the timeout expires, the request fails and returns an error.", "name": "master_timeout", @@ -122132,32 +122182,30 @@ } }, { - "description": "Period to wait for a response.\nIf no response is received before the timeout expires, the request fails and returns an error.", - "name": "timeout", + "description": "Order in which Elasticsearch applies this template if index\nmatches multiple templates.\n\nTemplates with lower 'order' values are merged first. Templates with higher\n'order' values are merged later, overriding templates with lower values.", + "name": "order", "required": false, - "serverDefault": "30s", "type": { "kind": "instance_of", "type": { - "name": "Duration", + "name": "integer", "namespace": "_types" } } }, { - "description": "Order in which Elasticsearch applies this template if index\nmatches multiple templates.\n\nTemplates with lower 'order' values are merged first. Templates with higher\n'order' values are merged later, overriding templates with lower values.", - "name": "order", + "name": "cause", "required": false, "type": { "kind": "instance_of", "type": { - "name": "integer", - "namespace": "_types" + "name": "string", + "namespace": "_builtins" } } } ], - "specLocation": "indices/put_template/IndicesPutTemplateRequest.ts#L29-L105" + "specLocation": "indices/put_template/IndicesPutTemplateRequest.ts#L29-L95" }, { "body": { @@ -125671,6 +125719,18 @@ } } } + }, + { + "description": "Marks this index template as deprecated. When creating or updating a non-deprecated index template\nthat uses deprecated components, Elasticsearch will emit a deprecation warning.", + "name": "deprecated", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } } ] }, @@ -125752,7 +125812,7 @@ } } ], - "specLocation": "indices/simulate_template/IndicesSimulateTemplateRequest.ts#L27-L114" + "specLocation": "indices/simulate_template/IndicesSimulateTemplateRequest.ts#L27-L119" }, { "body": { diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index 1b8b94e75b..c6f191fb21 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -475,6 +475,7 @@ }, "cluster.put_component_template": { "request": [ + "Request: query parameter 'cause' does not exist in the json spec", "Request: missing json spec query parameter 'timeout'", "request definition cluster.put_component_template:Request / body / Property 'template' / instance_of - Non-leaf type cannot be used here: 'indices._types:IndexState'" ], @@ -833,10 +834,7 @@ ] }, "indices.put_index_template": { - "request": [ - "Request: missing json spec query parameter 'cause'", - "Request: missing json spec query parameter 'master_timeout'" - ], + "request": [], "response": [ "response definition indices.put_index_template:Response / body / instance_of - Non-leaf type cannot be used here: '_types:AcknowledgedResponseBase'" ] @@ -849,8 +847,7 @@ }, "indices.put_template": { "request": [ - "Request: query parameter 'flat_settings' does not exist in the json spec", - "Request: query parameter 'timeout' does not exist in the json spec" + "Request: query parameter 'cause' does not exist in the json spec" ], "response": [ "response definition indices.put_template:Response / body / instance_of - Non-leaf type cannot be used here: '_types:AcknowledgedResponseBase'" diff --git a/output/typescript/types.ts b/output/typescript/types.ts index ec81d6868f..6dd594f475 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -8666,8 +8666,8 @@ export interface ClusterPutComponentTemplateRequest extends RequestBase { name: Name create?: boolean master_timeout?: Duration + cause?: string body?: { - allow_auto_create?: boolean template: IndicesIndexState version?: VersionNumber _meta?: Metadata @@ -10796,6 +10796,8 @@ export interface IndicesPutIndexTemplateIndexTemplateMapping { export interface IndicesPutIndexTemplateRequest extends RequestBase { name: Name create?: boolean + master_timeout?: Duration + cause?: string body?: { index_patterns?: Indices composed_of?: Name[] @@ -10804,6 +10806,9 @@ export interface IndicesPutIndexTemplateRequest extends RequestBase { priority?: integer version?: VersionNumber _meta?: Metadata + allow_auto_create?: boolean + ignore_missing_component_templates?: string[] + deprecated?: boolean } } @@ -10851,10 +10856,9 @@ export type IndicesPutSettingsResponse = AcknowledgedResponseBase export interface IndicesPutTemplateRequest extends RequestBase { name: Name create?: boolean - flat_settings?: boolean master_timeout?: Duration - timeout?: Duration order?: integer + cause?: string body?: { aliases?: Record index_patterns?: string | string[] @@ -11230,6 +11234,7 @@ export interface IndicesSimulateTemplateRequest extends RequestBase { version?: VersionNumber _meta?: Metadata ignore_missing_component_templates?: string[] + deprecated?: boolean } } diff --git a/specification/cluster/put_component_template/ClusterPutComponentTemplateRequest.ts b/specification/cluster/put_component_template/ClusterPutComponentTemplateRequest.ts index 91545c4126..4e0a120a5e 100644 --- a/specification/cluster/put_component_template/ClusterPutComponentTemplateRequest.ts +++ b/specification/cluster/put_component_template/ClusterPutComponentTemplateRequest.ts @@ -17,14 +17,11 @@ * under the License. */ -import { AliasDefinition } from '@indices/_types/AliasDefinition' -import { IndexSettings } from '@indices/_types/IndexSettings' import { IndexState } from '@indices/_types/IndexState' -import { Dictionary } from '@spec_utils/Dictionary' import { RequestBase } from '@_types/Base' import { Metadata, Name, VersionNumber } from '@_types/common' -import { TypeMapping } from '@_types/mapping/TypeMapping' import { Duration } from '@_types/Time' +import { ErrorCause } from '@_types/Errors' /** * Creates or updates a component template. @@ -69,15 +66,10 @@ export interface Request extends RequestBase { * If no response is received before the timeout expires, the request fails and returns an error. * @server_default 30s */ master_timeout?: Duration + + cause?: string } body: { - /** - * This setting overrides the value of the `action.auto_create_index` cluster setting. - * If set to `true` in a template, then indices can be automatically created using that - * template even if auto-creation of indices is disabled via `actions.auto_create_index`. - * If set to `false` then data streams matching the template must always be explicitly created. - */ - allow_auto_create?: boolean /** * The template to be applied which includes mappings, settings, or aliases configuration. */ @@ -95,5 +87,10 @@ export interface Request extends RequestBase { * To unset `_meta`, replace the template without specifying this information. */ _meta?: Metadata + /** + * 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 } } diff --git a/specification/indices/put_index_template/IndicesPutIndexTemplateRequest.ts b/specification/indices/put_index_template/IndicesPutIndexTemplateRequest.ts index b3a6a533c4..4b01a7dc22 100644 --- a/specification/indices/put_index_template/IndicesPutIndexTemplateRequest.ts +++ b/specification/indices/put_index_template/IndicesPutIndexTemplateRequest.ts @@ -30,8 +30,9 @@ import { VersionNumber } from '@_types/common' import { TypeMapping } from '@_types/mapping/TypeMapping' -import { integer } from '@_types/Numeric' +import { long } from '@_types/Numeric' import { DataStreamLifecycle } from '@indices/_types/DataStreamLifecycle' +import { Duration } from '@_types/Time' /** * Creates or updates an index template. @@ -72,7 +73,7 @@ export interface Request extends RequestBase { * If no priority is specified the template is treated as though it is of priority 0 (lowest priority). * This number is not automatically generated by Elasticsearch. */ - priority?: integer + priority?: long /** * Version number used to manage index templates externally. * This number is not automatically generated by Elasticsearch. @@ -84,6 +85,22 @@ export interface Request extends RequestBase { * This map is not automatically generated by Elasticsearch. * @doc_id mapping-meta-field */ _meta?: Metadata + /** + * This setting overrides the value of the `action.auto_create_index` cluster setting. + * If set to `true` in a template, then indices can be automatically created using that template even if auto-creation of indices is disabled via `actions.auto_create_index`. + * If set to `false`, then indices or data streams matching the template must always be explicitly created, and may never be automatically created. + */ + allow_auto_create?: boolean + /** + * The configuration option ignore_missing_component_templates can be used when an index template + * references a component template that might not exist + */ + ignore_missing_component_templates?: string[] + /** + * 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 } query_parameters: { /** @@ -91,6 +108,13 @@ export interface Request extends RequestBase { * @server_default false */ create?: boolean + /** + * Period to wait for a connection to the master node. + * If no response is received before the timeout expires, the request fails and returns an error. + * @server_default 30s */ + master_timeout?: Duration + + cause?: string } } diff --git a/specification/indices/put_template/IndicesPutTemplateRequest.ts b/specification/indices/put_template/IndicesPutTemplateRequest.ts index f201434e4f..9f523de79d 100644 --- a/specification/indices/put_template/IndicesPutTemplateRequest.ts +++ b/specification/indices/put_template/IndicesPutTemplateRequest.ts @@ -43,24 +43,12 @@ export interface Request extends RequestBase { * @server_default false */ create?: boolean - /** - * If `true`, returns settings in flat format. - * @server_default false - * - */ - flat_settings?: boolean /** * Period to wait for a connection to the master node. If no response is * received before the timeout expires, the request fails and returns an error. * @server_default 30s */ master_timeout?: Duration - /** - * Period to wait for a response. - * If no response is received before the timeout expires, the request fails and returns an error. - * @server_default 30s - */ - timeout?: Duration /** * Order in which Elasticsearch applies this template if index * matches multiple templates. @@ -69,6 +57,8 @@ export interface Request extends RequestBase { * 'order' values are merged later, overriding templates with lower values. */ order?: integer + + cause?: string } body: { /** diff --git a/specification/indices/simulate_template/IndicesSimulateTemplateRequest.ts b/specification/indices/simulate_template/IndicesSimulateTemplateRequest.ts index cde9569914..71381f26c4 100644 --- a/specification/indices/simulate_template/IndicesSimulateTemplateRequest.ts +++ b/specification/indices/simulate_template/IndicesSimulateTemplateRequest.ts @@ -22,7 +22,7 @@ import { Indices, Metadata, Name, VersionNumber } from '@_types/common' import { Duration } from '@_types/Time' import { IndexTemplateMapping } from '@indices/put_index_template/IndicesPutIndexTemplateRequest' import { DataStreamVisibility } from '@indices/_types/DataStream' -import { integer } from '@_types/Numeric' +import { long } from '@_types/Numeric' /** * Returns the index configuration that would be applied by a particular index template. @@ -92,7 +92,7 @@ export interface Request extends RequestBase { * If no priority is specified the template is treated as though it is of priority 0 (lowest priority). * This number is not automatically generated by Elasticsearch. */ - priority?: integer + priority?: long /** * Version number used to manage index templates externally. * This number is not automatically generated by Elasticsearch. @@ -110,5 +110,10 @@ export interface Request extends RequestBase { * references a component template that might not exist */ ignore_missing_component_templates?: string[] + /** + * 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 } }