Skip to content

Commit 75495e6

Browse files
committed
Updated Search Pipeline APIs and added tests
Signed-off-by: saimedhi <saimedhi@amazon.com>
1 parent 9bb9d54 commit 75495e6

File tree

3 files changed

+3
-9
lines changed

3 files changed

+3
-9
lines changed

opensearchpy/_async/client/search_pipeline.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class SearchPipelineClient(NamespacedClient):
3232
)
3333
async def get(
3434
self,
35-
id: Any,
35+
id: Any = None,
3636
params: Any = None,
3737
headers: Any = None,
3838
) -> Any:
@@ -55,9 +55,6 @@ async def get(
5555
:arg source: The URL-encoded request definition. Useful for
5656
libraries that do not accept a request body for non-POST requests.
5757
"""
58-
if id in SKIP_IN_PATH:
59-
raise ValueError("Empty value passed for a required argument 'id'.")
60-
6158
return await self.transport.perform_request(
6259
"GET", _make_path("_search", "pipeline", id), params=params, headers=headers
6360
)

opensearchpy/client/search_pipeline.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class SearchPipelineClient(NamespacedClient):
3232
)
3333
def get(
3434
self,
35-
id: Any,
35+
id: Any = None,
3636
params: Any = None,
3737
headers: Any = None,
3838
) -> Any:
@@ -55,9 +55,6 @@ def get(
5555
:arg source: The URL-encoded request definition. Useful for
5656
libraries that do not accept a request body for non-POST requests.
5757
"""
58-
if id in SKIP_IN_PATH:
59-
raise ValueError("Empty value passed for a required argument 'id'.")
60-
6158
return self.transport.perform_request(
6259
"GET", _make_path("_search", "pipeline", id), params=params, headers=headers
6360
)

utils/generate_api.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ def read_modules() -> Any:
558558

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

0 commit comments

Comments
 (0)