Skip to content

Commit cef0cea

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): OpenAPI spec update via Stainless API (#910)
1 parent f9ea911 commit cef0cea

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 1343
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-6545c93a16062d2763cd304367d8babf5aaef09046036361dbb077b75536e858.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f1ab7e5d073ef27b0e08bd9fd83e406c15c1c69017c29b17dadceec459febd7b.yml

src/cloudflare/resources/zero_trust/dlp/datasets/upload.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def edit(
8585
*,
8686
account_id: str,
8787
dataset_id: str,
88-
body: object,
88+
body: str,
8989
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
9090
# The extra values given here take precedence over values defined on the client or passed to this method.
9191
extra_headers: Headers | None = None,
@@ -178,7 +178,7 @@ async def edit(
178178
*,
179179
account_id: str,
180180
dataset_id: str,
181-
body: object,
181+
body: str,
182182
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
183183
# The extra values given here take precedence over values defined on the client or passed to this method.
184184
extra_headers: Headers | None = None,

src/cloudflare/types/zero_trust/dlp/datasets/upload_edit_params.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ class UploadEditParams(TypedDict, total=False):
1212

1313
dataset_id: Required[str]
1414

15-
body: Required[object]
15+
body: Required[str]

tests/api_resources/zero_trust/dlp/datasets/test_upload.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def test_method_edit(self, client: Cloudflare) -> None:
7373
0,
7474
account_id="string",
7575
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
76-
body={},
76+
body="string",
7777
)
7878
assert_matches_type(Optional[Dataset], upload, path=["response"])
7979

@@ -84,7 +84,7 @@ def test_raw_response_edit(self, client: Cloudflare) -> None:
8484
0,
8585
account_id="string",
8686
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
87-
body={},
87+
body="string",
8888
)
8989

9090
assert response.is_closed is True
@@ -99,7 +99,7 @@ def test_streaming_response_edit(self, client: Cloudflare) -> None:
9999
0,
100100
account_id="string",
101101
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
102-
body={},
102+
body="string",
103103
) as response:
104104
assert not response.is_closed
105105
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -117,15 +117,15 @@ def test_path_params_edit(self, client: Cloudflare) -> None:
117117
0,
118118
account_id="",
119119
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
120-
body={},
120+
body="string",
121121
)
122122

123123
with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"):
124124
client.zero_trust.dlp.datasets.upload.with_raw_response.edit(
125125
0,
126126
account_id="string",
127127
dataset_id="",
128-
body={},
128+
body="string",
129129
)
130130

131131

@@ -187,7 +187,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
187187
0,
188188
account_id="string",
189189
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
190-
body={},
190+
body="string",
191191
)
192192
assert_matches_type(Optional[Dataset], upload, path=["response"])
193193

@@ -198,7 +198,7 @@ async def test_raw_response_edit(self, async_client: AsyncCloudflare) -> None:
198198
0,
199199
account_id="string",
200200
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
201-
body={},
201+
body="string",
202202
)
203203

204204
assert response.is_closed is True
@@ -213,7 +213,7 @@ async def test_streaming_response_edit(self, async_client: AsyncCloudflare) -> N
213213
0,
214214
account_id="string",
215215
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
216-
body={},
216+
body="string",
217217
) as response:
218218
assert not response.is_closed
219219
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -231,13 +231,13 @@ async def test_path_params_edit(self, async_client: AsyncCloudflare) -> None:
231231
0,
232232
account_id="",
233233
dataset_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
234-
body={},
234+
body="string",
235235
)
236236

237237
with pytest.raises(ValueError, match=r"Expected a non-empty value for `dataset_id` but received ''"):
238238
await async_client.zero_trust.dlp.datasets.upload.with_raw_response.edit(
239239
0,
240240
account_id="string",
241241
dataset_id="",
242-
body={},
242+
body="string",
243243
)

0 commit comments

Comments
 (0)