Skip to content

Commit 7b3a51b

Browse files
feat(schema_validation): add mapped endpoints
1 parent 1daf1c2 commit 7b3a51b

38 files changed

+4065
-2
lines changed

.stats.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 1714
1+
configured_endpoints: 1727
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-dacc4cb6d67067b5769858b798c2505c361e4f23167820f52f2543045ee792e8.yml
33
openapi_spec_hash: b6924a971b9b542de41c687f4add4fe0
4-
config_hash: 98bbabfdd42fef2a932029e37455475f
4+
config_hash: 3c780adf47c2d58e68dc5b7404d7b925

api.md

+64
Original file line numberDiff line numberDiff line change
@@ -9850,3 +9850,67 @@ Methods:
98509850
- <code title="get /accounts/{account_id}/pipelines">client.pipelines.<a href="./src/cloudflare/resources/pipelines.py">list</a>(\*, account_id, \*\*<a href="src/cloudflare/types/pipelines/pipeline_list_params.py">params</a>) -> <a href="./src/cloudflare/types/pipelines/pipeline_list_response.py">PipelineListResponse</a></code>
98519851
- <code title="delete /accounts/{account_id}/pipelines/{pipeline_name}">client.pipelines.<a href="./src/cloudflare/resources/pipelines.py">delete</a>(pipeline_name, \*, account_id) -> None</code>
98529852
- <code title="get /accounts/{account_id}/pipelines/{pipeline_name}">client.pipelines.<a href="./src/cloudflare/resources/pipelines.py">get</a>(pipeline_name, \*, account_id) -> <a href="./src/cloudflare/types/pipelines/pipeline_get_response.py">PipelineGetResponse</a></code>
9853+
9854+
# SchemaValidation
9855+
9856+
## Schemas
9857+
9858+
Types:
9859+
9860+
```python
9861+
from cloudflare.types.schema_validation import (
9862+
SchemaCreateResponse,
9863+
SchemaListResponse,
9864+
SchemaDeleteResponse,
9865+
SchemaEditResponse,
9866+
SchemaGetResponse,
9867+
)
9868+
```
9869+
9870+
Methods:
9871+
9872+
- <code title="post /zones/{zone_id}/schema_validation/schemas">client.schema_validation.schemas.<a href="./src/cloudflare/resources/schema_validation/schemas.py">create</a>(\*, zone_id, \*\*<a href="src/cloudflare/types/schema_validation/schema_create_params.py">params</a>) -> <a href="./src/cloudflare/types/schema_validation/schema_create_response.py">SchemaCreateResponse</a></code>
9873+
- <code title="get /zones/{zone_id}/schema_validation/schemas">client.schema_validation.schemas.<a href="./src/cloudflare/resources/schema_validation/schemas.py">list</a>(\*, zone_id, \*\*<a href="src/cloudflare/types/schema_validation/schema_list_params.py">params</a>) -> <a href="./src/cloudflare/types/schema_validation/schema_list_response.py">SyncV4PagePaginationArray[SchemaListResponse]</a></code>
9874+
- <code title="delete /zones/{zone_id}/schema_validation/schemas/{schema_id}">client.schema_validation.schemas.<a href="./src/cloudflare/resources/schema_validation/schemas.py">delete</a>(schema_id, \*, zone_id) -> <a href="./src/cloudflare/types/schema_validation/schema_delete_response.py">SchemaDeleteResponse</a></code>
9875+
- <code title="patch /zones/{zone_id}/schema_validation/schemas/{schema_id}">client.schema_validation.schemas.<a href="./src/cloudflare/resources/schema_validation/schemas.py">edit</a>(schema_id, \*, zone_id, \*\*<a href="src/cloudflare/types/schema_validation/schema_edit_params.py">params</a>) -> <a href="./src/cloudflare/types/schema_validation/schema_edit_response.py">SchemaEditResponse</a></code>
9876+
- <code title="get /zones/{zone_id}/schema_validation/schemas/{schema_id}">client.schema_validation.schemas.<a href="./src/cloudflare/resources/schema_validation/schemas.py">get</a>(schema_id, \*, zone_id, \*\*<a href="src/cloudflare/types/schema_validation/schema_get_params.py">params</a>) -> <a href="./src/cloudflare/types/schema_validation/schema_get_response.py">SchemaGetResponse</a></code>
9877+
9878+
## Settings
9879+
9880+
Types:
9881+
9882+
```python
9883+
from cloudflare.types.schema_validation import (
9884+
SettingUpdateResponse,
9885+
SettingEditResponse,
9886+
SettingGetResponse,
9887+
)
9888+
```
9889+
9890+
Methods:
9891+
9892+
- <code title="put /zones/{zone_id}/schema_validation/settings">client.schema_validation.settings.<a href="./src/cloudflare/resources/schema_validation/settings/settings.py">update</a>(\*, zone_id, \*\*<a href="src/cloudflare/types/schema_validation/setting_update_params.py">params</a>) -> <a href="./src/cloudflare/types/schema_validation/setting_update_response.py">SettingUpdateResponse</a></code>
9893+
- <code title="patch /zones/{zone_id}/schema_validation/settings">client.schema_validation.settings.<a href="./src/cloudflare/resources/schema_validation/settings/settings.py">edit</a>(\*, zone_id, \*\*<a href="src/cloudflare/types/schema_validation/setting_edit_params.py">params</a>) -> <a href="./src/cloudflare/types/schema_validation/setting_edit_response.py">SettingEditResponse</a></code>
9894+
- <code title="get /zones/{zone_id}/schema_validation/settings">client.schema_validation.settings.<a href="./src/cloudflare/resources/schema_validation/settings/settings.py">get</a>(\*, zone_id) -> <a href="./src/cloudflare/types/schema_validation/setting_get_response.py">SettingGetResponse</a></code>
9895+
9896+
### Operations
9897+
9898+
Types:
9899+
9900+
```python
9901+
from cloudflare.types.schema_validation.settings import (
9902+
OperationUpdateResponse,
9903+
OperationListResponse,
9904+
OperationDeleteResponse,
9905+
OperationBulkEditResponse,
9906+
OperationGetResponse,
9907+
)
9908+
```
9909+
9910+
Methods:
9911+
9912+
- <code title="put /zones/{zone_id}/schema_validation/settings/operations/{operation_id}">client.schema_validation.settings.operations.<a href="./src/cloudflare/resources/schema_validation/settings/operations.py">update</a>(operation_id, \*, zone_id, \*\*<a href="src/cloudflare/types/schema_validation/settings/operation_update_params.py">params</a>) -> <a href="./src/cloudflare/types/schema_validation/settings/operation_update_response.py">OperationUpdateResponse</a></code>
9913+
- <code title="get /zones/{zone_id}/schema_validation/settings/operations">client.schema_validation.settings.operations.<a href="./src/cloudflare/resources/schema_validation/settings/operations.py">list</a>(\*, zone_id, \*\*<a href="src/cloudflare/types/schema_validation/settings/operation_list_params.py">params</a>) -> <a href="./src/cloudflare/types/schema_validation/settings/operation_list_response.py">SyncV4PagePaginationArray[OperationListResponse]</a></code>
9914+
- <code title="delete /zones/{zone_id}/schema_validation/settings/operations/{operation_id}">client.schema_validation.settings.operations.<a href="./src/cloudflare/resources/schema_validation/settings/operations.py">delete</a>(operation_id, \*, zone_id) -> <a href="./src/cloudflare/types/schema_validation/settings/operation_delete_response.py">OperationDeleteResponse</a></code>
9915+
- <code title="patch /zones/{zone_id}/schema_validation/settings/operations">client.schema_validation.settings.operations.<a href="./src/cloudflare/resources/schema_validation/settings/operations.py">bulk_edit</a>(\*, zone_id, \*\*<a href="src/cloudflare/types/schema_validation/settings/operation_bulk_edit_params.py">params</a>) -> <a href="./src/cloudflare/types/schema_validation/settings/operation_bulk_edit_response.py">OperationBulkEditResponse</a></code>
9916+
- <code title="get /zones/{zone_id}/schema_validation/settings/operations/{operation_id}">client.schema_validation.settings.operations.<a href="./src/cloudflare/resources/schema_validation/settings/operations.py">get</a>(operation_id, \*, zone_id) -> <a href="./src/cloudflare/types/schema_validation/settings/operation_get_response.py">OperationGetResponse</a></code>

src/cloudflare/_client.py

+38
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@
113113
resource_sharing,
114114
browser_rendering,
115115
mtls_certificates,
116+
schema_validation,
116117
url_normalization,
117118
custom_nameservers,
118119
managed_transforms,
@@ -218,6 +219,7 @@
218219
from .resources.resource_sharing.resource_sharing import ResourceSharingResource, AsyncResourceSharingResource
219220
from .resources.browser_rendering.browser_rendering import BrowserRenderingResource, AsyncBrowserRenderingResource
220221
from .resources.mtls_certificates.mtls_certificates import MTLSCertificatesResource, AsyncMTLSCertificatesResource
222+
from .resources.schema_validation.schema_validation import SchemaValidationResource, AsyncSchemaValidationResource
221223
from .resources.custom_certificates.custom_certificates import (
222224
CustomCertificatesResource,
223225
AsyncCustomCertificatesResource,
@@ -905,6 +907,12 @@ def pipelines(self) -> PipelinesResource:
905907

906908
return PipelinesResource(self)
907909

910+
@cached_property
911+
def schema_validation(self) -> SchemaValidationResource:
912+
from .resources.schema_validation import SchemaValidationResource
913+
914+
return SchemaValidationResource(self)
915+
908916
@cached_property
909917
def with_raw_response(self) -> CloudflareWithRawResponse:
910918
return CloudflareWithRawResponse(self)
@@ -1731,6 +1739,12 @@ def pipelines(self) -> AsyncPipelinesResource:
17311739

17321740
return AsyncPipelinesResource(self)
17331741

1742+
@cached_property
1743+
def schema_validation(self) -> AsyncSchemaValidationResource:
1744+
from .resources.schema_validation import AsyncSchemaValidationResource
1745+
1746+
return AsyncSchemaValidationResource(self)
1747+
17341748
@cached_property
17351749
def with_raw_response(self) -> AsyncCloudflareWithRawResponse:
17361750
return AsyncCloudflareWithRawResponse(self)
@@ -2487,6 +2501,12 @@ def pipelines(self) -> pipelines.PipelinesResourceWithRawResponse:
24872501

24882502
return PipelinesResourceWithRawResponse(self._client.pipelines)
24892503

2504+
@cached_property
2505+
def schema_validation(self) -> schema_validation.SchemaValidationResourceWithRawResponse:
2506+
from .resources.schema_validation import SchemaValidationResourceWithRawResponse
2507+
2508+
return SchemaValidationResourceWithRawResponse(self._client.schema_validation)
2509+
24902510

24912511
class AsyncCloudflareWithRawResponse:
24922512
_client: AsyncCloudflare
@@ -3060,6 +3080,12 @@ def pipelines(self) -> pipelines.AsyncPipelinesResourceWithRawResponse:
30603080

30613081
return AsyncPipelinesResourceWithRawResponse(self._client.pipelines)
30623082

3083+
@cached_property
3084+
def schema_validation(self) -> schema_validation.AsyncSchemaValidationResourceWithRawResponse:
3085+
from .resources.schema_validation import AsyncSchemaValidationResourceWithRawResponse
3086+
3087+
return AsyncSchemaValidationResourceWithRawResponse(self._client.schema_validation)
3088+
30633089

30643090
class CloudflareWithStreamedResponse:
30653091
_client: Cloudflare
@@ -3633,6 +3659,12 @@ def pipelines(self) -> pipelines.PipelinesResourceWithStreamingResponse:
36333659

36343660
return PipelinesResourceWithStreamingResponse(self._client.pipelines)
36353661

3662+
@cached_property
3663+
def schema_validation(self) -> schema_validation.SchemaValidationResourceWithStreamingResponse:
3664+
from .resources.schema_validation import SchemaValidationResourceWithStreamingResponse
3665+
3666+
return SchemaValidationResourceWithStreamingResponse(self._client.schema_validation)
3667+
36363668

36373669
class AsyncCloudflareWithStreamedResponse:
36383670
_client: AsyncCloudflare
@@ -4216,6 +4248,12 @@ def pipelines(self) -> pipelines.AsyncPipelinesResourceWithStreamingResponse:
42164248

42174249
return AsyncPipelinesResourceWithStreamingResponse(self._client.pipelines)
42184250

4251+
@cached_property
4252+
def schema_validation(self) -> schema_validation.AsyncSchemaValidationResourceWithStreamingResponse:
4253+
from .resources.schema_validation import AsyncSchemaValidationResourceWithStreamingResponse
4254+
4255+
return AsyncSchemaValidationResourceWithStreamingResponse(self._client.schema_validation)
4256+
42194257

42204258
Client = Cloudflare
42214259

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from .schemas import (
4+
SchemasResource,
5+
AsyncSchemasResource,
6+
SchemasResourceWithRawResponse,
7+
AsyncSchemasResourceWithRawResponse,
8+
SchemasResourceWithStreamingResponse,
9+
AsyncSchemasResourceWithStreamingResponse,
10+
)
11+
from .settings import (
12+
SettingsResource,
13+
AsyncSettingsResource,
14+
SettingsResourceWithRawResponse,
15+
AsyncSettingsResourceWithRawResponse,
16+
SettingsResourceWithStreamingResponse,
17+
AsyncSettingsResourceWithStreamingResponse,
18+
)
19+
from .schema_validation import (
20+
SchemaValidationResource,
21+
AsyncSchemaValidationResource,
22+
SchemaValidationResourceWithRawResponse,
23+
AsyncSchemaValidationResourceWithRawResponse,
24+
SchemaValidationResourceWithStreamingResponse,
25+
AsyncSchemaValidationResourceWithStreamingResponse,
26+
)
27+
28+
__all__ = [
29+
"SchemasResource",
30+
"AsyncSchemasResource",
31+
"SchemasResourceWithRawResponse",
32+
"AsyncSchemasResourceWithRawResponse",
33+
"SchemasResourceWithStreamingResponse",
34+
"AsyncSchemasResourceWithStreamingResponse",
35+
"SettingsResource",
36+
"AsyncSettingsResource",
37+
"SettingsResourceWithRawResponse",
38+
"AsyncSettingsResourceWithRawResponse",
39+
"SettingsResourceWithStreamingResponse",
40+
"AsyncSettingsResourceWithStreamingResponse",
41+
"SchemaValidationResource",
42+
"AsyncSchemaValidationResource",
43+
"SchemaValidationResourceWithRawResponse",
44+
"AsyncSchemaValidationResourceWithRawResponse",
45+
"SchemaValidationResourceWithStreamingResponse",
46+
"AsyncSchemaValidationResourceWithStreamingResponse",
47+
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
from .schemas import (
6+
SchemasResource,
7+
AsyncSchemasResource,
8+
SchemasResourceWithRawResponse,
9+
AsyncSchemasResourceWithRawResponse,
10+
SchemasResourceWithStreamingResponse,
11+
AsyncSchemasResourceWithStreamingResponse,
12+
)
13+
from ..._compat import cached_property
14+
from ..._resource import SyncAPIResource, AsyncAPIResource
15+
from .settings.settings import (
16+
SettingsResource,
17+
AsyncSettingsResource,
18+
SettingsResourceWithRawResponse,
19+
AsyncSettingsResourceWithRawResponse,
20+
SettingsResourceWithStreamingResponse,
21+
AsyncSettingsResourceWithStreamingResponse,
22+
)
23+
24+
__all__ = ["SchemaValidationResource", "AsyncSchemaValidationResource"]
25+
26+
27+
class SchemaValidationResource(SyncAPIResource):
28+
@cached_property
29+
def schemas(self) -> SchemasResource:
30+
return SchemasResource(self._client)
31+
32+
@cached_property
33+
def settings(self) -> SettingsResource:
34+
return SettingsResource(self._client)
35+
36+
@cached_property
37+
def with_raw_response(self) -> SchemaValidationResourceWithRawResponse:
38+
"""
39+
This property can be used as a prefix for any HTTP method call to return
40+
the raw response object instead of the parsed content.
41+
42+
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
43+
"""
44+
return SchemaValidationResourceWithRawResponse(self)
45+
46+
@cached_property
47+
def with_streaming_response(self) -> SchemaValidationResourceWithStreamingResponse:
48+
"""
49+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
50+
51+
For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
52+
"""
53+
return SchemaValidationResourceWithStreamingResponse(self)
54+
55+
56+
class AsyncSchemaValidationResource(AsyncAPIResource):
57+
@cached_property
58+
def schemas(self) -> AsyncSchemasResource:
59+
return AsyncSchemasResource(self._client)
60+
61+
@cached_property
62+
def settings(self) -> AsyncSettingsResource:
63+
return AsyncSettingsResource(self._client)
64+
65+
@cached_property
66+
def with_raw_response(self) -> AsyncSchemaValidationResourceWithRawResponse:
67+
"""
68+
This property can be used as a prefix for any HTTP method call to return
69+
the raw response object instead of the parsed content.
70+
71+
For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
72+
"""
73+
return AsyncSchemaValidationResourceWithRawResponse(self)
74+
75+
@cached_property
76+
def with_streaming_response(self) -> AsyncSchemaValidationResourceWithStreamingResponse:
77+
"""
78+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
79+
80+
For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
81+
"""
82+
return AsyncSchemaValidationResourceWithStreamingResponse(self)
83+
84+
85+
class SchemaValidationResourceWithRawResponse:
86+
def __init__(self, schema_validation: SchemaValidationResource) -> None:
87+
self._schema_validation = schema_validation
88+
89+
@cached_property
90+
def schemas(self) -> SchemasResourceWithRawResponse:
91+
return SchemasResourceWithRawResponse(self._schema_validation.schemas)
92+
93+
@cached_property
94+
def settings(self) -> SettingsResourceWithRawResponse:
95+
return SettingsResourceWithRawResponse(self._schema_validation.settings)
96+
97+
98+
class AsyncSchemaValidationResourceWithRawResponse:
99+
def __init__(self, schema_validation: AsyncSchemaValidationResource) -> None:
100+
self._schema_validation = schema_validation
101+
102+
@cached_property
103+
def schemas(self) -> AsyncSchemasResourceWithRawResponse:
104+
return AsyncSchemasResourceWithRawResponse(self._schema_validation.schemas)
105+
106+
@cached_property
107+
def settings(self) -> AsyncSettingsResourceWithRawResponse:
108+
return AsyncSettingsResourceWithRawResponse(self._schema_validation.settings)
109+
110+
111+
class SchemaValidationResourceWithStreamingResponse:
112+
def __init__(self, schema_validation: SchemaValidationResource) -> None:
113+
self._schema_validation = schema_validation
114+
115+
@cached_property
116+
def schemas(self) -> SchemasResourceWithStreamingResponse:
117+
return SchemasResourceWithStreamingResponse(self._schema_validation.schemas)
118+
119+
@cached_property
120+
def settings(self) -> SettingsResourceWithStreamingResponse:
121+
return SettingsResourceWithStreamingResponse(self._schema_validation.settings)
122+
123+
124+
class AsyncSchemaValidationResourceWithStreamingResponse:
125+
def __init__(self, schema_validation: AsyncSchemaValidationResource) -> None:
126+
self._schema_validation = schema_validation
127+
128+
@cached_property
129+
def schemas(self) -> AsyncSchemasResourceWithStreamingResponse:
130+
return AsyncSchemasResourceWithStreamingResponse(self._schema_validation.schemas)
131+
132+
@cached_property
133+
def settings(self) -> AsyncSettingsResourceWithStreamingResponse:
134+
return AsyncSettingsResourceWithStreamingResponse(self._schema_validation.settings)

0 commit comments

Comments
 (0)