Skip to content

Commit 7994247

Browse files
authored
Add descriptions for index settings APIs (#2174)
Adds descriptions for the following APIs: - Get index settings API - Put index settings API This PR **doesn't** update index setting descriptions. I have an [open request regarding setting type annotations](#2172) I'd like to resolve first. ## Source for descriptions Source for the descriptions: - https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-settings.html - https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-update-settings.html
1 parent 585ff3b commit 7994247

File tree

3 files changed

+143
-22
lines changed

3 files changed

+143
-22
lines changed

output/schema/schema.json

Lines changed: 47 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/indices/get_settings/IndicesGetSettingsRequest.ts

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,70 @@ import { ExpandWildcards, Indices, Names } from '@_types/common'
2222
import { Duration } from '@_types/Time'
2323

2424
/**
25+
* Returns setting information for one or more indices. For data streams,
26+
* returns setting information for the stream’s backing indices.
2527
* @rest_spec_name indices.get_settings
2628
* @availability stack since=0.0.0 stability=stable
2729
* @availability serverless stability=stable visibility=public
30+
* @index_privileges view_index_metadata, monitor, manage
2831
*/
2932
export interface Request extends RequestBase {
3033
path_parts: {
34+
/**
35+
* Comma-separated list of data streams, indices, and aliases used to limit
36+
* the request. Supports wildcards (`*`). To target all data streams and
37+
* indices, omit this parameter or use `*` or `_all`.
38+
*/
3139
index?: Indices
40+
/**
41+
* Comma-separated list or wildcard expression of settings to retrieve.
42+
*/
3243
name?: Names
3344
}
3445
query_parameters: {
46+
/**
47+
* If `false`, the request returns an error if any wildcard expression, index
48+
* alias, or `_all` value targets only missing or closed indices. This
49+
* behavior applies even if the request targets other open indices. For
50+
* example, a request targeting `foo*,bar*` returns an error if an index
51+
* starts with foo but no index starts with `bar`.
52+
* @server_default true
53+
*/
3554
allow_no_indices?: boolean
55+
/**
56+
* Type of index that wildcard patterns can match.
57+
* If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.
58+
* Supports comma-separated values, such as `open,hidden`.
59+
* @server_default open
60+
*/
3661
expand_wildcards?: ExpandWildcards
62+
/**
63+
* If `true`, returns settings in flat format.
64+
* @server_default false
65+
*/
3766
flat_settings?: boolean
67+
/**
68+
* If `false`, the request returns an error if it targets a missing or closed index.
69+
* @server_default false
70+
*/
3871
ignore_unavailable?: boolean
72+
/**
73+
* If `true`, return all default settings in the response.
74+
* @server_default false
75+
*/
3976
include_defaults?: boolean
77+
/**
78+
* If `true`, the request retrieves information from the local node only. If
79+
* `false`, information is retrieved from the master node.
80+
* @server_default false
81+
*/
4082
local?: boolean
83+
/**
84+
* Period to wait for a connection to the master node. If no response is
85+
* received before the timeout expires, the request fails and returns an
86+
* error.
87+
* @server_default 30s
88+
*/
4189
master_timeout?: Duration
4290
}
4391
}

specification/indices/put_settings/IndicesPutSettingsRequest.ts

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,70 @@ import { ExpandWildcards, Indices } from '@_types/common'
2323
import { Duration } from '@_types/Time'
2424

2525
/**
26+
* Changes a dynamic index setting in real time. For data streams, index setting
27+
* changes are applied to all backing indices by default.
2628
* @rest_spec_name indices.put_settings
2729
* @availability stack since=0.0.0 stability=stable
2830
* @availability serverless stability=stable visibility=public
31+
* @index_privileges manage
2932
*/
3033
export interface Request extends RequestBase {
3134
path_parts: {
35+
/**
36+
* Comma-separated list of data streams, indices, and aliases used to limit
37+
* the request. Supports wildcards (`*`). To target all data streams and
38+
* indices, omit this parameter or use `*` or `_all`.
39+
*/
3240
index?: Indices
3341
}
3442
query_parameters: {
43+
/**
44+
* If `false`, the request returns an error if any wildcard expression, index
45+
* alias, or `_all` value targets only missing or closed indices. This
46+
* behavior applies even if the request targets other open indices. For
47+
* example, a request targeting `foo*,bar*` returns an error if an index
48+
* starts with `foo` but no index starts with `bar`.
49+
* @server_default false
50+
*/
3551
allow_no_indices?: boolean
52+
/**
53+
* Type of index that wildcard patterns can match. If the request can target
54+
* data streams, this argument determines whether wildcard expressions match
55+
* hidden data streams. Supports comma-separated values, such as
56+
* `open,hidden`.
57+
* @server_default open
58+
*/
3659
expand_wildcards?: ExpandWildcards
60+
/**
61+
* If `true`, returns settings in flat format.
62+
* @server_default false
63+
*/
3764
flat_settings?: boolean
65+
/**
66+
* If `true`, returns settings in flat format.
67+
* @server_default false
68+
*/
3869
ignore_unavailable?: boolean
70+
/**
71+
* Period to wait for a connection to the master node. If no response is
72+
* received before the timeout expires, the request fails and returns an
73+
* error.
74+
* @server_default 30s
75+
*/
3976
master_timeout?: Duration
77+
/**
78+
* If `true`, existing index settings remain unchanged.
79+
* @server_default false
80+
*/
4081
preserve_existing?: boolean
82+
/**
83+
* Period to wait for a response. If no response is received before the
84+
* timeout expires, the request fails and returns an error.
85+
* @server_default 30s
86+
*/
4187
timeout?: Duration
4288
}
43-
/** @codegen_name settings */
89+
/** Configuration options for the index.
90+
* @codegen_name settings */
4491
body: IndexSettings
4592
}

0 commit comments

Comments
 (0)