Skip to content

Commit

Permalink
Merge branch 'main' into add-ml-models-api
Browse files Browse the repository at this point in the history
Signed-off-by: Nathalie Jonathan <[email protected]>
  • Loading branch information
nathaliellenaa authored Dec 27, 2024
2 parents 5b083a0 + 1dac3c9 commit 6f5e928
Show file tree
Hide file tree
Showing 20 changed files with 629 additions and 415 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Fixed request body for `/_search/scroll/{scroll_id}` ([#732](https://github.com/opensearch-project/opensearch-api-specification/pull/732))
- Fixed type in `_msearch/template` ([#735](https://github.com/opensearch-project/opensearch-api-specification/pull/735))
- Fixed indices API schemas ([#750](https://github.com/opensearch-project/opensearch-api-specification/pull/750))
- Fixed cluster API schemas ([#754](https://github.com/opensearch-project/opensearch-api-specification/pull/754))

### Changed
- Changed `tasks._common:TaskInfo` and `tasks._common:TaskGroup` to be composed of a `tasks._common:TaskInfoBase` ([#683](https://github.com/opensearch-project/opensearch-api-specification/pull/683))
Expand Down
76 changes: 55 additions & 21 deletions spec/namespaces/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@ paths:
url: https://opensearch.org/docs/latest
parameters:
- $ref: '#/components/parameters/cluster.get_component_template::query.cluster_manager_timeout'
- $ref: '#/components/parameters/cluster.get_component_template::query.flat_settings'
- $ref: '#/components/parameters/cluster.get_component_template::query.local'
- $ref: '#/components/parameters/cluster.get_component_template::query.master_timeout'
responses:
Expand All @@ -417,6 +418,7 @@ paths:
parameters:
- $ref: '#/components/parameters/cluster.get_component_template::path.name'
- $ref: '#/components/parameters/cluster.get_component_template::query.cluster_manager_timeout'
- $ref: '#/components/parameters/cluster.get_component_template::query.flat_settings'
- $ref: '#/components/parameters/cluster.get_component_template::query.local'
- $ref: '#/components/parameters/cluster.get_component_template::query.master_timeout'
responses:
Expand Down Expand Up @@ -528,7 +530,8 @@ components:
type: boolean
shard:
description: Specifies the ID of the shard that you would like an explanation for.
type: number
type: integer
format: int32
description: The index, shard, and primary flag to explain. Empty means 'explain the first unassigned shard'
cluster.put_component_template:
content:
Expand Down Expand Up @@ -637,7 +640,8 @@ components:
remaining_delay_in_millis:
$ref: '../schemas/_common.yaml#/components/schemas/DurationValueUnitMillis'
shard:
type: number
type: integer
format: int32
unassigned_info:
$ref: '../schemas/cluster.allocation_explain.yaml#/components/schemas/UnassignedInformation'
note:
Expand Down Expand Up @@ -772,32 +776,54 @@ components:
content:
application/json:
schema:
type: object
properties:
acknowledged:
type: boolean
explanations:
type: array
items:
$ref: '../schemas/cluster.reroute.yaml#/components/schemas/RerouteExplanation'
state:
description: |-
There aren't any guarantees on the output/structure of the raw cluster state.
Here you will find the internal representation of the cluster, which can
differ from the external representation.
type: object
required:
- acknowledged
allOf:
- $ref: '../schemas/_common.yaml#/components/schemas/AcknowledgedResponseBase'
- type: object
properties:
explanations:
type: array
items:
$ref: '../schemas/cluster.reroute.yaml#/components/schemas/RerouteExplanation'
state:
description: |-
There aren't any guarantees on the output/structure of the raw cluster state.
Here you will find the internal representation of the cluster, which can
differ from the external representation.
cluster.state@200:
content:
application/json:
schema:
type: object
schema: {}
cluster.stats@200:
content:
application/json:
schema:
$ref: '../schemas/cluster.stats.yaml#/components/schemas/StatsResponseBase'
allOf:
- $ref: '../schemas/nodes._common.yaml#/components/schemas/NodesResponseBase'
- type: object
properties:
cluster_name:
description: Name of the cluster, based on the Cluster name setting setting.
$ref: '../schemas/_common.yaml#/components/schemas/Name'
cluster_uuid:
description: Unique identifier for the cluster.
$ref: '../schemas/_common.yaml#/components/schemas/Uuid'
indices:
description: Contains statistics about indexes with shards assigned to selected nodes.
$ref: '../schemas/cluster.stats.yaml#/components/schemas/ClusterIndices'
nodes:
description: Contains statistics about nodes selected by the request's node filters.
$ref: '../schemas/cluster.stats.yaml#/components/schemas/ClusterNodes'
status:
description: Health status of the cluster, based on the state of its primary and replica shards.
$ref: '../schemas/_common.yaml#/components/schemas/HealthStatus'
timestamp:
description: Unix timestamp, in milliseconds, for the last time the cluster statistics were refreshed.
$ref: '../schemas/_common.yaml#/components/schemas/EpochTimeUnitMillis'
required:
- cluster_name
- cluster_uuid
- status
- timestamp
parameters:
cluster.allocation_explain::query.include_disk_info:
in: query
Expand Down Expand Up @@ -924,6 +950,14 @@ components:
schema:
$ref: '../schemas/_common.yaml#/components/schemas/Duration'
x-version-added: '2.0'
cluster.get_component_template::query.flat_settings:
in: query
name: flat_settings
description: If `true`, returns settings in flat format.
schema:
type: boolean
default: false
style: form
cluster.get_component_template::query.local:
in: query
name: local
Expand Down
Loading

0 comments on commit 6f5e928

Please sign in to comment.