Skip to content

Commit d4795c5

Browse files
fix(api): 'name' and 'type' are required on dns_record
1 parent fceaf95 commit d4795c5

Some content is hidden

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

50 files changed

+2928
-1772
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 1752
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-4630badfdb7461b0b3744bfe7df1ed17646c522fe655d9e3ac5ac812ee7f2d20.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f0c2158556a520087f99f8ca426379575cf9483312cba61b99e37afab6306fde.yml
33
openapi_spec_hash: f5e7525b7446e8e536e9f2c9a82f6f5c
4-
config_hash: 4b927ddc073213712e291a61ccf872b0
4+
config_hash: 609def1a180087b5109306455be2068d

src/cloudflare/_base_client.py

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,14 +1113,7 @@ def _process_response(
11131113
) -> ResponseT:
11141114
origin = get_origin(cast_to) or cast_to
11151115

1116-
if (
1117-
inspect.isclass(origin)
1118-
and issubclass(origin, BaseAPIResponse)
1119-
# we only want to actually return the custom BaseAPIResponse class if we're
1120-
# returning the raw response, or if we're not streaming SSE, as if we're streaming
1121-
# SSE then `cast_to` doesn't actively reflect the type we need to parse into
1122-
and (not stream or bool(response.request.headers.get(RAW_RESPONSE_HEADER)))
1123-
):
1116+
if inspect.isclass(origin) and issubclass(origin, BaseAPIResponse):
11241117
if not issubclass(origin, APIResponse):
11251118
raise TypeError(f"API Response types must subclass {APIResponse}; Received {origin}")
11261119

@@ -1625,14 +1618,7 @@ async def _process_response(
16251618
) -> ResponseT:
16261619
origin = get_origin(cast_to) or cast_to
16271620

1628-
if (
1629-
inspect.isclass(origin)
1630-
and issubclass(origin, BaseAPIResponse)
1631-
# we only want to actually return the custom BaseAPIResponse class if we're
1632-
# returning the raw response, or if we're not streaming SSE, as if we're streaming
1633-
# SSE then `cast_to` doesn't actively reflect the type we need to parse into
1634-
and (not stream or bool(response.request.headers.get(RAW_RESPONSE_HEADER)))
1635-
):
1621+
if inspect.isclass(origin) and issubclass(origin, BaseAPIResponse):
16361622
if not issubclass(origin, AsyncAPIResponse):
16371623
raise TypeError(f"API Response types must subclass {AsyncAPIResponse}; Received {origin}")
16381624

0 commit comments

Comments
 (0)