-
Notifications
You must be signed in to change notification settings - Fork 115
Fix cluster.put_component_template API #5370
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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' | ||
|
||
/** | ||
* Create or update a component template. | ||
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Both component templates and composable/index templates define the |
||
/** | ||
* Version number used to manage component templates externally. | ||
* This number isn't automatically generated or incremented by Elasticsearch. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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' | ||
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. According to the description of
Which means it's only relevant for |
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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' | ||
|
||
|
@@ -178,4 +179,9 @@ export class IndexTemplateMapping { | |
* @availability serverless stability=stable | ||
*/ | ||
lifecycle?: DataStreamLifecycle | ||
/** | ||
* @availability stack since=8.19.0 stability=stable | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While the options are technically available in |
||
* @availability serverless stability=stable | ||
*/ | ||
data_stream_options?: DataStreamOptionsTemplate | ||
} |
There was a problem hiding this comment.
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.