Skip to content

Commit c5f5b46

Browse files
chore(api): update composite API spec
1 parent 9468e7b commit c5f5b46

4 files changed

Lines changed: 15 additions & 23 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 1993
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-dfcfb91b62daeff310609797c93ae70c5e040e1658338e12629d199fcffdb402.yml
3-
openapi_spec_hash: 1083e054d1efad2591a2299209615ca0
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7bc9a0ac7d1527335e863e69fbf4d78614d4494615531691fb7322a0588d0503.yml
3+
openapi_spec_hash: 40884ce7c4b0c597327f4d3379e8361f
44
config_hash: 316e765ff117ffcf8ecf5a3187c184b1

src/cloudflare/resources/custom_hostnames/custom_hostnames.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ def create(
8383
*,
8484
zone_id: str,
8585
hostname: str,
86-
ssl: custom_hostname_create_params.SSL,
8786
custom_metadata: Dict[str, str] | Omit = omit,
87+
ssl: custom_hostname_create_params.SSL | Omit = omit,
8888
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
8989
# The extra values given here take precedence over values defined on the client or passed to this method.
9090
extra_headers: Headers | None = None,
@@ -109,11 +109,11 @@ def create(
109109
110110
hostname: The custom hostname that will point to your hostname via CNAME.
111111
112-
ssl: SSL properties used when creating the custom hostname.
113-
114112
custom_metadata: Unique key/value metadata for this hostname. These are per-hostname (customer)
115113
settings.
116114
115+
ssl: SSL properties used when creating the custom hostname.
116+
117117
extra_headers: Send extra headers
118118
119119
extra_query: Add additional query parameters to the request
@@ -129,8 +129,8 @@ def create(
129129
body=maybe_transform(
130130
{
131131
"hostname": hostname,
132-
"ssl": ssl,
133132
"custom_metadata": custom_metadata,
133+
"ssl": ssl,
134134
},
135135
custom_hostname_create_params.CustomHostnameCreateParams,
136136
),
@@ -415,8 +415,8 @@ async def create(
415415
*,
416416
zone_id: str,
417417
hostname: str,
418-
ssl: custom_hostname_create_params.SSL,
419418
custom_metadata: Dict[str, str] | Omit = omit,
419+
ssl: custom_hostname_create_params.SSL | Omit = omit,
420420
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
421421
# The extra values given here take precedence over values defined on the client or passed to this method.
422422
extra_headers: Headers | None = None,
@@ -441,11 +441,11 @@ async def create(
441441
442442
hostname: The custom hostname that will point to your hostname via CNAME.
443443
444-
ssl: SSL properties used when creating the custom hostname.
445-
446444
custom_metadata: Unique key/value metadata for this hostname. These are per-hostname (customer)
447445
settings.
448446
447+
ssl: SSL properties used when creating the custom hostname.
448+
449449
extra_headers: Send extra headers
450450
451451
extra_query: Add additional query parameters to the request
@@ -461,8 +461,8 @@ async def create(
461461
body=await async_maybe_transform(
462462
{
463463
"hostname": hostname,
464-
"ssl": ssl,
465464
"custom_metadata": custom_metadata,
465+
"ssl": ssl,
466466
},
467467
custom_hostname_create_params.CustomHostnameCreateParams,
468468
),

src/cloudflare/types/custom_hostnames/custom_hostname_create_params.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ class CustomHostnameCreateParams(TypedDict, total=False):
2121
hostname: Required[str]
2222
"""The custom hostname that will point to your hostname via CNAME."""
2323

24-
ssl: Required[SSL]
25-
"""SSL properties used when creating the custom hostname."""
26-
2724
custom_metadata: Dict[str, str]
2825
"""Unique key/value metadata for this hostname.
2926
3027
These are per-hostname (customer) settings.
3128
"""
3229

30+
ssl: SSL
31+
"""SSL properties used when creating the custom hostname."""
32+
3333

3434
class SSLCustomCERTBundle(TypedDict, total=False):
3535
custom_certificate: Required[str]

tests/api_resources/test_custom_hostnames.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ def test_method_create(self, client: Cloudflare) -> None:
2929
custom_hostname = client.custom_hostnames.create(
3030
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
3131
hostname="app.example.com",
32-
ssl={},
3332
)
3433
assert_matches_type(Optional[CustomHostnameCreateResponse], custom_hostname, path=["response"])
3534

@@ -38,6 +37,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
3837
custom_hostname = client.custom_hostnames.create(
3938
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
4039
hostname="app.example.com",
40+
custom_metadata={"foo": "string"},
4141
ssl={
4242
"bundle_method": "ubiquitous",
4343
"certificate_authority": "google",
@@ -61,7 +61,6 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
6161
"type": "dv",
6262
"wildcard": False,
6363
},
64-
custom_metadata={"foo": "string"},
6564
)
6665
assert_matches_type(Optional[CustomHostnameCreateResponse], custom_hostname, path=["response"])
6766

@@ -70,7 +69,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
7069
response = client.custom_hostnames.with_raw_response.create(
7170
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
7271
hostname="app.example.com",
73-
ssl={},
7472
)
7573

7674
assert response.is_closed is True
@@ -83,7 +81,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
8381
with client.custom_hostnames.with_streaming_response.create(
8482
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
8583
hostname="app.example.com",
86-
ssl={},
8784
) as response:
8885
assert not response.is_closed
8986
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -99,7 +96,6 @@ def test_path_params_create(self, client: Cloudflare) -> None:
9996
client.custom_hostnames.with_raw_response.create(
10097
zone_id="",
10198
hostname="app.example.com",
102-
ssl={},
10399
)
104100

105101
@parametrize
@@ -345,7 +341,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
345341
custom_hostname = await async_client.custom_hostnames.create(
346342
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
347343
hostname="app.example.com",
348-
ssl={},
349344
)
350345
assert_matches_type(Optional[CustomHostnameCreateResponse], custom_hostname, path=["response"])
351346

@@ -354,6 +349,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
354349
custom_hostname = await async_client.custom_hostnames.create(
355350
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
356351
hostname="app.example.com",
352+
custom_metadata={"foo": "string"},
357353
ssl={
358354
"bundle_method": "ubiquitous",
359355
"certificate_authority": "google",
@@ -377,7 +373,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
377373
"type": "dv",
378374
"wildcard": False,
379375
},
380-
custom_metadata={"foo": "string"},
381376
)
382377
assert_matches_type(Optional[CustomHostnameCreateResponse], custom_hostname, path=["response"])
383378

@@ -386,7 +381,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
386381
response = await async_client.custom_hostnames.with_raw_response.create(
387382
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
388383
hostname="app.example.com",
389-
ssl={},
390384
)
391385

392386
assert response.is_closed is True
@@ -399,7 +393,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
399393
async with async_client.custom_hostnames.with_streaming_response.create(
400394
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
401395
hostname="app.example.com",
402-
ssl={},
403396
) as response:
404397
assert not response.is_closed
405398
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -415,7 +408,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
415408
await async_client.custom_hostnames.with_raw_response.create(
416409
zone_id="",
417410
hostname="app.example.com",
418-
ssl={},
419411
)
420412

421413
@parametrize

0 commit comments

Comments
 (0)