Skip to content

Commit 89cd8f3

Browse files
authored
Add additional technical writer feedback to Cluster APIs (#824)
Signed-off-by: Archer <[email protected]> Signed-off-by: Naarcha-AWS <[email protected]>
1 parent d27f33f commit 89cd8f3

File tree

4 files changed

+72
-27
lines changed

4 files changed

+72
-27
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
55
## [Unreleased]
66

77
### Added
8+
- Added defaults for Cluster APIs ([#824](https://github.com/opensearch-project/opensearch-api-specification/pull/824/))
89
- Added `aggs` alias for nested aggregations ([#818](https://github.com/opensearch-project/opensearch-api-specification/pull/818))
910
- Added API specs for query groups lifecycle APIs ([#649](https://github.com/opensearch-project/opensearch-api-specification/pull/649))
1011
- Added Python and Ruby spec validators ([#646](https://github.com/opensearch-project/opensearch-api-specification/pull/646))

spec/namespaces/cluster.yaml

+24-8
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,7 @@ components:
834834
cluster.allocation_explain::query.include_yes_decisions:
835835
in: query
836836
name: include_yes_decisions
837-
description: When `true`, returns any `YES` decisions in the allocation explanation.
837+
description: When `true`, returns any `YES` decisions in the allocation explanation. `YES` decisions indicate when a particular shard allocation attempt was successful for the given node.
838838
schema:
839839
type: boolean
840840
default: false
@@ -852,7 +852,7 @@ components:
852852
cluster.delete_component_template::query.cluster_manager_timeout:
853853
name: cluster_manager_timeout
854854
in: query
855-
description: Operation timeout for connection to cluster-manager node.
855+
description: The amount of time to wait for a response from the cluster manager node. For more information about supported time units, see [Common parameters](https://opensearch.org/docs/latest/api-reference/common-parameters/#time-units).
856856
schema:
857857
$ref: '../schemas/_common.yaml#/components/schemas/Duration'
858858
x-version-added: '2.0'
@@ -897,6 +897,7 @@ components:
897897
style: simple
898898
cluster.exists_component_template::query.cluster_manager_timeout:
899899
name: cluster_manager_timeout
900+
description: The amount of time to wait for a response from the cluster manager node. For more information about supported time units, see [Common parameters](https://opensearch.org/docs/latest/api-reference/common-parameters/#time-units).
900901
in: query
901902
schema:
902903
$ref: '../schemas/_common.yaml#/components/schemas/Duration'
@@ -932,14 +933,18 @@ components:
932933
style: simple
933934
cluster.get_component_template::query.cluster_manager_timeout:
934935
name: cluster_manager_timeout
936+
description: The amount of time to wait for a response from the cluster manager node. For more information about supported time units, see [Common parameters](https://opensearch.org/docs/latest/api-reference/common-parameters/#time-units).
935937
in: query
936938
schema:
937939
$ref: '../schemas/_common.yaml#/components/schemas/Duration'
940+
default: 30s
938941
x-version-added: '2.0'
939942
cluster.get_component_template::query.flat_settings:
940943
in: query
941944
name: flat_settings
942-
description: If `true`, returns settings in flat format.
945+
description: |-
946+
Whether to return settings in the flat form, which can improve readability, especially for heavily nested settings.
947+
For example, the flat form of `"cluster": { "max_shards_per_node": 500 }` is `"cluster.max_shards_per_node": "500"`.
943948
schema:
944949
type: boolean
945950
default: false
@@ -973,6 +978,7 @@ components:
973978
required: true
974979
cluster.get_settings::query.cluster_manager_timeout:
975980
name: cluster_manager_timeout
981+
description: The amount of time to wait for a response from the cluster manager node. For more information about supported time units, see [Common parameters](https://opensearch.org/docs/latest/api-reference/common-parameters/#time-units).
976982
in: query
977983
schema:
978984
$ref: '../schemas/_common.yaml#/components/schemas/Duration'
@@ -1033,6 +1039,7 @@ components:
10331039
cluster.health::query.cluster_manager_timeout:
10341040
name: cluster_manager_timeout
10351041
in: query
1042+
description: The amount of time to wait for a response from the cluster manager node. For more information about supported time units, see [Common parameters](https://opensearch.org/docs/latest/api-reference/common-parameters/#time-units).
10361043
schema:
10371044
$ref: '../schemas/_common.yaml#/components/schemas/Duration'
10381045
x-version-added: '2.0'
@@ -1041,6 +1048,7 @@ components:
10411048
name: expand_wildcards
10421049
schema:
10431050
$ref: '../schemas/_common.yaml#/components/schemas/ExpandWildcards'
1051+
default: open
10441052
style: form
10451053
cluster.health::query.level:
10461054
in: query
@@ -1069,13 +1077,15 @@ components:
10691077
cluster.health::query.timeout:
10701078
in: query
10711079
name: timeout
1080+
description: The amount of time to wait for a response from the cluster manager node. For more information about supported time units, see [Common parameters](https://opensearch.org/docs/latest/api-reference/common-parameters/#time-units).
10721081
schema:
10731082
$ref: '../schemas/_common.yaml#/components/schemas/Duration'
10741083
style: form
10751084
cluster.health::query.wait_for_active_shards:
10761085
in: query
10771086
name: wait_for_active_shards
10781087
schema:
1088+
default: 0
10791089
$ref: '../schemas/_common.yaml#/components/schemas/WaitForActiveShards'
10801090
style: form
10811091
cluster.health::query.wait_for_events:
@@ -1098,6 +1108,7 @@ components:
10981108
description: Whether to wait until there are no relocating shards in the cluster.
10991109
schema:
11001110
type: boolean
1111+
default: false
11011112
style: form
11021113
cluster.health::query.wait_for_nodes:
11031114
in: query
@@ -1117,6 +1128,7 @@ components:
11171128
style: form
11181129
cluster.pending_tasks::query.cluster_manager_timeout:
11191130
name: cluster_manager_timeout
1131+
description: The amount of time to wait for a response from the cluster manager node. For more information about supported time units, see [Common parameters](https://opensearch.org/docs/latest/api-reference/common-parameters/#time-units).
11201132
in: query
11211133
schema:
11221134
$ref: '../schemas/_common.yaml#/components/schemas/Duration'
@@ -1184,6 +1196,7 @@ components:
11841196
style: simple
11851197
cluster.put_component_template::query.cluster_manager_timeout:
11861198
name: cluster_manager_timeout
1199+
description: The amount of time to wait for a response from the cluster manager node. For more information about supported time units, see [Common parameters](https://opensearch.org/docs/latest/api-reference/common-parameters/#time-units).
11871200
in: query
11881201
schema:
11891202
$ref: '../schemas/_common.yaml#/components/schemas/Duration'
@@ -1221,13 +1234,14 @@ components:
12211234
cluster.put_decommission_awareness::path.awareness_attribute_value:
12221235
name: awareness_attribute_value
12231236
in: path
1224-
description: The value of the awareness attribute.
1237+
description: The value of the awareness attribute. For example, if you have shards allocated in two different zones, you can give each zone a value of `zone-a` or `zoneb`. The cluster decommission operation decommissions the zone listed in the method.
12251238
schema:
12261239
type: string
1227-
description: The value of the awareness attribute.
1240+
description: The value of the awareness attribute. For example, if you have shards allocated in two different zones, you can give each zone a value of `zone-a` or `zoneb`. The cluster decommission operation decommissions the zone listed in the method.
12281241
required: true
12291242
cluster.put_settings::query.cluster_manager_timeout:
12301243
name: cluster_manager_timeout
1244+
description: The amount of time to wait for a response from the cluster manager node. For more information about supported time units, see [Common parameters](https://opensearch.org/docs/latest/api-reference/common-parameters/#time-units).
12311245
in: query
12321246
schema:
12331247
$ref: '../schemas/_common.yaml#/components/schemas/Duration'
@@ -1258,14 +1272,15 @@ components:
12581272
cluster.put_weighted_routing::path.attribute:
12591273
name: attribute
12601274
in: path
1261-
description: The name of the awareness attribute.
1275+
description: The name of awareness attribute, usually `zone`.
12621276
schema:
12631277
type: string
1264-
description: The name of the awareness attribute.
1278+
description: The name of awareness attribute, usually `zone`.
12651279
required: true
12661280
cluster.reroute::query.cluster_manager_timeout:
12671281
name: cluster_manager_timeout
12681282
in: query
1283+
description: The amount of time to wait for a response from the cluster manager node. For more information about supported time units, see [Common parameters](https://opensearch.org/docs/latest/api-reference/common-parameters/#time-units).
12691284
schema:
12701285
$ref: '../schemas/_common.yaml#/components/schemas/Duration'
12711286
x-version-added: '2.0'
@@ -1279,7 +1294,7 @@ components:
12791294
cluster.reroute::query.explain:
12801295
in: query
12811296
name: explain
1282-
description: When `true`, the response contains an explanation of why certain commands can or cannot be executed.
1297+
description: When `true`, the response contains an explanation of why reroute certain commands can or cannot be executed.
12831298
schema:
12841299
type: boolean
12851300
style: form
@@ -1342,6 +1357,7 @@ components:
13421357
style: form
13431358
cluster.state::query.cluster_manager_timeout:
13441359
name: cluster_manager_timeout
1360+
description: The amount of time to wait for a response from the cluster manager node. For more information about supported time units, see [Common parameters]({https://opensearch.org/docs/latest/api-reference/common-parameters/#time-units).
13451361
in: query
13461362
schema:
13471363
$ref: '../schemas/_common.yaml#/components/schemas/Duration'

spec/schemas/_common.yaml

+19-8
Original file line numberDiff line numberDiff line change
@@ -1054,14 +1054,25 @@ components:
10541054
- shards
10551055
WaitForEvents:
10561056
description: Waits until all currently queued events with the given priority are processed.
1057-
type: string
1058-
enum:
1059-
- high
1060-
- immediate
1061-
- languid
1062-
- low
1063-
- normal
1064-
- urgent
1057+
oneOf:
1058+
- type: string
1059+
const: immediate
1060+
description: Highest priority, processed as soon as possible.
1061+
- type: string
1062+
const: urgent
1063+
description: Very high priority, processed after immediate events.
1064+
- type: string
1065+
const: high
1066+
description: High priority, processed after urgent events.
1067+
- type: string
1068+
const: normal
1069+
description: Default priority, processed after high priority events.
1070+
- type: string
1071+
const: low
1072+
description: Low priority, processed after normal events.
1073+
- type: string
1074+
const: languid
1075+
description: Lowest priority, processed after all other events.
10651076
DataStreamName:
10661077
type: string
10671078
CompletionStats:

spec/schemas/cluster.reroute.yaml

+28-11
Original file line numberDiff line numberDiff line change
@@ -121,17 +121,34 @@ components:
121121
- node
122122
- shard
123123
Metric:
124-
type: string
125-
enum:
126-
- _all
127-
- blocks
128-
- cluster_manager_node
129-
- master_node
130-
- metadata
131-
- nodes
132-
- routing_nodes
133-
- routing_table
134-
- version
124+
oneOf:
125+
- type: string
126+
const: _all
127+
description: Returns all available metrics.
128+
- type: string
129+
const: blocks
130+
description: Returns information about cluster-level blocks.
131+
- type: string
132+
const: cluster_manager_node
133+
description: Returns information about the current cluster manager node.
134+
- type: string
135+
const: master_node
136+
description: The alias for `cluster_manager_node`. Deprecated, but maintained for backwards compatibility.
137+
- type: string
138+
const: metadata
139+
description: Returns the cluster state metadata.
140+
- type: string
141+
const: nodes
142+
description: Returns information about nodes in the cluster.
143+
- type: string
144+
const: routing_nodes
145+
description: Returns the node-level shard allocations.
146+
- type: string
147+
const: routing_table
148+
description: Returns index-level shard allocations.
149+
- type: string
150+
const: version
151+
description: Returns the cluster state version.
135152
RerouteExplanation:
136153
type: object
137154
properties:

0 commit comments

Comments
 (0)