diff --git a/output/schema/schema.json b/output/schema/schema.json index a2b03a85d3..4f91a67b74 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -248731,6 +248731,22 @@ ], "specLocation": "simulate/ingest/SimulateIngestResponse.ts#L35-L78" }, + { + "kind": "enum", + "members": [ + { + "name": "index" + }, + { + "name": "template" + } + ], + "name": { + "name": "MergeType", + "namespace": "simulate.ingest" + }, + "specLocation": "simulate/ingest/SimulateIngestRequest.ts#L109-L112" + }, { "kind": "request", "attachedBehaviors": [ @@ -249003,9 +249019,22 @@ "namespace": "_types" } } + }, + { + "description": "The way that mapping_additions ought to be merged into existing mappings -- in the way mapping changes are merged into an existing index, or in\nthe way mapping changes are merged into existing templates. Some changes are allowed to templates that are not allowed to indices. For example,\na field cannot be changed to an incompatible type in an index, but can in a template.", + "name": "merge_type", + "required": false, + "serverDefault": "index", + "type": { + "kind": "instance_of", + "type": { + "name": "MergeType", + "namespace": "simulate.ingest" + } + } } ], - "specLocation": "simulate/ingest/SimulateIngestRequest.ts#L29-L100" + "specLocation": "simulate/ingest/SimulateIngestRequest.ts#L29-L107" }, { "kind": "response", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 1d3e16294d..0d8e634199 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -21166,9 +21166,12 @@ export interface SimulateIngestIngestDocumentSimulationKeys { export type SimulateIngestIngestDocumentSimulation = SimulateIngestIngestDocumentSimulationKeys & { [property: string]: string | Id | IndexName | Record | SpecUtilsStringified | string[] | Record[] | ErrorCause } +export type SimulateIngestMergeType = 'index' | 'template' + export interface SimulateIngestRequest extends RequestBase { index?: IndexName pipeline?: PipelineName + merge_type?: SimulateIngestMergeType body?: { docs: IngestDocument[] component_template_substitutions?: Record diff --git a/specification/_json_spec/simulate.ingest.json b/specification/_json_spec/simulate.ingest.json index 5bd6527f24..d34eaca66b 100644 --- a/specification/_json_spec/simulate.ingest.json +++ b/specification/_json_spec/simulate.ingest.json @@ -32,6 +32,10 @@ "pipeline": { "type": "string", "description": "The pipeline id to preprocess incoming documents with if no pipeline is given for a particular document" + }, + "merge_type": { + "type": "string", + "description": "The way that mapping_additions ought to be merged into existing mappings" } }, "body": { diff --git a/specification/simulate/ingest/SimulateIngestRequest.ts b/specification/simulate/ingest/SimulateIngestRequest.ts index 7eb5bf7f6a..c4e3bad38b 100644 --- a/specification/simulate/ingest/SimulateIngestRequest.ts +++ b/specification/simulate/ingest/SimulateIngestRequest.ts @@ -75,6 +75,13 @@ export interface Request extends RequestBase { * This value can be used to override the default pipeline of the index. */ pipeline?: PipelineName + /** + * The way that mapping_additions ought to be merged into existing mappings -- in the way mapping changes are merged into an existing index, or in + * the way mapping changes are merged into existing templates. Some changes are allowed to templates that are not allowed to indices. For example, + * a field cannot be changed to an incompatible type in an index, but can in a template. + * @server_default index + */ + merge_type?: MergeType } body: { /** @@ -98,3 +105,8 @@ export interface Request extends RequestBase { pipeline_substitutions?: Dictionary } } + +enum MergeType { + index, + template +}