diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 5a1b4f37a3..f33370fc02 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -63263,7 +63263,7 @@ "type": "boolean" }, "subobjects": { - "type": "boolean" + "$ref": "#/components/schemas/_types.mapping:Subobjects" }, "_data_stream_timestamp": { "$ref": "#/components/schemas/_types.mapping:DataStreamTimestamp" @@ -64590,7 +64590,7 @@ "type": "boolean" }, "subobjects": { - "type": "boolean" + "$ref": "#/components/schemas/_types.mapping:Subobjects" }, "type": { "type": "string", @@ -64602,6 +64602,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 a4e5eba0e7..b7874d5241 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -40997,7 +40997,7 @@ "type": "boolean" }, "subobjects": { - "type": "boolean" + "$ref": "#/components/schemas/_types.mapping:Subobjects" }, "_data_stream_timestamp": { "$ref": "#/components/schemas/_types.mapping:DataStreamTimestamp" @@ -42324,7 +42324,7 @@ "type": "boolean" }, "subobjects": { - "type": "boolean" + "$ref": "#/components/schemas/_types.mapping:Subobjects" }, "type": { "type": "string", @@ -42336,6 +42336,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 ae60622610..949e8dfba2 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -90560,7 +90560,7 @@ } } ], - "specLocation": "_types/mapping/complex.ts#L58-L63" + "specLocation": "_types/mapping/complex.ts#L59-L64" }, { "inherits": { @@ -90829,7 +90829,7 @@ } } ], - "specLocation": "_types/mapping/complex.ts#L25-L36" + "specLocation": "_types/mapping/complex.ts#L26-L37" }, { "inherits": { @@ -90886,7 +90886,7 @@ } } ], - "specLocation": "_types/mapping/complex.ts#L38-L43" + "specLocation": "_types/mapping/complex.ts#L39-L44" }, { "inherits": { @@ -90918,8 +90918,8 @@ "type": { "kind": "instance_of", "type": { - "name": "boolean", - "namespace": "_builtins" + "name": "Subobjects", + "namespace": "_types.mapping" } } }, @@ -90932,7 +90932,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": { @@ -90989,7 +91006,7 @@ } } ], - "specLocation": "_types/mapping/complex.ts#L51-L56" + "specLocation": "_types/mapping/complex.ts#L52-L57" }, { "kind": "interface", @@ -118103,8 +118120,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 7eefbb7ad1..e62483ff6c 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -75388,7 +75388,7 @@ } } ], - "specLocation": "_types/mapping/complex.ts#L58-L63" + "specLocation": "_types/mapping/complex.ts#L59-L64" }, { "kind": "interface", @@ -77311,7 +77311,7 @@ } } ], - "specLocation": "_types/mapping/complex.ts#L25-L36" + "specLocation": "_types/mapping/complex.ts#L26-L37" }, { "kind": "interface", @@ -78578,7 +78578,7 @@ } } ], - "specLocation": "_types/mapping/complex.ts#L38-L43" + "specLocation": "_types/mapping/complex.ts#L39-L44" }, { "kind": "interface", @@ -78733,8 +78733,8 @@ "type": { "kind": "instance_of", "type": { - "name": "boolean", - "namespace": "_builtins" + "name": "Subobjects", + "namespace": "_types.mapping" } } }, @@ -78747,7 +78747,7 @@ } } ], - "specLocation": "_types/mapping/complex.ts#L45-L49" + "specLocation": "_types/mapping/complex.ts#L46-L50" }, { "kind": "enum", @@ -78820,7 +78820,7 @@ } } ], - "specLocation": "_types/mapping/complex.ts#L51-L56" + "specLocation": "_types/mapping/complex.ts#L52-L57" }, { "kind": "interface", @@ -80234,6 +80234,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": { @@ -80921,8 +80948,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 3cd29dd052..49d9e74b61 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -5721,7 +5721,7 @@ export interface MappingNumberPropertyBase extends MappingDocValuesPropertyBase export interface MappingObjectProperty extends MappingCorePropertyBase { enabled?: boolean - subobjects?: boolean + subobjects?: MappingSubobjects type?: 'object' } @@ -5853,6 +5853,8 @@ export interface MappingSparseVectorProperty extends MappingPropertyBase { type: 'sparse_vector' } +export type MappingSubobjects = boolean | 'true' | 'false' | 'auto' + export interface MappingSuggestContext { name: Name path?: Field @@ -5915,7 +5917,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' }