Skip to content

Commit 2e661f0

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): OpenAPI spec update via Stainless API (#1172)
1 parent 06a3d17 commit 2e661f0

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 1254
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f1e9ce89f54c7135fad4459c99779782e4acdc4a34ca20508d56546e0aee7ba0.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2af682297dfff56c3d58057ef1b2971523567c75f9a625f364efb37cefa3fa81.yml

src/cloudflare/_models.py

+8
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,14 @@ def validate_type(*, type_: type[_T], value: object) -> _T:
643643
return cast(_T, _validate_non_model_type(type_=type_, value=value))
644644

645645

646+
def set_pydantic_config(typ: Any, config: pydantic.ConfigDict) -> None:
647+
"""Add a pydantic config for the given type.
648+
649+
Note: this is a no-op on Pydantic v1.
650+
"""
651+
setattr(typ, "__pydantic_config__", config) # noqa: B010
652+
653+
646654
# our use of subclasssing here causes weirdness for type checkers,
647655
# so we just pretend that we don't subclass
648656
if TYPE_CHECKING:

0 commit comments

Comments
 (0)