-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated APIs to match other language clients and opensearch openapi spec #502
Updated APIs to match other language clients and opensearch openapi spec #502
Conversation
Codecov Report
@@ Coverage Diff @@
## main #502 +/- ##
==========================================
- Coverage 70.92% 70.86% -0.06%
==========================================
Files 81 83 +2
Lines 7732 7796 +64
==========================================
+ Hits 5484 5525 +41
- Misses 2248 2271 +23
|
a99619c
to
3fc5b16
Compare
|
||
|
||
@query_params() | ||
async def list_all_point_in_time(self, params=None, headers=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the purpose of moving these APIs to patch file? Is the patch file going to be a place for all manual APIs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
@@ -1955,64 +1961,66 @@ async def get_script_languages(self, params=None, headers=None): | |||
"GET", "/_script_language", params=params, headers=headers | |||
) | |||
|
|||
@query_params() | |||
async def list_all_point_in_time(self, params=None, headers=None): | |||
async def create_pit(self, index, params=None, headers=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these APIs generated or manually written?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generated
3fc5b16
to
20fb3f2
Compare
Signed-off-by: saimedhi <[email protected]>
20fb3f2
to
77cd26a
Compare
Hi @florianvazelle, I would greatly appreciate it if you could kindly review this PR and share your feedback whenever it's convenient for you. Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! Can we also start adding the generation details in a markdown file? For example, what the patch file is supposed to be? How the generator works etc? I see there is already https://github.com/opensearch-project/opensearch-py/blob/main/DEVELOPER_GUIDE.md#running-python-client-generator
@VachaShah, I'll include these details in my upcoming PR. I'll create a markdown file explaining the generator's functionality and the client structure, including what's placed in patch files. You can find most of the information here, and I'll ensure it's added to the repository soon. |
@VachaShah, Shall we merge this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
For generated files we need some kind of "this is generated" header.
…search-project#502) Signed-off-by: saimedhi <[email protected]> Signed-off-by: roma2023 <[email protected]>
Description
Updated APIs to match other language clients and opensearch openapi spec. APIs added to "_patch" are manually written. Other APIs added are Generated using openapispec.
Deprecated APIs: They are moved into client/_patch.py
list_all_point_in_time, create_point_in_time, health_check, update_audit_config, delete_point_in_time
Newly Added APIs: They are moved into corresponding namespaces
get_all_pits, create_pit, health, update_audit_configuration, delete_all_pits, delete_pit
Issues Resolved
Closes #499, #500, #501
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.