diff --git a/spec/namespaces/nodes.yaml b/spec/namespaces/nodes.yaml index 4db9ebfee..75a293596 100644 --- a/spec/namespaces/nodes.yaml +++ b/spec/namespaces/nodes.yaml @@ -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 diff --git a/spec/schemas/nodes.info.yaml b/spec/schemas/nodes.info.yaml index 790842f6f..65b456281 100644 --- a/spec/schemas/nodes.info.yaml +++ b/spec/schemas/nodes.info.yaml @@ -22,6 +22,7 @@ components: - indices - search_pipelines - _all + - _cluster_manager ResponseBase: allOf: - type: object @@ -29,14 +30,15 @@ components: 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 diff --git a/tests/_core/nodes.yaml b/tests/_core/nodes.yaml index c03735f19..6c2f6ef51 100644 --- a/tests/_core/nodes.yaml +++ b/tests/_core/nodes.yaml @@ -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 \ No newline at end of file