From dd399461ccf88bbffd721b21aabb8565b162f32e Mon Sep 17 00:00:00 2001 From: Quentin Pradet Date: Wed, 12 Nov 2025 20:01:23 +0400 Subject: [PATCH] Fix expand_wildcards default values (#5599) * Specify default_value for expand_wildcards * Fix one default value (cherry picked from commit 245d55fe36b997baad0b688e499d116185c8e21b) # Conflicts: # specification/indices/delete_data_stream_options/IndicesDeleteDataStreamOptionsRequest.ts --- specification/_global/msearch/MultiSearchRequest.ts | 1 + specification/_global/rank_eval/RankEvalRequest.ts | 3 +++ specification/_global/search_template/SearchTemplateRequest.ts | 1 + specification/_global/update_by_query/UpdateByQueryRequest.ts | 1 + specification/async_search/submit/AsyncSearchSubmitRequest.ts | 3 +++ specification/cat/aliases/CatAliasesRequest.ts | 1 + specification/cat/indices/CatIndicesRequest.ts | 1 + specification/cluster/health/ClusterHealthRequest.ts | 3 +++ specification/cluster/state/ClusterStateRequest.ts | 1 + .../data_streams_stats/IndicesDataStreamsStatsRequest.ts | 2 +- specification/indices/delete/IndicesDeleteRequest.ts | 2 +- .../delete_data_lifecycle/IndicesDeleteDataLifecycleRequest.ts | 3 +++ .../indices/exists_alias/IndicesExistsAliasRequest.ts | 2 +- .../indices/field_usage_stats/IndicesFieldUsageStatsRequest.ts | 1 + specification/indices/forcemerge/IndicesForceMergeRequest.ts | 3 +++ specification/indices/get_alias/IndicesGetAliasRequest.ts | 2 +- specification/indices/open/IndicesOpenRequest.ts | 2 +- .../reload_search_analyzers/ReloadSearchAnalyzersRequest.ts | 1 + specification/indices/stats/IndicesStatsRequest.ts | 1 + .../clear_cache/SearchableSnapshotsClearCacheRequest.ts | 1 + 20 files changed, 30 insertions(+), 5 deletions(-) diff --git a/specification/_global/msearch/MultiSearchRequest.ts b/specification/_global/msearch/MultiSearchRequest.ts index ed21a81e84..d57764866f 100644 --- a/specification/_global/msearch/MultiSearchRequest.ts +++ b/specification/_global/msearch/MultiSearchRequest.ts @@ -77,6 +77,7 @@ export interface Request extends RequestBase { ccs_minimize_roundtrips?: boolean /** * Type of index that wildcard expressions can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + * @server_default open */ expand_wildcards?: ExpandWildcards /** diff --git a/specification/_global/rank_eval/RankEvalRequest.ts b/specification/_global/rank_eval/RankEvalRequest.ts index 4e63e4ea0c..56ff06a8e2 100644 --- a/specification/_global/rank_eval/RankEvalRequest.ts +++ b/specification/_global/rank_eval/RankEvalRequest.ts @@ -57,6 +57,9 @@ export interface Request extends RequestBase { * @server_default true */ allow_no_indices?: boolean + /** + * @server_default open + */ expand_wildcards?: ExpandWildcards /** * If `true`, missing or closed indices are not included in the response. diff --git a/specification/_global/search_template/SearchTemplateRequest.ts b/specification/_global/search_template/SearchTemplateRequest.ts index 2adba0ef14..405e446b8e 100644 --- a/specification/_global/search_template/SearchTemplateRequest.ts +++ b/specification/_global/search_template/SearchTemplateRequest.ts @@ -73,6 +73,7 @@ export interface Request extends RequestBase { * The type of index that wildcard patterns can match. * If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. * Supports comma-separated values, such as `open,hidden`. + * @server_default open */ expand_wildcards?: ExpandWildcards /** diff --git a/specification/_global/update_by_query/UpdateByQueryRequest.ts b/specification/_global/update_by_query/UpdateByQueryRequest.ts index 251593995e..d6611fe598 100644 --- a/specification/_global/update_by_query/UpdateByQueryRequest.ts +++ b/specification/_global/update_by_query/UpdateByQueryRequest.ts @@ -180,6 +180,7 @@ export interface Request extends RequestBase { * The type of index that wildcard patterns can match. * If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. * It supports comma-separated values, such as `open,hidden`. + * @server_default open */ expand_wildcards?: ExpandWildcards /** diff --git a/specification/async_search/submit/AsyncSearchSubmitRequest.ts b/specification/async_search/submit/AsyncSearchSubmitRequest.ts index 19008f0639..c6fa38d90f 100644 --- a/specification/async_search/submit/AsyncSearchSubmitRequest.ts +++ b/specification/async_search/submit/AsyncSearchSubmitRequest.ts @@ -125,6 +125,9 @@ export interface Request extends RequestBase { default_operator?: Operator df?: string docvalue_fields?: Fields + /** + * @server_default open + */ expand_wildcards?: ExpandWildcards explain?: boolean ignore_throttled?: boolean diff --git a/specification/cat/aliases/CatAliasesRequest.ts b/specification/cat/aliases/CatAliasesRequest.ts index f68bd1a973..7af7767d25 100644 --- a/specification/cat/aliases/CatAliasesRequest.ts +++ b/specification/cat/aliases/CatAliasesRequest.ts @@ -63,6 +63,7 @@ export interface Request extends CatRequestBase { * The type of index that wildcard patterns can match. * If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. * It supports comma-separated values, such as `open,hidden`. + * @server_default all */ expand_wildcards?: ExpandWildcards /** diff --git a/specification/cat/indices/CatIndicesRequest.ts b/specification/cat/indices/CatIndicesRequest.ts index 96fbc44dd3..222e531067 100644 --- a/specification/cat/indices/CatIndicesRequest.ts +++ b/specification/cat/indices/CatIndicesRequest.ts @@ -66,6 +66,7 @@ export interface Request extends CatRequestBase { query_parameters: { /** * The type of index that wildcard patterns can match. + * @server_default all */ expand_wildcards?: ExpandWildcards /** The health status used to limit returned indices. By default, the response includes indices of any health status. */ diff --git a/specification/cluster/health/ClusterHealthRequest.ts b/specification/cluster/health/ClusterHealthRequest.ts index 083cf0b746..23b5cd83d5 100644 --- a/specification/cluster/health/ClusterHealthRequest.ts +++ b/specification/cluster/health/ClusterHealthRequest.ts @@ -66,6 +66,9 @@ export interface Request extends RequestBase { index?: Indices } query_parameters: { + /** + * @server_default all + */ expand_wildcards?: ExpandWildcards /** * Can be one of cluster, indices or shards. Controls the details level of the health information returned. diff --git a/specification/cluster/state/ClusterStateRequest.ts b/specification/cluster/state/ClusterStateRequest.ts index 009bcb2de2..69017251de 100644 --- a/specification/cluster/state/ClusterStateRequest.ts +++ b/specification/cluster/state/ClusterStateRequest.ts @@ -74,6 +74,7 @@ export interface Request extends RequestBase { query_parameters: { /** @server_default true */ allow_no_indices?: boolean + /** @server_default open */ expand_wildcards?: ExpandWildcards /** @server_default false */ flat_settings?: boolean diff --git a/specification/indices/data_streams_stats/IndicesDataStreamsStatsRequest.ts b/specification/indices/data_streams_stats/IndicesDataStreamsStatsRequest.ts index b5c02c6099..ed522ffded 100644 --- a/specification/indices/data_streams_stats/IndicesDataStreamsStatsRequest.ts +++ b/specification/indices/data_streams_stats/IndicesDataStreamsStatsRequest.ts @@ -54,7 +54,7 @@ export interface Request extends RequestBase { /** * Type of data stream that wildcard patterns can match. * Supports comma-separated values, such as `open,hidden`. - * @server_default open + * @server_default open,closed */ expand_wildcards?: ExpandWildcards } diff --git a/specification/indices/delete/IndicesDeleteRequest.ts b/specification/indices/delete/IndicesDeleteRequest.ts index 7110ecc718..b2a93c570b 100644 --- a/specification/indices/delete/IndicesDeleteRequest.ts +++ b/specification/indices/delete/IndicesDeleteRequest.ts @@ -62,7 +62,7 @@ export interface Request extends RequestBase { * Type of index that wildcard patterns can match. * If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. * Supports comma-separated values, such as `open,hidden`. - * @server_default open + * @server_default open,closed */ expand_wildcards?: ExpandWildcards /** diff --git a/specification/indices/delete_data_lifecycle/IndicesDeleteDataLifecycleRequest.ts b/specification/indices/delete_data_lifecycle/IndicesDeleteDataLifecycleRequest.ts index 8587870150..da713a9e9d 100644 --- a/specification/indices/delete_data_lifecycle/IndicesDeleteDataLifecycleRequest.ts +++ b/specification/indices/delete_data_lifecycle/IndicesDeleteDataLifecycleRequest.ts @@ -41,6 +41,9 @@ export interface Request extends RequestBase { name: DataStreamNames } query_parameters: { + /** + * @server_default open + */ expand_wildcards?: ExpandWildcards /** * @server_default 30s diff --git a/specification/indices/exists_alias/IndicesExistsAliasRequest.ts b/specification/indices/exists_alias/IndicesExistsAliasRequest.ts index 6d75f940b1..c4797d222d 100644 --- a/specification/indices/exists_alias/IndicesExistsAliasRequest.ts +++ b/specification/indices/exists_alias/IndicesExistsAliasRequest.ts @@ -62,7 +62,7 @@ export interface Request extends RequestBase { * Type of index that wildcard patterns can match. * If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. * Supports comma-separated values, such as `open,hidden`. - * @server_default open + * @server_default all */ expand_wildcards?: ExpandWildcards /** diff --git a/specification/indices/field_usage_stats/IndicesFieldUsageStatsRequest.ts b/specification/indices/field_usage_stats/IndicesFieldUsageStatsRequest.ts index 194cc10971..dac6f9f1ce 100644 --- a/specification/indices/field_usage_stats/IndicesFieldUsageStatsRequest.ts +++ b/specification/indices/field_usage_stats/IndicesFieldUsageStatsRequest.ts @@ -58,6 +58,7 @@ export interface Request extends RequestBase { * Type of index that wildcard patterns can match. * If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. * Supports comma-separated values, such as `open,hidden`. + * @server_default open */ expand_wildcards?: ExpandWildcards /** diff --git a/specification/indices/forcemerge/IndicesForceMergeRequest.ts b/specification/indices/forcemerge/IndicesForceMergeRequest.ts index d18a6a4adc..108db6fe4f 100644 --- a/specification/indices/forcemerge/IndicesForceMergeRequest.ts +++ b/specification/indices/forcemerge/IndicesForceMergeRequest.ts @@ -98,6 +98,9 @@ export interface Request extends RequestBase { } query_parameters: { allow_no_indices?: boolean + /** + * @server_default open + */ expand_wildcards?: ExpandWildcards flush?: boolean ignore_unavailable?: boolean diff --git a/specification/indices/get_alias/IndicesGetAliasRequest.ts b/specification/indices/get_alias/IndicesGetAliasRequest.ts index 35fc1c5e8b..24cb53133b 100644 --- a/specification/indices/get_alias/IndicesGetAliasRequest.ts +++ b/specification/indices/get_alias/IndicesGetAliasRequest.ts @@ -73,7 +73,7 @@ export interface Request extends RequestBase { * Type of index that wildcard patterns can match. * If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. * Supports comma-separated values, such as `open,hidden`. - * @server_default open + * @server_default all */ expand_wildcards?: ExpandWildcards /** diff --git a/specification/indices/open/IndicesOpenRequest.ts b/specification/indices/open/IndicesOpenRequest.ts index 9396761be4..bb0ebc3be8 100644 --- a/specification/indices/open/IndicesOpenRequest.ts +++ b/specification/indices/open/IndicesOpenRequest.ts @@ -80,7 +80,7 @@ export interface Request extends RequestBase { * Type of index that wildcard patterns can match. * If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. * Supports comma-separated values, such as `open,hidden`. - * @server_default open + * @server_default closed */ expand_wildcards?: ExpandWildcards /** diff --git a/specification/indices/reload_search_analyzers/ReloadSearchAnalyzersRequest.ts b/specification/indices/reload_search_analyzers/ReloadSearchAnalyzersRequest.ts index aa65f94951..5bab1b32f8 100644 --- a/specification/indices/reload_search_analyzers/ReloadSearchAnalyzersRequest.ts +++ b/specification/indices/reload_search_analyzers/ReloadSearchAnalyzersRequest.ts @@ -53,6 +53,7 @@ export interface Request extends RequestBase { } query_parameters: { allow_no_indices?: boolean + /** @server_default open */ expand_wildcards?: ExpandWildcards ignore_unavailable?: boolean /** diff --git a/specification/indices/stats/IndicesStatsRequest.ts b/specification/indices/stats/IndicesStatsRequest.ts index b5d32d11ec..2ccb72d094 100644 --- a/specification/indices/stats/IndicesStatsRequest.ts +++ b/specification/indices/stats/IndicesStatsRequest.ts @@ -76,6 +76,7 @@ export interface Request extends RequestBase { * Type of index that wildcard patterns can match. If the request can target data streams, this argument * determines whether wildcard expressions match hidden data streams. Supports comma-separated values, * such as `open,hidden`. + * @server_default open */ expand_wildcards?: ExpandWildcards /** diff --git a/specification/searchable_snapshots/clear_cache/SearchableSnapshotsClearCacheRequest.ts b/specification/searchable_snapshots/clear_cache/SearchableSnapshotsClearCacheRequest.ts index 52fe3ae85d..975650e1bd 100644 --- a/specification/searchable_snapshots/clear_cache/SearchableSnapshotsClearCacheRequest.ts +++ b/specification/searchable_snapshots/clear_cache/SearchableSnapshotsClearCacheRequest.ts @@ -49,6 +49,7 @@ export interface Request extends RequestBase { index?: Indices } query_parameters: { + /** @server_default open */ expand_wildcards?: ExpandWildcards allow_no_indices?: boolean ignore_unavailable?: boolean