Skip to content

Commit

Permalink
Updated Search Pipeline APIs and added tests
Browse files Browse the repository at this point in the history
Signed-off-by: saimedhi <saimedhi@amazon.com>
  • Loading branch information
saimedhi committed Apr 19, 2024
1 parent 9bb9d54 commit 75495e6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
5 changes: 1 addition & 4 deletions opensearchpy/_async/client/search_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class SearchPipelineClient(NamespacedClient):
)
async def get(
self,
id: Any,
id: Any = None,
params: Any = None,
headers: Any = None,
) -> Any:
Expand All @@ -55,9 +55,6 @@ async def get(
:arg source: The URL-encoded request definition. Useful for
libraries that do not accept a request body for non-POST requests.
"""
if id in SKIP_IN_PATH:
raise ValueError("Empty value passed for a required argument 'id'.")

return await self.transport.perform_request(
"GET", _make_path("_search", "pipeline", id), params=params, headers=headers
)
Expand Down
5 changes: 1 addition & 4 deletions opensearchpy/client/search_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class SearchPipelineClient(NamespacedClient):
)
def get(
self,
id: Any,
id: Any = None,
params: Any = None,
headers: Any = None,
) -> Any:
Expand All @@ -55,9 +55,6 @@ def get(
:arg source: The URL-encoded request definition. Useful for
libraries that do not accept a request body for non-POST requests.
"""
if id in SKIP_IN_PATH:
raise ValueError("Empty value passed for a required argument 'id'.")

return self.transport.perform_request(
"GET", _make_path("_search", "pipeline", id), params=params, headers=headers
)
Expand Down
2 changes: 1 addition & 1 deletion utils/generate_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ def read_modules() -> Any:

# Load the OpenAPI specification file
response = requests.get(
"https://github.com/opensearch-project/opensearch-api-specification/releases/download/main/opensearch-openapi.yaml"
"https://github.com/saimedhi/opensearch-api-specification/releases/download/add%2Fpath/opensearch-openapi.yaml"
)
data = yaml.safe_load(response.text)

Expand Down

0 comments on commit 75495e6

Please sign in to comment.