Skip to content

Commit bd30260

Browse files
feat(firewall_rules): remove duplicated id query parameter (#2462)
1 parent 83dc1e3 commit bd30260

File tree

6 files changed

+2
-49
lines changed

6 files changed

+2
-49
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 1542
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-098958c3d34c1f726db27a49f075f6e8e2c9204777a0a5d6aa49ca54fc803022.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-9dd75607c8f8757910cfc7d638e1f86926406f5ea76219c4c3f9afa00eee83bb.yml

api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1668,7 +1668,7 @@ Methods:
16681668
- <code title="patch /zones/{zone_id}/firewall/rules">client.firewall.rules.<a href="./src/cloudflare/resources/firewall/rules.py">bulk_edit</a>(\*, zone_id, \*\*<a href="src/cloudflare/types/firewall/rule_bulk_edit_params.py">params</a>) -> <a href="./src/cloudflare/types/firewall/firewall_rule.py">SyncSinglePage[FirewallRule]</a></code>
16691669
- <code title="put /zones/{zone_id}/firewall/rules">client.firewall.rules.<a href="./src/cloudflare/resources/firewall/rules.py">bulk_update</a>(\*, zone_id, \*\*<a href="src/cloudflare/types/firewall/rule_bulk_update_params.py">params</a>) -> <a href="./src/cloudflare/types/firewall/firewall_rule.py">SyncSinglePage[FirewallRule]</a></code>
16701670
- <code title="patch /zones/{zone_id}/firewall/rules/{rule_id}">client.firewall.rules.<a href="./src/cloudflare/resources/firewall/rules.py">edit</a>(rule_id, \*, zone_id) -> <a href="./src/cloudflare/types/firewall/firewall_rule.py">SyncSinglePage[FirewallRule]</a></code>
1671-
- <code title="get /zones/{zone_id}/firewall/rules/{rule_id}">client.firewall.rules.<a href="./src/cloudflare/resources/firewall/rules.py">get</a>(rule_id, \*, zone_id, \*\*<a href="src/cloudflare/types/firewall/rule_get_params.py">params</a>) -> <a href="./src/cloudflare/types/firewall/firewall_rule.py">FirewallRule</a></code>
1671+
- <code title="get /zones/{zone_id}/firewall/rules/{rule_id}">client.firewall.rules.<a href="./src/cloudflare/resources/firewall/rules.py">get</a>(rule_id, \*, zone_id) -> <a href="./src/cloudflare/types/firewall/firewall_rule.py">FirewallRule</a></code>
16721672

16731673
## AccessRules
16741674

src/cloudflare/resources/firewall/rules.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
from ...pagination import SyncSinglePage, AsyncSinglePage, SyncV4PagePaginationArray, AsyncV4PagePaginationArray
2525
from ..._base_client import AsyncPaginator, make_request_options
2626
from ...types.firewall import (
27-
rule_get_params,
2827
rule_list_params,
2928
rule_create_params,
3029
rule_update_params,
@@ -465,7 +464,6 @@ def get(
465464
rule_id: str,
466465
*,
467466
zone_id: str,
468-
id: str | NotGiven = NOT_GIVEN,
469467
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
470468
# The extra values given here take precedence over values defined on the client or passed to this method.
471469
extra_headers: Headers | None = None,
@@ -481,8 +479,6 @@ def get(
481479
482480
rule_id: The unique identifier of the firewall rule.
483481
484-
id: The unique identifier of the firewall rule.
485-
486482
extra_headers: Send extra headers
487483
488484
extra_query: Add additional query parameters to the request
@@ -502,7 +498,6 @@ def get(
502498
extra_query=extra_query,
503499
extra_body=extra_body,
504500
timeout=timeout,
505-
query=maybe_transform({"id": id}, rule_get_params.RuleGetParams),
506501
post_parser=ResultWrapper[FirewallRule]._unwrapper,
507502
),
508503
cast_to=cast(Type[FirewallRule], ResultWrapper[FirewallRule]),
@@ -937,7 +932,6 @@ async def get(
937932
rule_id: str,
938933
*,
939934
zone_id: str,
940-
id: str | NotGiven = NOT_GIVEN,
941935
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
942936
# The extra values given here take precedence over values defined on the client or passed to this method.
943937
extra_headers: Headers | None = None,
@@ -953,8 +947,6 @@ async def get(
953947
954948
rule_id: The unique identifier of the firewall rule.
955949
956-
id: The unique identifier of the firewall rule.
957-
958950
extra_headers: Send extra headers
959951
960952
extra_query: Add additional query parameters to the request
@@ -974,7 +966,6 @@ async def get(
974966
extra_query=extra_query,
975967
extra_body=extra_body,
976968
timeout=timeout,
977-
query=await async_maybe_transform({"id": id}, rule_get_params.RuleGetParams),
978969
post_parser=ResultWrapper[FirewallRule]._unwrapper,
979970
),
980971
cast_to=cast(Type[FirewallRule], ResultWrapper[FirewallRule]),

src/cloudflare/types/firewall/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from .configuration import Configuration as Configuration
99
from .firewall_rule import FirewallRule as FirewallRule
1010
from .deleted_filter import DeletedFilter as DeletedFilter
11-
from .rule_get_params import RuleGetParams as RuleGetParams
1211
from .rule_list_params import RuleListParams as RuleListParams
1312
from .asn_configuration import ASNConfiguration as ASNConfiguration
1413
from .ipv6_configuration import IPV6Configuration as IPV6Configuration

src/cloudflare/types/firewall/rule_get_params.py

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

tests/api_resources/firewall/test_rules.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -520,17 +520,6 @@ def test_method_get(self, client: Cloudflare) -> None:
520520

521521
assert_matches_type(FirewallRule, rule, path=["response"])
522522

523-
@parametrize
524-
def test_method_get_with_all_params(self, client: Cloudflare) -> None:
525-
with pytest.warns(DeprecationWarning):
526-
rule = client.firewall.rules.get(
527-
rule_id="372e67954025e0ba6aaa6d586b9e0b60",
528-
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
529-
id="372e67954025e0ba6aaa6d586b9e0b60",
530-
)
531-
532-
assert_matches_type(FirewallRule, rule, path=["response"])
533-
534523
@parametrize
535524
def test_raw_response_get(self, client: Cloudflare) -> None:
536525
with pytest.warns(DeprecationWarning):
@@ -1076,17 +1065,6 @@ async def test_method_get(self, async_client: AsyncCloudflare) -> None:
10761065

10771066
assert_matches_type(FirewallRule, rule, path=["response"])
10781067

1079-
@parametrize
1080-
async def test_method_get_with_all_params(self, async_client: AsyncCloudflare) -> None:
1081-
with pytest.warns(DeprecationWarning):
1082-
rule = await async_client.firewall.rules.get(
1083-
rule_id="372e67954025e0ba6aaa6d586b9e0b60",
1084-
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
1085-
id="372e67954025e0ba6aaa6d586b9e0b60",
1086-
)
1087-
1088-
assert_matches_type(FirewallRule, rule, path=["response"])
1089-
10901068
@parametrize
10911069
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
10921070
with pytest.warns(DeprecationWarning):

0 commit comments

Comments
 (0)