Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/datadog_api_client/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ def __init__(
settings: Dict[str, Any],
params_map: Dict[str, Dict[str, Any]],
headers_map: Dict[str, List[str]],
api_client: ApiClient,
api_client: "ApiClient",
):
"""Creates an endpoint.

Expand Down Expand Up @@ -802,7 +802,6 @@ def call_with_http_info(self, **kwargs):

def call_with_http_info_paginated(self, pagination):
host = self._validate_and_get_host(pagination["kwargs"])

return self.api_client.call_api_paginated(
self.settings["endpoint_path"],
self.settings["http_method"],
Expand Down
3 changes: 2 additions & 1 deletion src/datadog_api_client/model_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1717,5 +1717,6 @@ def set_attribute_from_path(obj, path, value, params_map):
try:
obj = obj[elt]
except (KeyError, AttributeError):
obj = root()
obj[elt] = root()
obj = obj[elt]
obj[last] = value
7 changes: 6 additions & 1 deletion src/datadog_api_client/v2/api/incidents_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1800,7 +1800,12 @@ def search_incidents_with_pagination(
if page_offset is not unset:
kwargs["page_offset"] = page_offset

local_page_size = get_attribute_from_path(kwargs, "page_size", 10)
# Inline the logic to only call str.split(".") once, optimize lookups
if "page_size" in kwargs:
local_page_size = kwargs["page_size"]
else:
local_page_size = 10

endpoint = self._search_incidents_endpoint
set_attribute_from_path(kwargs, "page_size", local_page_size, endpoint.params_map)
pagination = {
Expand Down