From 23b4dfb0d4334f80f0a1202eb214bdaea4eec1ac Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 17 Jun 2024 15:54:26 +0000 Subject: [PATCH] feat(api): OpenAPI spec update via Stainless API --- .stats.yml | 2 +- src/cloudflare/_base_client.py | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5635a06fcdd..b882f703b73 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1348 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-460637cf938836bf2619c57e293f6ae014a6b1bcbe0cd2288cc66450928cf3c5.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-60eaec2f4029582531bbb45c66bb499e91203845eeeb3d507ae7ed5675a6bbe6.yml diff --git a/src/cloudflare/_base_client.py b/src/cloudflare/_base_client.py index edd993ce049..ca66d5b4018 100644 --- a/src/cloudflare/_base_client.py +++ b/src/cloudflare/_base_client.py @@ -456,7 +456,7 @@ def _build_request( raise RuntimeError(f"Unexpected JSON data type, {type(json_data)}, cannot merge with `extra_body`") headers = self._build_headers(options) - params = _merge_mappings(self._custom_query, options.params) + params = _merge_mappings(self.default_query, options.params) content_type = headers.get("Content-Type") # If the given Content-Type header is multipart/form-data then it @@ -592,6 +592,12 @@ def default_headers(self) -> dict[str, str | Omit]: **self._custom_headers, } + @property + def default_query(self) -> dict[str, object]: + return { + **self._custom_query, + } + def _validate_headers( self, headers: Headers, # noqa: ARG002