opensearch-project / opensearch-py

Python Client for OpenSearch
https://opensearch.org/docs/latest/clients/python/
Apache License 2.0
359 stars 178 forks source link

Generate cluster client from API specs #530

Closed saimedhi closed 1 year ago

saimedhi commented 1 year ago

Description

Generate cluster client from API specs

Issues Resolved

related to #477

cluster.health - ensure_node_commissioned param should not be present

https://localhost:9200/_cluster/health?ensure_node_commissioned=true { "error": { "root_cause": [ { "type": "illegal_argument_exception", "reason": "request [/_cluster/health] contains unrecognized parameter: [ensure_node_commissioned] -> did you mean [ensure_node_weighed_in]?" } ], "type": "illegal_argument_exception", "reason": "request [/_cluster/health] contains unrecognized parameter: [ensure_node_commissioned] -> did you mean [ensure_node_weighed_in]?" }, "status": 400 } By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.

codecov[bot] commented 1 year ago

Codecov Report

Merging #530 (a1824f3) into main (e4c59e4) will decrease coverage by 0.12%. The diff coverage is 53.12%.

@@            Coverage Diff             @@
##             main     #530      +/-   ##
==========================================
- Coverage   70.80%   70.69%   -0.12%     
==========================================
  Files          83       83              
  Lines        7790     7844      +54     
==========================================
+ Hits         5516     5545      +29     
- Misses       2274     2299      +25     
Files Coverage Δ
opensearchpy/_async/client/cluster.py 51.76% <53.12%> (-3.41%) :arrow_down:
opensearchpy/client/cluster.py 56.47% <53.12%> (-5.60%) :arrow_down:

... and 1 file with indirect coverage changes

dblock commented 1 year ago

need to be corrected in spec

Are you doing this? Opening issues?

saimedhi commented 1 year ago

Opening issues?

yes, I am opening issues in opensearch-api-specification repo

saimedhi commented 1 year ago

Any reason not to generate all remaining APIs in one go?

I can generate all at once, but it'll be easier to spot small issues or mistakes in the generated client with smaller PRs.