Skip to content
Open
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
302 changes: 151 additions & 151 deletions output/openapi/elasticsearch-openapi.json

Large diffs are not rendered by default.

300 changes: 150 additions & 150 deletions output/openapi/elasticsearch-serverless-openapi.json

Large diffs are not rendered by default.

72 changes: 34 additions & 38 deletions output/schema/schema.json

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

7 changes: 4 additions & 3 deletions output/typescript/types.ts

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

4 changes: 2 additions & 2 deletions specification/cluster/_types/ComponentTemplate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { TypeMapping } from '@_types/mapping/TypeMapping'
import { DateTime, EpochTime, UnitMillis } from '@_types/Time'
import { AliasDefinition } from '@indices/_types/AliasDefinition'
import { DataStreamLifecycleWithRollover } from '@indices/_types/DataStreamLifecycle'
import { DataStreamOptionsTemplate } from '@indices/_types/DataStreamOptions'
import { DataStreamOptions } from '@indices/_types/DataStreamOptions'
import { IndexSettings } from '@indices/_types/IndexSettings'
import { Dictionary } from '@spec_utils/Dictionary'

Expand Down Expand Up @@ -82,5 +82,5 @@ export class ComponentTemplateSummary {
* @availability stack since=8.19.0 stability=stable
* @availability serverless stability=stable
*/
data_stream_options?: DataStreamOptionsTemplate | null
data_stream_options?: DataStreamOptions
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import { RequestBase } from '@_types/Base'
import { Metadata, Name, VersionNumber } from '@_types/common'
import { Duration } from '@_types/Time'
import { IndexState } from '@indices/_types/IndexState'
import { IndexTemplateMapping } from '@indices/put_index_template/IndicesPutIndexTemplateRequest'
Copy link
Contributor

Choose a reason for hiding this comment

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

This import isn't particularly pretty. I'll leave it up to you whether this is fine or if we should extract the IndexTemplateMapping class to a dedicated file. If we're extracting it (which I'm in favor of), we should probably also rename it.


/**
* Create or update a component template.
Expand Down Expand Up @@ -87,7 +87,7 @@ export interface Request extends RequestBase {
/**
* The template to be applied which includes mappings, settings, or aliases configuration.
*/
template: IndexState
template: IndexTemplateMapping
Copy link
Contributor

Choose a reason for hiding this comment

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

Both component templates and composable/index templates define the template field. In the ES code, they both point to the same class and are thus parsed in the same way, so we can/should use the same class in the spec too. (just explaining why I made this change)

/**
* Version number used to manage component templates externally.
* This number isn't automatically generated or incremented by Elasticsearch.
Expand Down
4 changes: 2 additions & 2 deletions specification/indices/_types/IndexTemplate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { TypeMapping } from '@_types/mapping/TypeMapping'
import { long } from '@_types/Numeric'
import { DateTime, EpochTime, UnitMillis } from '@_types/Time'
import { DataStreamLifecycleWithRollover } from '@indices/_types/DataStreamLifecycle'
import { DataStreamOptionsTemplate } from '@indices/_types/DataStreamOptions'
import { DataStreamOptions } from '@indices/_types/DataStreamOptions'
import { Dictionary } from '@spec_utils/Dictionary'
import { Alias } from './Alias'
import { IndexSettings } from './IndexSettings'
Expand Down Expand Up @@ -145,5 +145,5 @@ export class IndexTemplateSummary {
* @availability stack since=8.19.0 stability=stable
* @availability serverless stability=stable
*/
data_stream_options?: DataStreamOptionsTemplate | null
data_stream_options?: DataStreamOptions
Copy link
Contributor

Choose a reason for hiding this comment

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

According to the description of DataStreamOptionsTemplate:

Data stream options template contains the same information as DataStreamOptions but allows them to be set explicitly to null.

Which means it's only relevant for PUT requests, and this IndexTemplateSummary/IndexTemplate is only used in retrieval APIs. That's why I changed it to DataStreamOptions.

}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { Duration } from '@_types/Time'
import { Alias } from '@indices/_types/Alias'
import { DataStreamVisibility } from '@indices/_types/DataStream'
import { DataStreamLifecycle } from '@indices/_types/DataStreamLifecycle'
import { DataStreamOptionsTemplate } from '@indices/_types/DataStreamOptions'
import { IndexSettings } from '@indices/_types/IndexSettings'
import { Dictionary } from '@spec_utils/Dictionary'

Expand Down Expand Up @@ -178,4 +179,9 @@ export class IndexTemplateMapping {
* @availability serverless stability=stable
*/
lifecycle?: DataStreamLifecycle
/**
* @availability stack since=8.19.0 stability=stable
Copy link
Contributor

Choose a reason for hiding this comment

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

While the options are technically available in 8.18.0 (which is the version you originally used in your changes), the other data stream option changes (from 00be10a) all specify 8.19.0, which was probably done because the failure store feature flag (currently the only field in data stream options) was only removed in 8.19.0, so I'm going for consistency here.

* @availability serverless stability=stable
*/
data_stream_options?: DataStreamOptionsTemplate
}