diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 1b8915a2a2..f47fe238f7 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -39537,18 +39537,7 @@ "properties": { "from": { "description": "Start of the range (inclusive).", - "oneOf": [ - { - "type": "number" - }, - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] + "type": "number" }, "key": { "description": "Custom key to return the range with.", @@ -39556,18 +39545,7 @@ }, "to": { "description": "End of the range (exclusive).", - "oneOf": [ - { - "type": "number" - }, - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] + "type": "number" } } }, @@ -47289,30 +47267,107 @@ ] }, "_types.mapping:DynamicTemplate": { - "type": "object", - "properties": { - "mapping": { - "$ref": "#/components/schemas/_types.mapping:Property" - }, - "match": { - "type": "string" - }, - "match_mapping_type": { - "type": "string" - }, - "match_pattern": { - "$ref": "#/components/schemas/_types.mapping:MatchType" - }, - "path_match": { - "type": "string" - }, - "path_unmatch": { - "type": "string" + "allOf": [ + { + "type": "object", + "properties": { + "match": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "path_match": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "unmatch": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "path_unmatch": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "match_mapping_type": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "unmatch_mapping_type": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "match_pattern": { + "$ref": "#/components/schemas/_types.mapping:MatchType" + } + } }, - "unmatch": { - "type": "string" + { + "type": "object", + "properties": { + "mapping": { + "$ref": "#/components/schemas/_types.mapping:Property" + }, + "runtime": { + "$ref": "#/components/schemas/_types.mapping:Property" + } + }, + "minProperties": 1, + "maxProperties": 1 } - } + ] }, "_types.mapping:Property": { "discriminator": { @@ -47803,6 +47858,12 @@ "index_options": { "$ref": "#/components/schemas/_types.mapping:IndexOptions" }, + "script": { + "$ref": "#/components/schemas/_types:Script" + }, + "on_script_error": { + "$ref": "#/components/schemas/_types.mapping:OnScriptError" + }, "normalizer": { "type": "string" }, diff --git a/output/schema/schema.json b/output/schema/schema.json index 85285f2676..b556f7e8a7 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -51316,30 +51316,11 @@ "name": "from", "required": false, "type": { - "items": [ - { - "kind": "instance_of", - "type": { - "name": "double", - "namespace": "_types" - } - }, - { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } - } - ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "double", + "namespace": "_types" + } } }, { @@ -51359,30 +51340,11 @@ "name": "to", "required": false, "type": { - "items": [ - { - "kind": "instance_of", - "type": { - "name": "double", - "namespace": "_types" - } - }, - { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } - } - ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "double", + "namespace": "_types" + } } } ], @@ -65705,6 +65667,7 @@ "kind": "union_of" }, "variants": { + "defaultTag": "custom", "kind": "internal_tag", "tag": "type" } @@ -68821,7 +68784,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L164-L167" + "specLocation": "_types/mapping/core.ts#L166-L169" }, { "inherits": { @@ -69436,7 +69399,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L144-L147" + "specLocation": "_types/mapping/core.ts#L146-L149" }, { "inherits": { @@ -69483,7 +69446,7 @@ "name": "DynamicMapping", "namespace": "_types.mapping" }, - "specLocation": "_types/mapping/dynamic-template.ts#L37-L46" + "specLocation": "_types/mapping/dynamic-template.ts#L49-L58" }, { "inherits": { @@ -69749,7 +69712,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L286-L317" + "specLocation": "_types/mapping/core.ts#L288-L319" }, { "kind": "interface", @@ -69770,73 +69733,195 @@ } }, { - "name": "match", + "name": "runtime", "required": false, "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "Property", + "namespace": "_types.mapping" } } }, { - "name": "match_mapping_type", + "containerProperty": true, + "name": "match", "required": false, "type": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ], + "kind": "union_of" } }, { - "name": "match_pattern", + "containerProperty": true, + "name": "path_match", "required": false, "type": { - "kind": "instance_of", - "type": { - "name": "MatchType", - "namespace": "_types.mapping" - } + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ], + "kind": "union_of" } }, { - "name": "path_match", + "containerProperty": true, + "name": "unmatch", "required": false, "type": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ], + "kind": "union_of" } }, { + "containerProperty": true, "name": "path_unmatch", "required": false, "type": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ], + "kind": "union_of" } }, { - "name": "unmatch", + "containerProperty": true, + "name": "match_mapping_type", + "required": false, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ], + "kind": "union_of" + } + }, + { + "containerProperty": true, + "name": "unmatch_mapping_type", + "required": false, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ], + "kind": "union_of" + } + }, + { + "containerProperty": true, + "name": "match_pattern", "required": false, "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "MatchType", + "namespace": "_types.mapping" } } } ], - "specLocation": "_types/mapping/dynamic-template.ts#L22-L30" + "specLocation": "_types/mapping/dynamic-template.ts#L22-L42", + "variants": { + "kind": "container" + } }, { "inherits": { @@ -69982,6 +70067,9 @@ { "name": "object" }, + { + "name": "version" + }, { "name": "murmur3" }, @@ -70074,7 +70162,7 @@ "name": "FieldType", "namespace": "_types.mapping" }, - "specLocation": "_types/mapping/Property.ts#L160-L204" + "specLocation": "_types/mapping/Property.ts#L160-L205" }, { "inherits": { @@ -70232,7 +70320,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L134-L137" + "specLocation": "_types/mapping/core.ts#L136-L139" }, { "inherits": { @@ -70505,7 +70593,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L139-L142" + "specLocation": "_types/mapping/core.ts#L141-L144" }, { "inherits": { @@ -70583,7 +70671,7 @@ "name": "IndexOptions", "namespace": "_types.mapping" }, - "specLocation": "_types/mapping/core.ts#L243-L248" + "specLocation": "_types/mapping/core.ts#L245-L250" }, { "inherits": { @@ -70618,7 +70706,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L149-L152" + "specLocation": "_types/mapping/core.ts#L151-L154" }, { "inherits": { @@ -70908,6 +70996,28 @@ } } }, + { + "name": "script", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Script", + "namespace": "_types" + } + } + }, + { + "name": "on_script_error", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "OnScriptError", + "namespace": "_types.mapping" + } + } + }, { "name": "normalizer", "required": false, @@ -70982,7 +71092,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L89-L105" + "specLocation": "_types/mapping/core.ts#L89-L107" }, { "inherits": { @@ -71017,7 +71127,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L154-L157" + "specLocation": "_types/mapping/core.ts#L156-L159" }, { "inherits": { @@ -71122,7 +71232,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L216-L241" + "specLocation": "_types/mapping/core.ts#L218-L243" }, { "kind": "enum", @@ -71138,7 +71248,7 @@ "name": "MatchType", "namespace": "_types.mapping" }, - "specLocation": "_types/mapping/dynamic-template.ts#L32-L35" + "specLocation": "_types/mapping/dynamic-template.ts#L44-L47" }, { "inherits": { @@ -71344,7 +71454,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L107-L127" + "specLocation": "_types/mapping/core.ts#L109-L129" }, { "inherits": { @@ -71406,7 +71516,7 @@ "name": "OnScriptError", "namespace": "_types.mapping" }, - "specLocation": "_types/mapping/core.ts#L129-L132" + "specLocation": "_types/mapping/core.ts#L131-L134" }, { "inherits": { @@ -71430,7 +71540,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L180-L182" + "specLocation": "_types/mapping/core.ts#L182-L184" }, { "inherits": { @@ -72020,7 +72130,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L184-L187" + "specLocation": "_types/mapping/core.ts#L186-L189" }, { "inherits": { @@ -72055,7 +72165,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L189-L192" + "specLocation": "_types/mapping/core.ts#L191-L194" }, { "kind": "interface", @@ -72317,7 +72427,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L174-L178" + "specLocation": "_types/mapping/core.ts#L176-L180" }, { "inherits": { @@ -72429,7 +72539,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L198-L208" + "specLocation": "_types/mapping/core.ts#L200-L210" }, { "description": "The `shape` data type facilitates the indexing of and searching with arbitrary `x, y` cartesian shapes such as\nrectangles and polygons.", @@ -72535,7 +72645,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L159-L162" + "specLocation": "_types/mapping/core.ts#L161-L164" }, { "kind": "interface", @@ -72682,7 +72792,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L194-L196" + "specLocation": "_types/mapping/core.ts#L196-L198" }, { "kind": "interface", @@ -72811,7 +72921,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L250-L253" + "specLocation": "_types/mapping/core.ts#L252-L255" }, { "inherits": { @@ -72989,7 +73099,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L255-L271" + "specLocation": "_types/mapping/core.ts#L257-L273" }, { "kind": "enum", @@ -73373,7 +73483,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L169-L172" + "specLocation": "_types/mapping/core.ts#L171-L174" }, { "inherits": { @@ -73397,7 +73507,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L273-L275" + "specLocation": "_types/mapping/core.ts#L275-L277" }, { "inherits": { @@ -73439,7 +73549,7 @@ } } ], - "specLocation": "_types/mapping/core.ts#L277-L284" + "specLocation": "_types/mapping/core.ts#L279-L286" }, { "inherits": { diff --git a/output/typescript/types.ts b/output/typescript/types.ts index af1bacc5cf..fb4fe2e8f9 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -2959,9 +2959,9 @@ export interface AggregationsAggregationContainer { } export interface AggregationsAggregationRange { - from?: double | string | null + from?: double key?: string - to?: double | string | null + to?: double } export interface AggregationsArrayPercentilesItem { @@ -5023,12 +5023,14 @@ export interface MappingDynamicProperty extends MappingDocValuesPropertyBase { export interface MappingDynamicTemplate { mapping?: MappingProperty - match?: string - match_mapping_type?: string + runtime?: MappingProperty + match?: string | string[] + path_match?: string | string[] + unmatch?: string | string[] + path_unmatch?: string | string[] + match_mapping_type?: string | string[] + unmatch_mapping_type?: string | string[] match_pattern?: MappingMatchType - path_match?: string - path_unmatch?: string - unmatch?: string } export interface MappingFieldAliasProperty extends MappingPropertyBase { @@ -5045,7 +5047,7 @@ export interface MappingFieldNamesField { enabled: boolean } -export type MappingFieldType = 'none' | 'geo_point' | 'geo_shape' | 'ip' | 'binary' | 'keyword' | 'text' | 'search_as_you_type' | 'date' | 'date_nanos' | 'boolean' | 'completion' | 'nested' | 'object' | 'murmur3' | 'token_count' | 'percolator' | 'integer' | 'long' | 'short' | 'byte' | 'float' | 'half_float' | 'scaled_float' | 'double' | 'integer_range' | 'float_range' | 'long_range' | 'double_range' | 'date_range' | 'ip_range' | 'alias' | 'join' | 'rank_feature' | 'rank_features' | 'flattened' | 'shape' | 'histogram' | 'constant_keyword' | 'aggregate_metric_double' | 'dense_vector' | 'sparse_vector' | 'match_only_text' +export type MappingFieldType = 'none' | 'geo_point' | 'geo_shape' | 'ip' | 'binary' | 'keyword' | 'text' | 'search_as_you_type' | 'date' | 'date_nanos' | 'boolean' | 'completion' | 'nested' | 'object' | 'version' | 'murmur3' | 'token_count' | 'percolator' | 'integer' | 'long' | 'short' | 'byte' | 'float' | 'half_float' | 'scaled_float' | 'double' | 'integer_range' | 'float_range' | 'long_range' | 'double_range' | 'date_range' | 'ip_range' | 'alias' | 'join' | 'rank_feature' | 'rank_features' | 'flattened' | 'shape' | 'histogram' | 'constant_keyword' | 'aggregate_metric_double' | 'dense_vector' | 'sparse_vector' | 'match_only_text' export interface MappingFlattenedProperty extends MappingPropertyBase { boost?: double @@ -5143,6 +5145,8 @@ export interface MappingKeywordProperty extends MappingDocValuesPropertyBase { eager_global_ordinals?: boolean index?: boolean index_options?: MappingIndexOptions + script?: Script + on_script_error?: MappingOnScriptError normalizer?: string norms?: boolean null_value?: string diff --git a/specification/_types/aggregations/bucket.ts b/specification/_types/aggregations/bucket.ts index 024e56f38a..0445f5e144 100644 --- a/specification/_types/aggregations/bucket.ts +++ b/specification/_types/aggregations/bucket.ts @@ -675,7 +675,7 @@ export class AggregationRange { /** * Start of the range (inclusive). */ - from?: double | string | null + from?: double /** * Custom key to return the range with. */ @@ -683,7 +683,7 @@ export class AggregationRange { /** * End of the range (exclusive). */ - to?: double | string | null + to?: double } export class RareTermsAggregation extends BucketAggregationBase { diff --git a/specification/_types/analysis/normalizers.ts b/specification/_types/analysis/normalizers.ts index f1e98635ad..d6f6789641 100644 --- a/specification/_types/analysis/normalizers.ts +++ b/specification/_types/analysis/normalizers.ts @@ -18,7 +18,7 @@ */ /** - * @variants internal tag='type' + * @variants internal tag='type' default='custom' * @doc_id analysis-normalizers */ export type Normalizer = LowercaseNormalizer | CustomNormalizer diff --git a/specification/_types/mapping/Property.ts b/specification/_types/mapping/Property.ts index 26f04432f4..1d05ec0b74 100644 --- a/specification/_types/mapping/Property.ts +++ b/specification/_types/mapping/Property.ts @@ -172,6 +172,7 @@ export enum FieldType { completion, nested, object, + version, murmur3, token_count, percolator, diff --git a/specification/_types/mapping/core.ts b/specification/_types/mapping/core.ts index ddd44429a0..5eaae7cec3 100644 --- a/specification/_types/mapping/core.ts +++ b/specification/_types/mapping/core.ts @@ -91,6 +91,8 @@ export class KeywordProperty extends DocValuesPropertyBase { eager_global_ordinals?: boolean index?: boolean index_options?: IndexOptions + script?: Script + on_script_error?: OnScriptError normalizer?: string norms?: boolean null_value?: string diff --git a/specification/_types/mapping/dynamic-template.ts b/specification/_types/mapping/dynamic-template.ts index baf04bf7c5..294690d623 100644 --- a/specification/_types/mapping/dynamic-template.ts +++ b/specification/_types/mapping/dynamic-template.ts @@ -19,14 +19,26 @@ import { Property } from './Property' +/** + * @variants container + */ export class DynamicTemplate { mapping?: Property - match?: string - match_mapping_type?: string + runtime?: Property + /** @variant container_property */ + match?: string | string[] + /** @variant container_property */ + path_match?: string | string[] + /** @variant container_property */ + unmatch?: string | string[] + /** @variant container_property */ + path_unmatch?: string | string[] + /** @variant container_property */ + match_mapping_type?: string | string[] + /** @variant container_property */ + unmatch_mapping_type?: string | string[] + /** @variant container_property */ match_pattern?: MatchType - path_match?: string - path_unmatch?: string - unmatch?: string } export enum MatchType {