Skip to content

Commit 46ceecd

Browse files
Support subobjects: auto (#3877) (#3878)
(cherry picked from commit a88eef2) Co-authored-by: Quentin Pradet <[email protected]>
1 parent d4e72ab commit 46ceecd

File tree

7 files changed

+101
-26
lines changed

7 files changed

+101
-26
lines changed

output/openapi/elasticsearch-openapi.json

Lines changed: 10 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/openapi/elasticsearch-serverless-openapi.json

Lines changed: 9 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/schema-serverless.json

Lines changed: 26 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/schema.json

Lines changed: 36 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/typescript/types.ts

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/_types/mapping/TypeMapping.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export class TypeMapping {
4848
_source?: SourceField
4949
runtime?: Dictionary<string, RuntimeField>
5050
enabled?: boolean
51-
subobjects?: boolean
51+
subobjects?: Subobjects
5252
/**
5353
* @availability stack since=7.16.0
5454
* @availability serverless
@@ -59,3 +59,16 @@ export class TypeMapping {
5959
export class DataStreamTimestamp {
6060
enabled: boolean
6161
}
62+
63+
/**
64+
* @es_quirk This enum is a boolean that evolved into a tri-state enum. True and False have
65+
* to be (de)serialized as JSON booleans.
66+
*/
67+
export enum Subobjects {
68+
true,
69+
false,
70+
/**
71+
* @availability stack since=8.16.0 visibility=feature_flag feature_flag=sub_objects_auto
72+
*/
73+
auto
74+
}

specification/_types/mapping/complex.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import { TimeSeriesMetricType } from '@_types/mapping/TimeSeriesMetricType'
2121
import { double, integer } from '@_types/Numeric'
2222
import { CorePropertyBase, IndexOptions } from './core'
2323
import { PropertyBase } from './Property'
24+
import { Subobjects } from './TypeMapping'
2425

2526
export class FlattenedProperty extends PropertyBase {
2627
boost?: double
@@ -44,7 +45,7 @@ export class NestedProperty extends CorePropertyBase {
4445

4546
export class ObjectProperty extends CorePropertyBase {
4647
enabled?: boolean
47-
subobjects?: boolean
48+
subobjects?: Subobjects
4849
type?: 'object'
4950
}
5051

0 commit comments

Comments
 (0)