diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 433f39a862..ab7bacf3c0 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -63336,7 +63336,7 @@ "type": "boolean" }, "subobjects": { - "type": "boolean" + "$ref": "#/components/schemas/_types.mapping:Subobjects" }, "_data_stream_timestamp": { "$ref": "#/components/schemas/_types.mapping:DataStreamTimestamp" @@ -64663,7 +64663,7 @@ "type": "boolean" }, "subobjects": { - "type": "boolean" + "$ref": "#/components/schemas/_types.mapping:Subobjects" }, "type": { "type": "string", @@ -64675,6 +64675,14 @@ } ] }, + "_types.mapping:Subobjects": { + "type": "string", + "enum": [ + "true", + "false", + "auto" + ] + }, "_types.mapping:PassthroughObjectProperty": { "allOf": [ { diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 7a5e27ebe4..d0e2a9bc54 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -41003,7 +41003,7 @@ "type": "boolean" }, "subobjects": { - "type": "boolean" + "$ref": "#/components/schemas/_types.mapping:Subobjects" }, "_data_stream_timestamp": { "$ref": "#/components/schemas/_types.mapping:DataStreamTimestamp" @@ -42330,7 +42330,7 @@ "type": "boolean" }, "subobjects": { - "type": "boolean" + "$ref": "#/components/schemas/_types.mapping:Subobjects" }, "type": { "type": "string", @@ -42342,6 +42342,13 @@ } ] }, + "_types.mapping:Subobjects": { + "type": "string", + "enum": [ + "true", + "false" + ] + }, "_types.mapping:PassthroughObjectProperty": { "allOf": [ { diff --git a/output/schema/schema-serverless.json b/output/schema/schema-serverless.json index 1b0d463b80..0cdc25eb20 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -90415,7 +90415,7 @@ } } ], - "specLocation": "_types/mapping/complex.ts#L58-L63" + "specLocation": "_types/mapping/complex.ts#L59-L64" }, { "inherits": { @@ -90684,7 +90684,7 @@ } } ], - "specLocation": "_types/mapping/complex.ts#L25-L36" + "specLocation": "_types/mapping/complex.ts#L26-L37" }, { "inherits": { @@ -90741,7 +90741,7 @@ } } ], - "specLocation": "_types/mapping/complex.ts#L38-L43" + "specLocation": "_types/mapping/complex.ts#L39-L44" }, { "inherits": { @@ -90773,8 +90773,8 @@ "type": { "kind": "instance_of", "type": { - "name": "boolean", - "namespace": "_builtins" + "name": "Subobjects", + "namespace": "_types.mapping" } } }, @@ -90787,7 +90787,24 @@ } } ], - "specLocation": "_types/mapping/complex.ts#L45-L49" + "specLocation": "_types/mapping/complex.ts#L46-L50" + }, + { + "esQuirk": "This enum is a boolean that evolved into a tri-state enum. True and False have\nto be (de)serialized as JSON booleans.", + "kind": "enum", + "members": [ + { + "name": "true" + }, + { + "name": "false" + } + ], + "name": { + "name": "Subobjects", + "namespace": "_types.mapping" + }, + "specLocation": "_types/mapping/TypeMapping.ts#L63-L74" }, { "inherits": { @@ -90844,7 +90861,7 @@ } } ], - "specLocation": "_types/mapping/complex.ts#L51-L56" + "specLocation": "_types/mapping/complex.ts#L52-L57" }, { "kind": "interface", @@ -117753,8 +117770,8 @@ "type": { "kind": "instance_of", "type": { - "name": "boolean", - "namespace": "_builtins" + "name": "Subobjects", + "namespace": "_types.mapping" } } }, diff --git a/output/schema/schema.json b/output/schema/schema.json index 74f7debb82..8807ae93ff 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -75289,7 +75289,7 @@ } } ], - "specLocation": "_types/mapping/complex.ts#L58-L63" + "specLocation": "_types/mapping/complex.ts#L59-L64" }, { "kind": "interface", @@ -77212,7 +77212,7 @@ } } ], - "specLocation": "_types/mapping/complex.ts#L25-L36" + "specLocation": "_types/mapping/complex.ts#L26-L37" }, { "kind": "interface", @@ -78479,7 +78479,7 @@ } } ], - "specLocation": "_types/mapping/complex.ts#L38-L43" + "specLocation": "_types/mapping/complex.ts#L39-L44" }, { "kind": "interface", @@ -78634,8 +78634,8 @@ "type": { "kind": "instance_of", "type": { - "name": "boolean", - "namespace": "_builtins" + "name": "Subobjects", + "namespace": "_types.mapping" } } }, @@ -78648,7 +78648,7 @@ } } ], - "specLocation": "_types/mapping/complex.ts#L45-L49" + "specLocation": "_types/mapping/complex.ts#L46-L50" }, { "kind": "enum", @@ -78721,7 +78721,7 @@ } } ], - "specLocation": "_types/mapping/complex.ts#L51-L56" + "specLocation": "_types/mapping/complex.ts#L52-L57" }, { "kind": "interface", @@ -80135,6 +80135,33 @@ ], "specLocation": "_types/mapping/core.ts#L202-L204" }, + { + "kind": "enum", + "esQuirk": "This enum is a boolean that evolved into a tri-state enum. True and False have\nto be (de)serialized as JSON booleans.", + "members": [ + { + "name": "true" + }, + { + "name": "false" + }, + { + "availability": { + "stack": { + "featureFlag": "sub_objects_auto", + "since": "8.16.0", + "visibility": "feature_flag" + } + }, + "name": "auto" + } + ], + "name": { + "name": "Subobjects", + "namespace": "_types.mapping" + }, + "specLocation": "_types/mapping/TypeMapping.ts#L63-L74" + }, { "kind": "interface", "name": { @@ -80822,8 +80849,8 @@ "type": { "kind": "instance_of", "type": { - "name": "boolean", - "namespace": "_builtins" + "name": "Subobjects", + "namespace": "_types.mapping" } } }, diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 64c8d9d5af..1dfc00525c 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -5711,7 +5711,7 @@ export interface MappingNumberPropertyBase extends MappingDocValuesPropertyBase export interface MappingObjectProperty extends MappingCorePropertyBase { enabled?: boolean - subobjects?: boolean + subobjects?: MappingSubobjects type?: 'object' } @@ -5843,6 +5843,8 @@ export interface MappingSparseVectorProperty extends MappingPropertyBase { type: 'sparse_vector' } +export type MappingSubobjects = boolean | 'true' | 'false' | 'auto' + export interface MappingSuggestContext { name: Name path?: Field @@ -5905,7 +5907,7 @@ export interface MappingTypeMapping { _source?: MappingSourceField runtime?: Record enabled?: boolean - subobjects?: boolean + subobjects?: MappingSubobjects _data_stream_timestamp?: MappingDataStreamTimestamp } diff --git a/specification/_types/mapping/TypeMapping.ts b/specification/_types/mapping/TypeMapping.ts index 37aae9188b..c36e42dde0 100644 --- a/specification/_types/mapping/TypeMapping.ts +++ b/specification/_types/mapping/TypeMapping.ts @@ -48,7 +48,7 @@ export class TypeMapping { _source?: SourceField runtime?: Dictionary enabled?: boolean - subobjects?: boolean + subobjects?: Subobjects /** * @availability stack since=7.16.0 * @availability serverless @@ -59,3 +59,16 @@ export class TypeMapping { export class DataStreamTimestamp { enabled: boolean } + +/** + * @es_quirk This enum is a boolean that evolved into a tri-state enum. True and False have + * to be (de)serialized as JSON booleans. + */ +export enum Subobjects { + true, + false, + /** + * @availability stack since=8.16.0 visibility=feature_flag feature_flag=sub_objects_auto + */ + auto +} diff --git a/specification/_types/mapping/complex.ts b/specification/_types/mapping/complex.ts index 4cbb2a4f64..3f83b38aae 100644 --- a/specification/_types/mapping/complex.ts +++ b/specification/_types/mapping/complex.ts @@ -21,6 +21,7 @@ import { TimeSeriesMetricType } from '@_types/mapping/TimeSeriesMetricType' import { double, integer } from '@_types/Numeric' import { CorePropertyBase, IndexOptions } from './core' import { PropertyBase } from './Property' +import { Subobjects } from './TypeMapping' export class FlattenedProperty extends PropertyBase { boost?: double @@ -44,7 +45,7 @@ export class NestedProperty extends CorePropertyBase { export class ObjectProperty extends CorePropertyBase { enabled?: boolean - subobjects?: boolean + subobjects?: Subobjects type?: 'object' }