diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index ea702e6e12..487808fd13 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -65682,6 +65682,13 @@ "_types.mapping:RuntimeField": { "type": "object", "properties": { + "fields": { + "description": "For type `composite`", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.mapping:CompositeSubField" + } + }, "fetch_fields": { "description": "For type `lookup`", "type": "array", @@ -65716,18 +65723,15 @@ "type" ] }, - "_types.mapping:RuntimeFieldFetchFields": { + "_types.mapping:CompositeSubField": { "type": "object", "properties": { - "field": { - "$ref": "#/components/schemas/_types:Field" - }, - "format": { - "type": "string" + "type": { + "$ref": "#/components/schemas/_types.mapping:RuntimeFieldType" } }, "required": [ - "field" + "type" ] }, "_types.mapping:RuntimeFieldType": { @@ -65744,6 +65748,20 @@ "lookup" ] }, + "_types.mapping:RuntimeFieldFetchFields": { + "type": "object", + "properties": { + "field": { + "$ref": "#/components/schemas/_types:Field" + }, + "format": { + "type": "string" + } + }, + "required": [ + "field" + ] + }, "autoscaling.get_autoscaling_capacity:AutoscalingDeciders": { "type": "object", "properties": { diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 682a5d3080..0d38e9dc99 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -41998,6 +41998,13 @@ "_types.mapping:RuntimeField": { "type": "object", "properties": { + "fields": { + "description": "For type `composite`", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/_types.mapping:CompositeSubField" + } + }, "fetch_fields": { "description": "For type `lookup`", "type": "array", @@ -42032,18 +42039,15 @@ "type" ] }, - "_types.mapping:RuntimeFieldFetchFields": { + "_types.mapping:CompositeSubField": { "type": "object", "properties": { - "field": { - "$ref": "#/components/schemas/_types:Field" - }, - "format": { - "type": "string" + "type": { + "$ref": "#/components/schemas/_types.mapping:RuntimeFieldType" } }, "required": [ - "field" + "type" ] }, "_types.mapping:RuntimeFieldType": { @@ -42060,6 +42064,20 @@ "lookup" ] }, + "_types.mapping:RuntimeFieldFetchFields": { + "type": "object", + "properties": { + "field": { + "$ref": "#/components/schemas/_types:Field" + }, + "format": { + "type": "string" + } + }, + "required": [ + "field" + ] + }, "_types:Refresh": { "type": "string", "enum": [ diff --git a/output/schema/schema-serverless.json b/output/schema/schema-serverless.json index e1bb4d9c6f..e6d8da5a4d 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -65845,6 +65845,29 @@ "namespace": "_types.mapping" }, "properties": [ + { + "description": "For type `composite`", + "name": "fields", + "required": false, + "type": { + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "kind": "dictionary_of", + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "CompositeSubField", + "namespace": "_types.mapping" + } + } + } + }, { "description": "For type `lookup`", "name": "fetch_fields", @@ -65935,40 +65958,28 @@ } } ], - "specLocation": "_types/mapping/RuntimeFields.ts#L26-L48" + "specLocation": "_types/mapping/RuntimeFields.ts#L26-L50" }, { "kind": "interface", "name": { - "name": "RuntimeFieldFetchFields", + "name": "CompositeSubField", "namespace": "_types.mapping" }, "properties": [ { - "name": "field", + "name": "type", "required": true, "type": { "kind": "instance_of", "type": { - "name": "Field", - "namespace": "_types" - } - } - }, - { - "name": "format", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" + "name": "RuntimeFieldType", + "namespace": "_types.mapping" } } } ], - "shortcutProperty": "field", - "specLocation": "_types/mapping/RuntimeFields.ts#L50-L54" + "specLocation": "_types/mapping/RuntimeFields.ts#L52-L54" }, { "kind": "enum", @@ -66005,7 +66016,40 @@ "name": "RuntimeFieldType", "namespace": "_types.mapping" }, - "specLocation": "_types/mapping/RuntimeFields.ts#L56-L66" + "specLocation": "_types/mapping/RuntimeFields.ts#L62-L72" + }, + { + "kind": "interface", + "name": { + "name": "RuntimeFieldFetchFields", + "namespace": "_types.mapping" + }, + "properties": [ + { + "name": "field", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Field", + "namespace": "_types" + } + } + }, + { + "name": "format", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ], + "shortcutProperty": "field", + "specLocation": "_types/mapping/RuntimeFields.ts#L56-L60" }, { "kind": "interface", diff --git a/output/schema/schema.json b/output/schema/schema.json index c162abe023..98ff02622c 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -71089,6 +71089,27 @@ ], "specLocation": "_types/mapping/specialized.ts#L33-L41" }, + { + "kind": "interface", + "name": { + "name": "CompositeSubField", + "namespace": "_types.mapping" + }, + "properties": [ + { + "name": "type", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "RuntimeFieldType", + "namespace": "_types.mapping" + } + } + } + ], + "specLocation": "_types/mapping/RuntimeFields.ts#L52-L54" + }, { "kind": "interface", "inherits": { @@ -74634,6 +74655,29 @@ "namespace": "_types.mapping" }, "properties": [ + { + "description": "For type `composite`", + "name": "fields", + "required": false, + "type": { + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "CompositeSubField", + "namespace": "_types.mapping" + } + } + } + }, { "description": "For type `lookup`", "name": "fetch_fields", @@ -74724,7 +74768,7 @@ } } ], - "specLocation": "_types/mapping/RuntimeFields.ts#L26-L48" + "specLocation": "_types/mapping/RuntimeFields.ts#L26-L50" }, { "kind": "interface", @@ -74757,7 +74801,7 @@ } ], "shortcutProperty": "field", - "specLocation": "_types/mapping/RuntimeFields.ts#L50-L54" + "specLocation": "_types/mapping/RuntimeFields.ts#L56-L60" }, { "kind": "enum", @@ -74794,7 +74838,7 @@ "name": "RuntimeFieldType", "namespace": "_types.mapping" }, - "specLocation": "_types/mapping/RuntimeFields.ts#L56-L66" + "specLocation": "_types/mapping/RuntimeFields.ts#L62-L72" }, { "kind": "type_alias", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 941e0b1afc..521578ed9a 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -5230,6 +5230,10 @@ export interface MappingCompletionProperty extends MappingDocValuesPropertyBase type: 'completion' } +export interface MappingCompositeSubField { + type: MappingRuntimeFieldType +} + export interface MappingConstantKeywordProperty extends MappingPropertyBase { value?: any type: 'constant_keyword' @@ -5573,6 +5577,7 @@ export interface MappingRoutingField { } export interface MappingRuntimeField { + fields?: Record fetch_fields?: (MappingRuntimeFieldFetchFields | Field)[] format?: string input_field?: Field diff --git a/specification/_types/mapping/RuntimeFields.ts b/specification/_types/mapping/RuntimeFields.ts index b5ad85f52d..62160a46f7 100644 --- a/specification/_types/mapping/RuntimeFields.ts +++ b/specification/_types/mapping/RuntimeFields.ts @@ -24,6 +24,8 @@ import { Script } from '@_types/Scripting' export type RuntimeFields = Dictionary export class RuntimeField { + /** For type `composite` */ + fields?: Dictionary /** For type `lookup` */ fetch_fields?: RuntimeFieldFetchFields[] /** @@ -47,6 +49,10 @@ export class RuntimeField { type: RuntimeFieldType } +class CompositeSubField { + type: RuntimeFieldType +} + /** @shortcut_property field */ export class RuntimeFieldFetchFields { field: Field