Skip to content

Commit

Permalink
feat(api): OpenAPI spec update via Stainless API (#1113)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored Jun 20, 2024
1 parent 3ac0c58 commit 33243b2
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 1337
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-8127f6c197e7f17e9eb9d99add7dff6ecbc8b5a90e298269e2070738ed4368e9.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-319be066e6772a95f120a1535c5606744bfbe0d4a5d0a17161f4369d5faf325c.yml
3 changes: 3 additions & 0 deletions src/cloudflare/types/zero_trust/gateway/gateway_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@
class GatewayItem(BaseModel):
created_at: Optional[datetime] = None

description: Optional[str] = None
"""The description of the list item, if present"""

value: Optional[str] = None
"""The value of the item in a list."""
3 changes: 3 additions & 0 deletions src/cloudflare/types/zero_trust/gateway/gateway_item_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,8 @@
class GatewayItemParam(TypedDict, total=False):
created_at: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]

description: str
"""The description of the list item, if present"""

value: str
"""The value of the item in a list."""
12 changes: 12 additions & 0 deletions tests/api_resources/zero_trust/gateway/test_lists.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,17 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
items=[
{
"created_at": parse_datetime("2014-01-01T05:20:00.12345Z"),
"description": "Austin office IP",
"value": "8GE8721REF",
},
{
"created_at": parse_datetime("2014-01-01T05:20:00.12345Z"),
"description": "Austin office IP",
"value": "8GE8721REF",
},
{
"created_at": parse_datetime("2014-01-01T05:20:00.12345Z"),
"description": "Austin office IP",
"value": "8GE8721REF",
},
],
Expand Down Expand Up @@ -266,14 +269,17 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
append=[
{
"created_at": parse_datetime("2014-01-01T05:20:00.12345Z"),
"description": "Austin office IP",
"value": "8GE8721REF",
},
{
"created_at": parse_datetime("2014-01-01T05:20:00.12345Z"),
"description": "Austin office IP",
"value": "8GE8721REF",
},
{
"created_at": parse_datetime("2014-01-01T05:20:00.12345Z"),
"description": "Austin office IP",
"value": "8GE8721REF",
},
],
Expand Down Expand Up @@ -392,14 +398,17 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
items=[
{
"created_at": parse_datetime("2014-01-01T05:20:00.12345Z"),
"description": "Austin office IP",
"value": "8GE8721REF",
},
{
"created_at": parse_datetime("2014-01-01T05:20:00.12345Z"),
"description": "Austin office IP",
"value": "8GE8721REF",
},
{
"created_at": parse_datetime("2014-01-01T05:20:00.12345Z"),
"description": "Austin office IP",
"value": "8GE8721REF",
},
],
Expand Down Expand Up @@ -616,14 +625,17 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare)
append=[
{
"created_at": parse_datetime("2014-01-01T05:20:00.12345Z"),
"description": "Austin office IP",
"value": "8GE8721REF",
},
{
"created_at": parse_datetime("2014-01-01T05:20:00.12345Z"),
"description": "Austin office IP",
"value": "8GE8721REF",
},
{
"created_at": parse_datetime("2014-01-01T05:20:00.12345Z"),
"description": "Austin office IP",
"value": "8GE8721REF",
},
],
Expand Down

0 comments on commit 33243b2

Please sign in to comment.