Skip to content

Commit 7706d48

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): OpenAPI spec update via Stainless API (#1155)
1 parent 9ec6e88 commit 7706d48

File tree

2 files changed

+39
-39
lines changed

2 files changed

+39
-39
lines changed

.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 1254
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-10e0f5bf9e74bc8593c8024dd72b3c91d0402b96678320361ec2166da30136ff.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-623885448544cf05b4f37663c71fa42a56151359a9b770b24d86195f10da96d8.yml

tests/api_resources/test_ai_gateway.py

+38-38
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class TestAIGateway:
2727
@parametrize
2828
def test_method_create(self, client: Cloudflare) -> None:
2929
ai_gateway = client.ai_gateway.create(
30-
account_id="0d37909e38d3e99c29fa2cd343ac421a",
30+
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
3131
id="my-gateway",
3232
cache_invalidate_on_update=True,
3333
cache_ttl=0,
@@ -41,7 +41,7 @@ def test_method_create(self, client: Cloudflare) -> None:
4141
@parametrize
4242
def test_raw_response_create(self, client: Cloudflare) -> None:
4343
response = client.ai_gateway.with_raw_response.create(
44-
account_id="0d37909e38d3e99c29fa2cd343ac421a",
44+
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
4545
id="my-gateway",
4646
cache_invalidate_on_update=True,
4747
cache_ttl=0,
@@ -59,7 +59,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
5959
@parametrize
6060
def test_streaming_response_create(self, client: Cloudflare) -> None:
6161
with client.ai_gateway.with_streaming_response.create(
62-
account_id="0d37909e38d3e99c29fa2cd343ac421a",
62+
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
6363
id="my-gateway",
6464
cache_invalidate_on_update=True,
6565
cache_ttl=0,
@@ -94,7 +94,7 @@ def test_path_params_create(self, client: Cloudflare) -> None:
9494
def test_method_update(self, client: Cloudflare) -> None:
9595
ai_gateway = client.ai_gateway.update(
9696
"my-gateway",
97-
account_id="0d37909e38d3e99c29fa2cd343ac421a",
97+
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
9898
cache_invalidate_on_update=True,
9999
cache_ttl=0,
100100
collect_logs=True,
@@ -108,7 +108,7 @@ def test_method_update(self, client: Cloudflare) -> None:
108108
def test_raw_response_update(self, client: Cloudflare) -> None:
109109
response = client.ai_gateway.with_raw_response.update(
110110
"my-gateway",
111-
account_id="0d37909e38d3e99c29fa2cd343ac421a",
111+
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
112112
cache_invalidate_on_update=True,
113113
cache_ttl=0,
114114
collect_logs=True,
@@ -126,7 +126,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
126126
def test_streaming_response_update(self, client: Cloudflare) -> None:
127127
with client.ai_gateway.with_streaming_response.update(
128128
"my-gateway",
129-
account_id="0d37909e38d3e99c29fa2cd343ac421a",
129+
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
130130
cache_invalidate_on_update=True,
131131
cache_ttl=0,
132132
collect_logs=True,
@@ -159,7 +159,7 @@ def test_path_params_update(self, client: Cloudflare) -> None:
159159
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
160160
client.ai_gateway.with_raw_response.update(
161161
"",
162-
account_id="0d37909e38d3e99c29fa2cd343ac421a",
162+
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
163163
cache_invalidate_on_update=True,
164164
cache_ttl=0,
165165
collect_logs=True,
@@ -171,14 +171,14 @@ def test_path_params_update(self, client: Cloudflare) -> None:
171171
@parametrize
172172
def test_method_list(self, client: Cloudflare) -> None:
173173
ai_gateway = client.ai_gateway.list(
174-
account_id="0d37909e38d3e99c29fa2cd343ac421a",
174+
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
175175
)
176176
assert_matches_type(SyncV4PagePaginationArray[AIGatewayListResponse], ai_gateway, path=["response"])
177177

178178
@parametrize
179179
def test_method_list_with_all_params(self, client: Cloudflare) -> None:
180180
ai_gateway = client.ai_gateway.list(
181-
account_id="0d37909e38d3e99c29fa2cd343ac421a",
181+
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
182182
id="my-gateway",
183183
order_by="string",
184184
page=1,
@@ -189,7 +189,7 @@ def test_method_list_with_all_params(self, client: Cloudflare) -> None:
189189
@parametrize
190190
def test_raw_response_list(self, client: Cloudflare) -> None:
191191
response = client.ai_gateway.with_raw_response.list(
192-
account_id="0d37909e38d3e99c29fa2cd343ac421a",
192+
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
193193
)
194194

195195
assert response.is_closed is True
@@ -200,7 +200,7 @@ def test_raw_response_list(self, client: Cloudflare) -> None:
200200
@parametrize
201201
def test_streaming_response_list(self, client: Cloudflare) -> None:
202202
with client.ai_gateway.with_streaming_response.list(
203-
account_id="0d37909e38d3e99c29fa2cd343ac421a",
203+
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
204204
) as response:
205205
assert not response.is_closed
206206
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -221,15 +221,15 @@ def test_path_params_list(self, client: Cloudflare) -> None:
221221
def test_method_delete(self, client: Cloudflare) -> None:
222222
ai_gateway = client.ai_gateway.delete(
223223
"string",
224-
account_id="0d37909e38d3e99c29fa2cd343ac421a",
224+
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
225225
)
226226
assert_matches_type(AIGatewayDeleteResponse, ai_gateway, path=["response"])
227227

228228
@parametrize
229229
def test_raw_response_delete(self, client: Cloudflare) -> None:
230230
response = client.ai_gateway.with_raw_response.delete(
231231
"string",
232-
account_id="0d37909e38d3e99c29fa2cd343ac421a",
232+
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
233233
)
234234

235235
assert response.is_closed is True
@@ -241,7 +241,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None:
241241
def test_streaming_response_delete(self, client: Cloudflare) -> None:
242242
with client.ai_gateway.with_streaming_response.delete(
243243
"string",
244-
account_id="0d37909e38d3e99c29fa2cd343ac421a",
244+
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
245245
) as response:
246246
assert not response.is_closed
247247
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -262,22 +262,22 @@ def test_path_params_delete(self, client: Cloudflare) -> None:
262262
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
263263
client.ai_gateway.with_raw_response.delete(
264264
"",
265-
account_id="0d37909e38d3e99c29fa2cd343ac421a",
265+
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
266266
)
267267

268268
@parametrize
269269
def test_method_get(self, client: Cloudflare) -> None:
270270
ai_gateway = client.ai_gateway.get(
271271
"my-gateway",
272-
account_id="0d37909e38d3e99c29fa2cd343ac421a",
272+
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
273273
)
274274
assert_matches_type(AIGatewayGetResponse, ai_gateway, path=["response"])
275275

276276
@parametrize
277277
def test_raw_response_get(self, client: Cloudflare) -> None:
278278
response = client.ai_gateway.with_raw_response.get(
279279
"my-gateway",
280-
account_id="0d37909e38d3e99c29fa2cd343ac421a",
280+
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
281281
)
282282

283283
assert response.is_closed is True
@@ -289,7 +289,7 @@ def test_raw_response_get(self, client: Cloudflare) -> None:
289289
def test_streaming_response_get(self, client: Cloudflare) -> None:
290290
with client.ai_gateway.with_streaming_response.get(
291291
"my-gateway",
292-
account_id="0d37909e38d3e99c29fa2cd343ac421a",
292+
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
293293
) as response:
294294
assert not response.is_closed
295295
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -310,7 +310,7 @@ def test_path_params_get(self, client: Cloudflare) -> None:
310310
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
311311
client.ai_gateway.with_raw_response.get(
312312
"",
313-
account_id="0d37909e38d3e99c29fa2cd343ac421a",
313+
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
314314
)
315315

316316

@@ -320,7 +320,7 @@ class TestAsyncAIGateway:
320320
@parametrize
321321
async def test_method_create(self, async_client: AsyncCloudflare) -> None:
322322
ai_gateway = await async_client.ai_gateway.create(
323-
account_id="0d37909e38d3e99c29fa2cd343ac421a",
323+
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
324324
id="my-gateway",
325325
cache_invalidate_on_update=True,
326326
cache_ttl=0,
@@ -334,7 +334,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
334334
@parametrize
335335
async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
336336
response = await async_client.ai_gateway.with_raw_response.create(
337-
account_id="0d37909e38d3e99c29fa2cd343ac421a",
337+
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
338338
id="my-gateway",
339339
cache_invalidate_on_update=True,
340340
cache_ttl=0,
@@ -352,7 +352,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
352352
@parametrize
353353
async def test_streaming_response_create(self, async_client: AsyncCloudflare) -> None:
354354
async with async_client.ai_gateway.with_streaming_response.create(
355-
account_id="0d37909e38d3e99c29fa2cd343ac421a",
355+
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
356356
id="my-gateway",
357357
cache_invalidate_on_update=True,
358358
cache_ttl=0,
@@ -387,7 +387,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
387387
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
388388
ai_gateway = await async_client.ai_gateway.update(
389389
"my-gateway",
390-
account_id="0d37909e38d3e99c29fa2cd343ac421a",
390+
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
391391
cache_invalidate_on_update=True,
392392
cache_ttl=0,
393393
collect_logs=True,
@@ -401,7 +401,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
401401
async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
402402
response = await async_client.ai_gateway.with_raw_response.update(
403403
"my-gateway",
404-
account_id="0d37909e38d3e99c29fa2cd343ac421a",
404+
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
405405
cache_invalidate_on_update=True,
406406
cache_ttl=0,
407407
collect_logs=True,
@@ -419,7 +419,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
419419
async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None:
420420
async with async_client.ai_gateway.with_streaming_response.update(
421421
"my-gateway",
422-
account_id="0d37909e38d3e99c29fa2cd343ac421a",
422+
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
423423
cache_invalidate_on_update=True,
424424
cache_ttl=0,
425425
collect_logs=True,
@@ -452,7 +452,7 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
452452
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
453453
await async_client.ai_gateway.with_raw_response.update(
454454
"",
455-
account_id="0d37909e38d3e99c29fa2cd343ac421a",
455+
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
456456
cache_invalidate_on_update=True,
457457
cache_ttl=0,
458458
collect_logs=True,
@@ -464,14 +464,14 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
464464
@parametrize
465465
async def test_method_list(self, async_client: AsyncCloudflare) -> None:
466466
ai_gateway = await async_client.ai_gateway.list(
467-
account_id="0d37909e38d3e99c29fa2cd343ac421a",
467+
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
468468
)
469469
assert_matches_type(AsyncV4PagePaginationArray[AIGatewayListResponse], ai_gateway, path=["response"])
470470

471471
@parametrize
472472
async def test_method_list_with_all_params(self, async_client: AsyncCloudflare) -> None:
473473
ai_gateway = await async_client.ai_gateway.list(
474-
account_id="0d37909e38d3e99c29fa2cd343ac421a",
474+
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
475475
id="my-gateway",
476476
order_by="string",
477477
page=1,
@@ -482,7 +482,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncCloudflare)
482482
@parametrize
483483
async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
484484
response = await async_client.ai_gateway.with_raw_response.list(
485-
account_id="0d37909e38d3e99c29fa2cd343ac421a",
485+
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
486486
)
487487

488488
assert response.is_closed is True
@@ -493,7 +493,7 @@ async def test_raw_response_list(self, async_client: AsyncCloudflare) -> None:
493493
@parametrize
494494
async def test_streaming_response_list(self, async_client: AsyncCloudflare) -> None:
495495
async with async_client.ai_gateway.with_streaming_response.list(
496-
account_id="0d37909e38d3e99c29fa2cd343ac421a",
496+
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
497497
) as response:
498498
assert not response.is_closed
499499
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -514,15 +514,15 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None:
514514
async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
515515
ai_gateway = await async_client.ai_gateway.delete(
516516
"string",
517-
account_id="0d37909e38d3e99c29fa2cd343ac421a",
517+
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
518518
)
519519
assert_matches_type(AIGatewayDeleteResponse, ai_gateway, path=["response"])
520520

521521
@parametrize
522522
async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
523523
response = await async_client.ai_gateway.with_raw_response.delete(
524524
"string",
525-
account_id="0d37909e38d3e99c29fa2cd343ac421a",
525+
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
526526
)
527527

528528
assert response.is_closed is True
@@ -534,7 +534,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
534534
async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None:
535535
async with async_client.ai_gateway.with_streaming_response.delete(
536536
"string",
537-
account_id="0d37909e38d3e99c29fa2cd343ac421a",
537+
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
538538
) as response:
539539
assert not response.is_closed
540540
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -555,22 +555,22 @@ async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None:
555555
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
556556
await async_client.ai_gateway.with_raw_response.delete(
557557
"",
558-
account_id="0d37909e38d3e99c29fa2cd343ac421a",
558+
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
559559
)
560560

561561
@parametrize
562562
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
563563
ai_gateway = await async_client.ai_gateway.get(
564564
"my-gateway",
565-
account_id="0d37909e38d3e99c29fa2cd343ac421a",
565+
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
566566
)
567567
assert_matches_type(AIGatewayGetResponse, ai_gateway, path=["response"])
568568

569569
@parametrize
570570
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
571571
response = await async_client.ai_gateway.with_raw_response.get(
572572
"my-gateway",
573-
account_id="0d37909e38d3e99c29fa2cd343ac421a",
573+
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
574574
)
575575

576576
assert response.is_closed is True
@@ -582,7 +582,7 @@ async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
582582
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
583583
async with async_client.ai_gateway.with_streaming_response.get(
584584
"my-gateway",
585-
account_id="0d37909e38d3e99c29fa2cd343ac421a",
585+
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
586586
) as response:
587587
assert not response.is_closed
588588
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -603,5 +603,5 @@ async def test_path_params_get(self, async_client: AsyncCloudflare) -> None:
603603
with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
604604
await async_client.ai_gateway.with_raw_response.get(
605605
"",
606-
account_id="0d37909e38d3e99c29fa2cd343ac421a",
606+
account_id="3ebbcb006d4d46d7bb6a8c7f14676cb0",
607607
)

0 commit comments

Comments
 (0)