Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support subobjects: auto #3877

Merged
merged 1 commit into from
Mar 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q: Out of curiosity, does ES accept true and false as string too? This seems to be the case for the other enums evolved from a boolean.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* 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