Skip to content

Commit

Permalink
Add tests for nodes
Browse files Browse the repository at this point in the history
Signed-off-by: Bzil <[email protected]>
  • Loading branch information
Bzil committed Jul 4, 2024
1 parent 1de9c4f commit 03249ce
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 7 deletions.
15 changes: 15 additions & 0 deletions spec/namespaces/nodes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,21 @@ paths:
responses:
'200':
$ref: '#/components/responses/nodes.info@200'
/_nodes/{metric}/stats:
get:
operationId: nodes.info.1
x-operation-group: nodes.info
x-version-added: '1.0'
description: Returns information about nodes in the cluster.
externalDocs:
url: https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-info/
parameters:
- $ref: '#/components/parameters/nodes.info::path.metric'
- $ref: '#/components/parameters/nodes.info::query.flat_settings'
- $ref: '#/components/parameters/nodes.info::query.timeout'
responses:
'200':
$ref: '#/components/responses/nodes.info@200'
/_nodes/{node_id}:
get:
operationId: nodes.info.2
Expand Down
10 changes: 6 additions & 4 deletions spec/schemas/nodes.info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,23 @@ components:
- indices
- search_pipelines
- _all
- _cluster_manager
ResponseBase:
allOf:
- type: object
properties:
cluster_name:
$ref: '_common.yaml#/components/schemas/Name'
nodes:
type: object
additionalProperties:
$ref: '#/components/schemas/NodeInfo'
oneOf:
- type: object
$ref: '#/components/schemas/NodeInfo'
- type: object
additionalProperties: {}
_nodes:
$ref: 'nodes._common.yaml#/components/schemas/NodesResponseBase'
required:
- cluster_name
- nodes
- _nodes
NodeInfo:
type: object
Expand Down
6 changes: 3 additions & 3 deletions tests/_core/nodes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ chapters:
- _all
response:
status: 200
- synopsis: Nodes data:true metric with a json response.
path: /_nodes/{metric}
- synopsis: Nodes _cluster_manager metric with a json response.
path: /_nodes/{metric}/stats
method: GET
parameters:
metric:
- master:true
- _cluster_manager
response:
status: 200

0 comments on commit 03249ce

Please sign in to comment.