Skip to content

Commit

Permalink
feat(api): OpenAPI spec update via Stainless API (#839)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Jun 6, 2024
1 parent 9bc4946 commit f520ca5
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 15 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: 1338
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-b02b68427ca7af705b9f5f833944a4959877bb48cb88a7dc74dd8bfbf2d9a25a.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-0ec270b3c03c21a8d2358f8bf7726d82da5aa7eda902b5df86220f550eac2c2e.yml
8 changes: 0 additions & 8 deletions src/cloudflare/resources/rulesets/phases/phases.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ def update(
zone_id: str | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
phase: Phase | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -85,8 +84,6 @@ def update(
name: The human-readable name of the ruleset.
phase: The phase of the ruleset.
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -116,7 +113,6 @@ def update(
"rules": rules,
"description": description,
"name": name,
"phase": phase,
},
phase_update_params.PhaseUpdateParams,
),
Expand Down Expand Up @@ -211,7 +207,6 @@ async def update(
zone_id: str | NotGiven = NOT_GIVEN,
description: str | NotGiven = NOT_GIVEN,
name: str | NotGiven = NOT_GIVEN,
phase: Phase | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -235,8 +230,6 @@ async def update(
name: The human-readable name of the ruleset.
phase: The phase of the ruleset.
extra_headers: Send extra headers
extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -266,7 +259,6 @@ async def update(
"rules": rules,
"description": description,
"name": name,
"phase": phase,
},
phase_update_params.PhaseUpdateParams,
),
Expand Down
4 changes: 0 additions & 4 deletions src/cloudflare/types/rulesets/phase_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from typing import Union, Iterable
from typing_extensions import Literal, Required, TypedDict

from .phase import Phase
from .logging_param import LoggingParam
from .log_rule_param import LogRuleParam
from .skip_rule_param import SkipRuleParam
Expand Down Expand Up @@ -52,9 +51,6 @@ class PhaseUpdateParams(TypedDict, total=False):
name: str
"""The human-readable name of the ruleset."""

phase: Phase
"""The phase of the ruleset."""


class RuleRulesetsLogCustomFieldRuleActionParametersCookieField(TypedDict, total=False):
name: Required[str]
Expand Down
2 changes: 0 additions & 2 deletions tests/api_resources/rulesets/test_phases.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
account_id="string",
description="My ruleset to execute managed rulesets",
name="My ruleset",
phase="http_request_firewall_custom",
)
assert_matches_type(PhaseUpdateResponse, phase, path=["response"])

Expand Down Expand Up @@ -269,7 +268,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
account_id="string",
description="My ruleset to execute managed rulesets",
name="My ruleset",
phase="http_request_firewall_custom",
)
assert_matches_type(PhaseUpdateResponse, phase, path=["response"])

Expand Down

0 comments on commit f520ca5

Please sign in to comment.