Fix /cluster/stats in a backwards compatible way (#851)

* Ran nox -s generate.

Signed-off-by: dblock <[email protected]>

* Fix: backwards compatible parameter order in cluster stats.

Signed-off-by: dblock <[email protected]>

* Moved Updated APIs section to the correct set.

Signed-off-by: dblock <[email protected]>

---------

Signed-off-by: dblock <[email protected]>
This commit is contained in:
Daniel (dB.) Doubrovkine
2024-11-25 14:54:03 -08:00
committed by GitHub
parent 12c379d32d
commit bf9add4eed
59 changed files with 9023 additions and 4389 deletions
@@ -98,6 +98,16 @@ class TestOverriddenUrlTargets(OpenSearchTestCase):
self.client.cluster.stats(node_id="test-node")
self.assert_url_called("GET", "/_cluster/stats/nodes/test-node")
self.client.cluster.stats(node_id="test-node", metric="indices")
self.assert_url_called("GET", "/_cluster/stats/indices/nodes/test-node")
self.client.cluster.stats(
node_id="test-node", metric="indices", index_metric="analysis"
)
self.assert_url_called(
"GET", "/_cluster/stats/indices/analysis/nodes/test-node"
)
def test_indices_put_mapping(self) -> None:
self.client.indices.put_mapping(body={})
self.assert_url_called("PUT", "/_all/_mapping")