Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): update via SDK Studio #216

Merged
merged 1 commit into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/cloudflare/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def __init__(
@property
@override
def qs(self) -> Querystring:
return Querystring(array_format="comma")
return Querystring(array_format="repeat")

@property
@override
Expand Down Expand Up @@ -697,7 +697,7 @@ def __init__(
@property
@override
def qs(self) -> Querystring:
return Querystring(array_format="comma")
return Querystring(array_format="repeat")

@property
@override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List, Union
from typing import Union, Optional

__all__ = ["GroupEditResponse"]

GroupEditResponse = Union[List[object], str, object]
GroupEditResponse = Union[Optional[str], Optional[object]]
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List, Union
from typing import Union, Optional

__all__ = ["GroupGetResponse"]

GroupGetResponse = Union[List[object], str, object]
GroupGetResponse = Union[Optional[str], Optional[object]]
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List, Union
from typing import Union, Optional

__all__ = ["RuleGetResponse"]

RuleGetResponse = Union[List[object], str, object]
RuleGetResponse = Union[Optional[str], Optional[object]]
32 changes: 16 additions & 16 deletions tests/api_resources/images/v1/test_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class TestKeys:
@parametrize
def test_method_update(self, client: Cloudflare) -> None:
key = client.images.v1.keys.update(
"string",
"someKey",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(ImagesImageKeys, key, path=["response"])
Expand All @@ -30,7 +30,7 @@ def test_method_update(self, client: Cloudflare) -> None:
@parametrize
def test_raw_response_update(self, client: Cloudflare) -> None:
response = client.images.v1.keys.with_raw_response.update(
"string",
"someKey",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)

Expand All @@ -43,7 +43,7 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_update(self, client: Cloudflare) -> None:
with client.images.v1.keys.with_streaming_response.update(
"string",
"someKey",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
Expand All @@ -59,7 +59,7 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
def test_path_params_update(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
client.images.v1.keys.with_raw_response.update(
"string",
"someKey",
account_id="",
)

Expand Down Expand Up @@ -115,7 +115,7 @@ def test_path_params_list(self, client: Cloudflare) -> None:
@parametrize
def test_method_delete(self, client: Cloudflare) -> None:
key = client.images.v1.keys.delete(
"string",
"someKey",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(ImagesImageKeys, key, path=["response"])
Expand All @@ -124,7 +124,7 @@ def test_method_delete(self, client: Cloudflare) -> None:
@parametrize
def test_raw_response_delete(self, client: Cloudflare) -> None:
response = client.images.v1.keys.with_raw_response.delete(
"string",
"someKey",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)

Expand All @@ -137,7 +137,7 @@ def test_raw_response_delete(self, client: Cloudflare) -> None:
@parametrize
def test_streaming_response_delete(self, client: Cloudflare) -> None:
with client.images.v1.keys.with_streaming_response.delete(
"string",
"someKey",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
Expand All @@ -153,7 +153,7 @@ def test_streaming_response_delete(self, client: Cloudflare) -> None:
def test_path_params_delete(self, client: Cloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
client.images.v1.keys.with_raw_response.delete(
"string",
"someKey",
account_id="",
)

Expand All @@ -171,7 +171,7 @@ class TestAsyncKeys:
@parametrize
async def test_method_update(self, async_client: AsyncCloudflare) -> None:
key = await async_client.images.v1.keys.update(
"string",
"someKey",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(ImagesImageKeys, key, path=["response"])
Expand All @@ -180,7 +180,7 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
response = await async_client.images.v1.keys.with_raw_response.update(
"string",
"someKey",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)

Expand All @@ -193,7 +193,7 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_streaming_response_update(self, async_client: AsyncCloudflare) -> None:
async with async_client.images.v1.keys.with_streaming_response.update(
"string",
"someKey",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
Expand All @@ -209,7 +209,7 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
await async_client.images.v1.keys.with_raw_response.update(
"string",
"someKey",
account_id="",
)

Expand Down Expand Up @@ -265,7 +265,7 @@ async def test_path_params_list(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
key = await async_client.images.v1.keys.delete(
"string",
"someKey",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
assert_matches_type(ImagesImageKeys, key, path=["response"])
Expand All @@ -274,7 +274,7 @@ async def test_method_delete(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
response = await async_client.images.v1.keys.with_raw_response.delete(
"string",
"someKey",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
)

Expand All @@ -287,7 +287,7 @@ async def test_raw_response_delete(self, async_client: AsyncCloudflare) -> None:
@parametrize
async def test_streaming_response_delete(self, async_client: AsyncCloudflare) -> None:
async with async_client.images.v1.keys.with_streaming_response.delete(
"string",
"someKey",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
) as response:
assert not response.is_closed
Expand All @@ -303,7 +303,7 @@ async def test_streaming_response_delete(self, async_client: AsyncCloudflare) ->
async def test_path_params_delete(self, async_client: AsyncCloudflare) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"):
await async_client.images.v1.keys.with_raw_response.delete(
"string",
"someKey",
account_id="",
)

Expand Down
Loading