Skip to content

Commit 9e30fdc

Browse files
committed
chore: exclude workers, registrar, custom_pages (pre-existing test failures)
These resources failed the pytest gate due to pre-existing codegen bugs: - workers: PydanticSchemaGenerationError for RunQueryParametersNeedleValue - registrar: Prism mock rejects test fixture domain with 422 - custom_pages: test_assets.py missing required zone_id argument Reverted to their origin/next versions per codegen-sync policy: resources that fail any validation gate are excluded from the sync.
1 parent 492dc26 commit 9e30fdc

79 files changed

Lines changed: 447 additions & 1959 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/cloudflare/resources/custom_pages/api.md

Lines changed: 0 additions & 38 deletions
This file was deleted.

src/cloudflare/resources/custom_pages/assets.py

Lines changed: 31 additions & 117 deletions
Large diffs are not rendered by default.

src/cloudflare/resources/custom_pages/custom_pages.py

Lines changed: 20 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
AssetsResourceWithStreamingResponse,
1616
AsyncAssetsResourceWithStreamingResponse,
1717
)
18-
from ..._types import Body, Query, Headers, NotGiven, not_given
19-
from ..._utils import path_template, maybe_transform, async_maybe_transform
18+
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
19+
from ..._utils import maybe_transform, async_maybe_transform
2020
from ..._compat import cached_property
2121
from ..._resource import SyncAPIResource, AsyncAPIResource
2222
from ..._response import (
@@ -77,8 +77,8 @@ def update(
7777
*,
7878
state: Literal["default", "customized"],
7979
url: str,
80-
account_id: str | None = None,
81-
zone_id: str | None = None,
80+
account_id: str | Omit = omit,
81+
zone_id: str | Omit = omit,
8282
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
8383
# The extra values given here take precedence over values defined on the client or passed to this method.
8484
extra_headers: Headers | None = None,
@@ -110,10 +110,6 @@ def update(
110110
"""
111111
if not identifier:
112112
raise ValueError(f"Expected a non-empty value for `identifier` but received {identifier!r}")
113-
if account_id is None:
114-
account_id = self._client._get_account_id_path_param()
115-
if zone_id is None:
116-
zone_id = self._client._get_zone_id_path_param()
117113
if account_id and zone_id:
118114
raise ValueError("You cannot provide both account_id and zone_id")
119115

@@ -127,12 +123,7 @@ def update(
127123
account_or_zone = "zones"
128124
account_or_zone_id = zone_id
129125
return self._put(
130-
path_template(
131-
"/{account_or_zone}/{account_or_zone_id}/custom_pages/{identifier}",
132-
identifier=identifier,
133-
account_or_zone=account_or_zone,
134-
account_or_zone_id=account_or_zone_id,
135-
),
126+
f"/{account_or_zone}/{account_or_zone_id}/custom_pages/{identifier}",
136127
body=maybe_transform(
137128
{
138129
"state": state,
@@ -153,8 +144,8 @@ def update(
153144
def list(
154145
self,
155146
*,
156-
account_id: str | None = None,
157-
zone_id: str | None = None,
147+
account_id: str | Omit = omit,
148+
zone_id: str | Omit = omit,
158149
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
159150
# The extra values given here take precedence over values defined on the client or passed to this method.
160151
extra_headers: Headers | None = None,
@@ -178,10 +169,6 @@ def list(
178169
179170
timeout: Override the client-level default timeout for this request, in seconds
180171
"""
181-
if account_id is None:
182-
account_id = self._client._get_account_id_path_param()
183-
if zone_id is None:
184-
zone_id = self._client._get_zone_id_path_param()
185172
if account_id and zone_id:
186173
raise ValueError("You cannot provide both account_id and zone_id")
187174

@@ -195,11 +182,7 @@ def list(
195182
account_or_zone = "zones"
196183
account_or_zone_id = zone_id
197184
return self._get_api_list(
198-
path_template(
199-
"/{account_or_zone}/{account_or_zone_id}/custom_pages",
200-
account_or_zone=account_or_zone,
201-
account_or_zone_id=account_or_zone_id,
202-
),
185+
f"/{account_or_zone}/{account_or_zone_id}/custom_pages",
203186
page=SyncSinglePage[CustomPageListResponse],
204187
options=make_request_options(
205188
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
@@ -222,8 +205,8 @@ def get(
222205
"waf_challenge",
223206
],
224207
*,
225-
account_id: str | None = None,
226-
zone_id: str | None = None,
208+
account_id: str | Omit = omit,
209+
zone_id: str | Omit = omit,
227210
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
228211
# The extra values given here take precedence over values defined on the client or passed to this method.
229212
extra_headers: Headers | None = None,
@@ -251,10 +234,6 @@ def get(
251234
"""
252235
if not identifier:
253236
raise ValueError(f"Expected a non-empty value for `identifier` but received {identifier!r}")
254-
if account_id is None:
255-
account_id = self._client._get_account_id_path_param()
256-
if zone_id is None:
257-
zone_id = self._client._get_zone_id_path_param()
258237
if account_id and zone_id:
259238
raise ValueError("You cannot provide both account_id and zone_id")
260239

@@ -268,12 +247,7 @@ def get(
268247
account_or_zone = "zones"
269248
account_or_zone_id = zone_id
270249
return self._get(
271-
path_template(
272-
"/{account_or_zone}/{account_or_zone_id}/custom_pages/{identifier}",
273-
identifier=identifier,
274-
account_or_zone=account_or_zone,
275-
account_or_zone_id=account_or_zone_id,
276-
),
250+
f"/{account_or_zone}/{account_or_zone_id}/custom_pages/{identifier}",
277251
options=make_request_options(
278252
extra_headers=extra_headers,
279253
extra_query=extra_query,
@@ -326,8 +300,8 @@ async def update(
326300
*,
327301
state: Literal["default", "customized"],
328302
url: str,
329-
account_id: str | None = None,
330-
zone_id: str | None = None,
303+
account_id: str | Omit = omit,
304+
zone_id: str | Omit = omit,
331305
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
332306
# The extra values given here take precedence over values defined on the client or passed to this method.
333307
extra_headers: Headers | None = None,
@@ -359,10 +333,6 @@ async def update(
359333
"""
360334
if not identifier:
361335
raise ValueError(f"Expected a non-empty value for `identifier` but received {identifier!r}")
362-
if account_id is None:
363-
account_id = self._client._get_account_id_path_param()
364-
if zone_id is None:
365-
zone_id = self._client._get_zone_id_path_param()
366336
if account_id and zone_id:
367337
raise ValueError("You cannot provide both account_id and zone_id")
368338

@@ -376,12 +346,7 @@ async def update(
376346
account_or_zone = "zones"
377347
account_or_zone_id = zone_id
378348
return await self._put(
379-
path_template(
380-
"/{account_or_zone}/{account_or_zone_id}/custom_pages/{identifier}",
381-
identifier=identifier,
382-
account_or_zone=account_or_zone,
383-
account_or_zone_id=account_or_zone_id,
384-
),
349+
f"/{account_or_zone}/{account_or_zone_id}/custom_pages/{identifier}",
385350
body=await async_maybe_transform(
386351
{
387352
"state": state,
@@ -402,8 +367,8 @@ async def update(
402367
def list(
403368
self,
404369
*,
405-
account_id: str | None = None,
406-
zone_id: str | None = None,
370+
account_id: str | Omit = omit,
371+
zone_id: str | Omit = omit,
407372
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
408373
# The extra values given here take precedence over values defined on the client or passed to this method.
409374
extra_headers: Headers | None = None,
@@ -427,10 +392,6 @@ def list(
427392
428393
timeout: Override the client-level default timeout for this request, in seconds
429394
"""
430-
if account_id is None:
431-
account_id = self._client._get_account_id_path_param()
432-
if zone_id is None:
433-
zone_id = self._client._get_zone_id_path_param()
434395
if account_id and zone_id:
435396
raise ValueError("You cannot provide both account_id and zone_id")
436397

@@ -444,11 +405,7 @@ def list(
444405
account_or_zone = "zones"
445406
account_or_zone_id = zone_id
446407
return self._get_api_list(
447-
path_template(
448-
"/{account_or_zone}/{account_or_zone_id}/custom_pages",
449-
account_or_zone=account_or_zone,
450-
account_or_zone_id=account_or_zone_id,
451-
),
408+
f"/{account_or_zone}/{account_or_zone_id}/custom_pages",
452409
page=AsyncSinglePage[CustomPageListResponse],
453410
options=make_request_options(
454411
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
@@ -471,8 +428,8 @@ async def get(
471428
"waf_challenge",
472429
],
473430
*,
474-
account_id: str | None = None,
475-
zone_id: str | None = None,
431+
account_id: str | Omit = omit,
432+
zone_id: str | Omit = omit,
476433
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
477434
# The extra values given here take precedence over values defined on the client or passed to this method.
478435
extra_headers: Headers | None = None,
@@ -500,10 +457,6 @@ async def get(
500457
"""
501458
if not identifier:
502459
raise ValueError(f"Expected a non-empty value for `identifier` but received {identifier!r}")
503-
if account_id is None:
504-
account_id = self._client._get_account_id_path_param()
505-
if zone_id is None:
506-
zone_id = self._client._get_zone_id_path_param()
507460
if account_id and zone_id:
508461
raise ValueError("You cannot provide both account_id and zone_id")
509462

@@ -517,12 +470,7 @@ async def get(
517470
account_or_zone = "zones"
518471
account_or_zone_id = zone_id
519472
return await self._get(
520-
path_template(
521-
"/{account_or_zone}/{account_or_zone_id}/custom_pages/{identifier}",
522-
identifier=identifier,
523-
account_or_zone=account_or_zone,
524-
account_or_zone_id=account_or_zone_id,
525-
),
473+
f"/{account_or_zone}/{account_or_zone_id}/custom_pages/{identifier}",
526474
options=make_request_options(
527475
extra_headers=extra_headers,
528476
extra_query=extra_query,

src/cloudflare/resources/registrar/api.md

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)