Skip to content

Commit

Permalink
feat(api): OpenAPI spec update via Stainless API (#1188)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed Jul 15, 2024
1 parent c2e0647 commit 90ce238
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 25 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: 1256
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-7bc261aaae82e045d5b257d76a8e4dedcc8102a8b20f0d32d091e41296624124.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8698fc16cc1cd7549c7f51bf3f3118b80e198b25fee1f20e4aaeb226608dafd1.yml
10 changes: 7 additions & 3 deletions src/cloudflare/types/hyperdrive/configuration.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import Optional
from typing_extensions import Literal

from ..._models import BaseModel
Expand All @@ -14,11 +15,14 @@ class Configuration(BaseModel):
host: str
"""The host (hostname or IP) of your origin database."""

port: int
"""The port (default: 5432 for Postgres) of your origin database."""

scheme: Literal["postgres", "postgresql", "mysql"]
"""Specifies the URL scheme used to connect to your origin database."""

user: str
"""The user of your origin database."""

access_client_id: Optional[str] = None
"""The Client ID of the Access token to use when connecting to the origin database"""

port: Optional[int] = None
"""The port (default: 5432 for Postgres) of your origin database."""
9 changes: 6 additions & 3 deletions src/cloudflare/types/hyperdrive/configuration_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ class ConfigurationParam(TypedDict, total=False):
host: Required[str]
"""The host (hostname or IP) of your origin database."""

port: Required[int]
"""The port (default: 5432 for Postgres) of your origin database."""

scheme: Required[Literal["postgres", "postgresql", "mysql"]]
"""Specifies the URL scheme used to connect to your origin database."""

user: Required[str]
"""The user of your origin database."""

access_client_id: str
"""The Client ID of the Access token to use when connecting to the origin database"""

port: int
"""The port (default: 5432 for Postgres) of your origin database."""
24 changes: 6 additions & 18 deletions tests/api_resources/hyperdrive/test_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ def test_method_create(self, client: Cloudflare) -> None:
origin={
"database": "postgres",
"host": "database.example.com",
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand All @@ -44,6 +43,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example-hyperdrive",
origin={
"access_client_id": "0123456789abcdef0123456789abcdef.access",
"database": "postgres",
"host": "database.example.com",
"port": 5432,
Expand All @@ -67,7 +67,6 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
origin={
"database": "postgres",
"host": "database.example.com",
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand All @@ -87,7 +86,6 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
origin={
"database": "postgres",
"host": "database.example.com",
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand All @@ -110,7 +108,6 @@ def test_path_params_create(self, client: Cloudflare) -> None:
origin={
"database": "postgres",
"host": "database.example.com",
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand All @@ -126,7 +123,6 @@ def test_method_update(self, client: Cloudflare) -> None:
origin={
"database": "postgres",
"host": "database.example.com",
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand All @@ -141,6 +137,7 @@ def test_method_update_with_all_params(self, client: Cloudflare) -> None:
account_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example-hyperdrive",
origin={
"access_client_id": "0123456789abcdef0123456789abcdef.access",
"database": "postgres",
"host": "database.example.com",
"port": 5432,
Expand All @@ -165,7 +162,6 @@ def test_raw_response_update(self, client: Cloudflare) -> None:
origin={
"database": "postgres",
"host": "database.example.com",
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand All @@ -186,7 +182,6 @@ def test_streaming_response_update(self, client: Cloudflare) -> None:
origin={
"database": "postgres",
"host": "database.example.com",
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand All @@ -210,7 +205,6 @@ def test_path_params_update(self, client: Cloudflare) -> None:
origin={
"database": "postgres",
"host": "database.example.com",
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand All @@ -224,7 +218,6 @@ def test_path_params_update(self, client: Cloudflare) -> None:
origin={
"database": "postgres",
"host": "database.example.com",
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand Down Expand Up @@ -338,6 +331,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
},
name="example-hyperdrive",
origin={
"access_client_id": "0123456789abcdef0123456789abcdef.access",
"database": "postgres",
"host": "database.example.com",
"port": 5432,
Expand Down Expand Up @@ -451,7 +445,6 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
origin={
"database": "postgres",
"host": "database.example.com",
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand All @@ -465,6 +458,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
account_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example-hyperdrive",
origin={
"access_client_id": "0123456789abcdef0123456789abcdef.access",
"database": "postgres",
"host": "database.example.com",
"port": 5432,
Expand All @@ -488,7 +482,6 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
origin={
"database": "postgres",
"host": "database.example.com",
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand All @@ -508,7 +501,6 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
origin={
"database": "postgres",
"host": "database.example.com",
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand All @@ -531,7 +523,6 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
origin={
"database": "postgres",
"host": "database.example.com",
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand All @@ -547,7 +538,6 @@ async def test_method_update(self, async_client: AsyncCloudflare) -> None:
origin={
"database": "postgres",
"host": "database.example.com",
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand All @@ -562,6 +552,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncCloudflare
account_id="023e105f4ecef8ad9ca31a8372d0c353",
name="example-hyperdrive",
origin={
"access_client_id": "0123456789abcdef0123456789abcdef.access",
"database": "postgres",
"host": "database.example.com",
"port": 5432,
Expand All @@ -586,7 +577,6 @@ async def test_raw_response_update(self, async_client: AsyncCloudflare) -> None:
origin={
"database": "postgres",
"host": "database.example.com",
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand All @@ -607,7 +597,6 @@ async def test_streaming_response_update(self, async_client: AsyncCloudflare) ->
origin={
"database": "postgres",
"host": "database.example.com",
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand All @@ -631,7 +620,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
origin={
"database": "postgres",
"host": "database.example.com",
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand All @@ -645,7 +633,6 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
origin={
"database": "postgres",
"host": "database.example.com",
"port": 5432,
"scheme": "postgres",
"user": "postgres",
},
Expand Down Expand Up @@ -759,6 +746,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare)
},
name="example-hyperdrive",
origin={
"access_client_id": "0123456789abcdef0123456789abcdef.access",
"database": "postgres",
"host": "database.example.com",
"port": 5432,
Expand Down

0 comments on commit 90ce238

Please sign in to comment.