Skip to content

Commit

Permalink
feat(api): OpenAPI spec update via Stainless API (#1007)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Jun 17, 2024
1 parent 1b3c186 commit 1451caa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 7 additions & 1 deletion src/cloudflare/_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1451caa

Please sign in to comment.