Skip to content

Commit

Permalink
Support subobjects: auto (#3877)
Browse files Browse the repository at this point in the history
  • Loading branch information
pquentin authored Mar 5, 2025
1 parent b65dd3f commit a88eef2
Show file tree
Hide file tree
Showing 7 changed files with 101 additions and 26 deletions.
12 changes: 10 additions & 2 deletions output/openapi/elasticsearch-openapi.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions output/openapi/elasticsearch-serverless-openapi.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 26 additions & 9 deletions output/schema/schema-serverless.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 36 additions & 9 deletions output/schema/schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions output/typescript/types.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 14 additions & 1 deletion specification/_types/mapping/TypeMapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class TypeMapping {
_source?: SourceField
runtime?: Dictionary<string, RuntimeField>
enabled?: boolean
subobjects?: boolean
subobjects?: Subobjects
/**
* @availability stack since=7.16.0
* @availability serverless
Expand All @@ -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
}
3 changes: 2 additions & 1 deletion specification/_types/mapping/complex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -44,7 +45,7 @@ export class NestedProperty extends CorePropertyBase {

export class ObjectProperty extends CorePropertyBase {
enabled?: boolean
subobjects?: boolean
subobjects?: Subobjects
type?: 'object'
}

Expand Down

0 comments on commit a88eef2

Please sign in to comment.