diff --git a/.stats.yml b/.stats.yml index e0b05685189..f22c56405ff 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 1254 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f1e9ce89f54c7135fad4459c99779782e4acdc4a34ca20508d56546e0aee7ba0.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-2af682297dfff56c3d58057ef1b2971523567c75f9a625f364efb37cefa3fa81.yml diff --git a/src/cloudflare/_models.py b/src/cloudflare/_models.py index 5d95bb4b2b2..eb7ce3bde92 100644 --- a/src/cloudflare/_models.py +++ b/src/cloudflare/_models.py @@ -643,6 +643,14 @@ def validate_type(*, type_: type[_T], value: object) -> _T: return cast(_T, _validate_non_model_type(type_=type_, value=value)) +def set_pydantic_config(typ: Any, config: pydantic.ConfigDict) -> None: + """Add a pydantic config for the given type. + + Note: this is a no-op on Pydantic v1. + """ + setattr(typ, "__pydantic_config__", config) # noqa: B010 + + # our use of subclasssing here causes weirdness for type checkers, # so we just pretend that we don't subclass if TYPE_CHECKING: