Skip to content

Commit 5632f1b

Browse files
committed
ci: regenerated with OpenAPI Doc 0.3.0, Speakeay CLI 1.61.0
1 parent c32a1ca commit 5632f1b

File tree

16 files changed

+184
-18
lines changed

16 files changed

+184
-18
lines changed

RELEASES.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,4 +694,12 @@ Based on:
694694
- OpenAPI Doc 0.3.0 https://docs.speakeasyapi.dev/openapi.yaml
695695
- Speakeasy CLI 1.59.0 (2.65.0) https://github.com/speakeasy-api/speakeasy
696696
### Releases
697-
- [PyPI v1.44.0] https://pypi.org/project/speakeasy-client-sdk-python/1.44.0 - .
697+
- [PyPI v1.44.0] https://pypi.org/project/speakeasy-client-sdk-python/1.44.0 - .
698+
699+
## 2023-07-18 00:14:35
700+
### Changes
701+
Based on:
702+
- OpenAPI Doc 0.3.0 https://docs.speakeasyapi.dev/openapi.yaml
703+
- Speakeasy CLI 1.61.0 (2.70.0) https://github.com/speakeasy-api/speakeasy
704+
### Releases
705+
- [PyPI v1.45.0] https://pypi.org/project/speakeasy-client-sdk-python/1.45.0 - .

files.gen

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ pylintrc
1111
setup.py
1212
src/speakeasy/__init__.py
1313
src/speakeasy/models/__init__.py
14+
src/speakeasy/models/errors/sdkerror.py
1415
src/speakeasy/utils/__init__.py
1516
src/speakeasy/utils/retries.py
1617
src/speakeasy/utils/utils.py
@@ -67,6 +68,7 @@ src/speakeasy/models/shared/schema.py
6768
src/speakeasy/models/shared/schemadiff.py
6869
src/speakeasy/models/shared/security.py
6970
src/speakeasy/models/shared/__init__.py
71+
src/speakeasy/models/errors/__init__.py
7072
docs/sdks/speakeasy/README.md
7173
docs/sdks/apiendpoints/README.md
7274
docs/sdks/apis/README.md

gen.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ configVersion: 1.0.0
22
management:
33
docChecksum: 8c4f3932e054e1b349a9a34f12cf7e8c
44
docVersion: 0.3.0
5-
speakeasyVersion: 1.59.0
6-
generationVersion: 2.65.0
5+
speakeasyVersion: 1.61.0
6+
generationVersion: 2.70.0
77
generation:
88
sdkClassName: speakeasy
99
singleTagPerOp: false
1010
telemetryEnabled: true
1111
python:
12-
version: 1.44.0
12+
version: 1.45.0
1313
author: Speakeasy
1414
description: Speakeasy API Client SDK for Python
1515
maxMethodParams: 0

pylintrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,9 @@ disable=raw-checker-failed,
440440
using-constant-test,
441441
too-many-statements,
442442
cyclic-import,
443-
too-many-nested-blocks
443+
too-many-nested-blocks,
444+
too-many-boolean-expressions,
445+
no-else-raise
444446

445447
# Enable the message, report, category or checker with the given id(s). You can
446448
# either give multiple identifier separated by comma (,) or put this option

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
setuptools.setup(
1212
name="speakeasy-client-sdk-python",
13-
version="1.44.0",
13+
version="1.45.0",
1414
author="Speakeasy",
1515
description="Speakeasy API Client SDK for Python",
1616
long_description=long_description,

src/speakeasy/apiendpoints.py

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from .sdkconfiguration import SDKConfiguration
44
from speakeasy import utils
5-
from speakeasy.models import operations, shared
5+
from speakeasy.models import errors, operations, shared
66
from typing import Optional
77

88
class APIEndpoints:
@@ -37,6 +37,8 @@ def delete_api_endpoint(self, request: operations.DeleteAPIEndpointRequest) -> o
3737
if utils.match_content_type(content_type, 'application/json'):
3838
out = utils.unmarshal_json(http_res.text, Optional[shared.Error])
3939
res.error = out
40+
else:
41+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
4042

4143
return res
4244

@@ -64,10 +66,14 @@ def find_api_endpoint(self, request: operations.FindAPIEndpointRequest) -> opera
6466
if utils.match_content_type(content_type, 'application/json'):
6567
out = utils.unmarshal_json(http_res.text, Optional[shared.APIEndpoint])
6668
res.api_endpoint = out
69+
else:
70+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
6771
else:
6872
if utils.match_content_type(content_type, 'application/json'):
6973
out = utils.unmarshal_json(http_res.text, Optional[shared.Error])
7074
res.error = out
75+
else:
76+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
7177

7278
return res
7379

@@ -95,10 +101,14 @@ def generate_open_api_spec_for_api_endpoint(self, request: operations.GenerateOp
95101
if utils.match_content_type(content_type, 'application/json'):
96102
out = utils.unmarshal_json(http_res.text, Optional[shared.GenerateOpenAPISpecDiff])
97103
res.generate_open_api_spec_diff = out
104+
else:
105+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
98106
else:
99107
if utils.match_content_type(content_type, 'application/json'):
100108
out = utils.unmarshal_json(http_res.text, Optional[shared.Error])
101109
res.error = out
110+
else:
111+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
102112

103113
return res
104114

@@ -124,10 +134,14 @@ def generate_postman_collection_for_api_endpoint(self, request: operations.Gener
124134
if http_res.status_code == 200:
125135
if utils.match_content_type(content_type, 'application/octet-stream'):
126136
res.postman_collection = http_res.content
137+
else:
138+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
127139
else:
128140
if utils.match_content_type(content_type, 'application/json'):
129141
out = utils.unmarshal_json(http_res.text, Optional[shared.Error])
130142
res.error = out
143+
else:
144+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
131145

132146
return res
133147

@@ -152,10 +166,14 @@ def get_all_api_endpoints(self, request: operations.GetAllAPIEndpointsRequest) -
152166
if utils.match_content_type(content_type, 'application/json'):
153167
out = utils.unmarshal_json(http_res.text, Optional[list[shared.APIEndpoint]])
154168
res.api_endpoints = out
169+
else:
170+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
155171
else:
156172
if utils.match_content_type(content_type, 'application/json'):
157173
out = utils.unmarshal_json(http_res.text, Optional[shared.Error])
158174
res.error = out
175+
else:
176+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
159177

160178
return res
161179

@@ -180,10 +198,14 @@ def get_all_for_version_api_endpoints(self, request: operations.GetAllForVersion
180198
if utils.match_content_type(content_type, 'application/json'):
181199
out = utils.unmarshal_json(http_res.text, Optional[list[shared.APIEndpoint]])
182200
res.api_endpoints = out
201+
else:
202+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
183203
else:
184204
if utils.match_content_type(content_type, 'application/json'):
185205
out = utils.unmarshal_json(http_res.text, Optional[shared.Error])
186206
res.error = out
207+
else:
208+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
187209

188210
return res
189211

@@ -208,10 +230,14 @@ def get_api_endpoint(self, request: operations.GetAPIEndpointRequest) -> operati
208230
if utils.match_content_type(content_type, 'application/json'):
209231
out = utils.unmarshal_json(http_res.text, Optional[shared.APIEndpoint])
210232
res.api_endpoint = out
233+
else:
234+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
211235
else:
212236
if utils.match_content_type(content_type, 'application/json'):
213237
out = utils.unmarshal_json(http_res.text, Optional[shared.Error])
214238
res.error = out
239+
else:
240+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
215241

216242
return res
217243

@@ -243,10 +269,14 @@ def upsert_api_endpoint(self, request: operations.UpsertAPIEndpointRequest) -> o
243269
if utils.match_content_type(content_type, 'application/json'):
244270
out = utils.unmarshal_json(http_res.text, Optional[shared.APIEndpoint])
245271
res.api_endpoint = out
272+
else:
273+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
246274
else:
247275
if utils.match_content_type(content_type, 'application/json'):
248276
out = utils.unmarshal_json(http_res.text, Optional[shared.Error])
249277
res.error = out
278+
else:
279+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
250280

251281
return res
252282

src/speakeasy/apis.py

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from .sdkconfiguration import SDKConfiguration
44
from speakeasy import utils
5-
from speakeasy.models import operations, shared
5+
from speakeasy.models import errors, operations, shared
66
from typing import Optional
77

88
class Apis:
@@ -37,6 +37,8 @@ def delete_api(self, request: operations.DeleteAPIRequest) -> operations.DeleteA
3737
if utils.match_content_type(content_type, 'application/json'):
3838
out = utils.unmarshal_json(http_res.text, Optional[shared.Error])
3939
res.error = out
40+
else:
41+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
4042

4143
return res
4244

@@ -64,10 +66,14 @@ def generate_open_api_spec(self, request: operations.GenerateOpenAPISpecRequest)
6466
if utils.match_content_type(content_type, 'application/json'):
6567
out = utils.unmarshal_json(http_res.text, Optional[shared.GenerateOpenAPISpecDiff])
6668
res.generate_open_api_spec_diff = out
69+
else:
70+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
6771
else:
6872
if utils.match_content_type(content_type, 'application/json'):
6973
out = utils.unmarshal_json(http_res.text, Optional[shared.Error])
7074
res.error = out
75+
else:
76+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
7177

7278
return res
7379

@@ -93,10 +99,14 @@ def generate_postman_collection(self, request: operations.GeneratePostmanCollect
9399
if http_res.status_code == 200:
94100
if utils.match_content_type(content_type, 'application/octet-stream'):
95101
res.postman_collection = http_res.content
102+
else:
103+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
96104
else:
97105
if utils.match_content_type(content_type, 'application/json'):
98106
out = utils.unmarshal_json(http_res.text, Optional[shared.Error])
99107
res.error = out
108+
else:
109+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
100110

101111
return res
102112

@@ -125,10 +135,14 @@ def get_all_api_versions(self, request: operations.GetAllAPIVersionsRequest) ->
125135
if utils.match_content_type(content_type, 'application/json'):
126136
out = utils.unmarshal_json(http_res.text, Optional[list[shared.API]])
127137
res.apis = out
138+
else:
139+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
128140
else:
129141
if utils.match_content_type(content_type, 'application/json'):
130142
out = utils.unmarshal_json(http_res.text, Optional[shared.Error])
131143
res.error = out
144+
else:
145+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
132146

133147
return res
134148

@@ -157,10 +171,14 @@ def get_apis(self, request: operations.GetApisRequest) -> operations.GetApisResp
157171
if utils.match_content_type(content_type, 'application/json'):
158172
out = utils.unmarshal_json(http_res.text, Optional[list[shared.API]])
159173
res.apis = out
174+
else:
175+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
160176
else:
161177
if utils.match_content_type(content_type, 'application/json'):
162178
out = utils.unmarshal_json(http_res.text, Optional[shared.Error])
163179
res.error = out
180+
else:
181+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
164182

165183
return res
166184

@@ -193,10 +211,14 @@ def upsert_api(self, request: operations.UpsertAPIRequest) -> operations.UpsertA
193211
if utils.match_content_type(content_type, 'application/json'):
194212
out = utils.unmarshal_json(http_res.text, Optional[shared.API])
195213
res.api = out
214+
else:
215+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
196216
else:
197217
if utils.match_content_type(content_type, 'application/json'):
198218
out = utils.unmarshal_json(http_res.text, Optional[shared.Error])
199219
res.error = out
220+
else:
221+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
200222

201223
return res
202224

src/speakeasy/embeds.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from .sdkconfiguration import SDKConfiguration
44
from speakeasy import utils
5-
from speakeasy.models import operations, shared
5+
from speakeasy.models import errors, operations, shared
66
from typing import Optional
77

88
class Embeds:
@@ -37,10 +37,14 @@ def get_embed_access_token(self, request: operations.GetEmbedAccessTokenRequest)
3737
if utils.match_content_type(content_type, 'application/json'):
3838
out = utils.unmarshal_json(http_res.text, Optional[shared.EmbedAccessTokenResponse])
3939
res.embed_access_token_response = out
40+
else:
41+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
4042
else:
4143
if utils.match_content_type(content_type, 'application/json'):
4244
out = utils.unmarshal_json(http_res.text, Optional[shared.Error])
4345
res.error = out
46+
else:
47+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
4448

4549
return res
4650

@@ -65,10 +69,14 @@ def get_valid_embed_access_tokens(self) -> operations.GetValidEmbedAccessTokensR
6569
if utils.match_content_type(content_type, 'application/json'):
6670
out = utils.unmarshal_json(http_res.text, Optional[list[shared.EmbedToken]])
6771
res.embed_tokens = out
72+
else:
73+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
6874
else:
6975
if utils.match_content_type(content_type, 'application/json'):
7076
out = utils.unmarshal_json(http_res.text, Optional[shared.Error])
7177
res.error = out
78+
else:
79+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
7280

7381
return res
7482

@@ -95,6 +103,8 @@ def revoke_embed_access_token(self, request: operations.RevokeEmbedAccessTokenRe
95103
if utils.match_content_type(content_type, 'application/json'):
96104
out = utils.unmarshal_json(http_res.text, Optional[shared.Error])
97105
res.error = out
106+
else:
107+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
98108

99109
return res
100110

src/speakeasy/metadata.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from .sdkconfiguration import SDKConfiguration
44
from speakeasy import utils
5-
from speakeasy.models import operations, shared
5+
from speakeasy.models import errors, operations, shared
66
from typing import Optional
77

88
class Metadata:
@@ -35,6 +35,8 @@ def delete_version_metadata(self, request: operations.DeleteVersionMetadataReque
3535
if utils.match_content_type(content_type, 'application/json'):
3636
out = utils.unmarshal_json(http_res.text, Optional[shared.Error])
3737
res.error = out
38+
else:
39+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
3840

3941
return res
4042

@@ -59,10 +61,14 @@ def get_version_metadata(self, request: operations.GetVersionMetadataRequest) ->
5961
if utils.match_content_type(content_type, 'application/json'):
6062
out = utils.unmarshal_json(http_res.text, Optional[list[shared.VersionMetadata]])
6163
res.version_metadata = out
64+
else:
65+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
6266
else:
6367
if utils.match_content_type(content_type, 'application/json'):
6468
out = utils.unmarshal_json(http_res.text, Optional[shared.Error])
6569
res.error = out
70+
else:
71+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
6672

6773
return res
6874

@@ -92,10 +98,14 @@ def insert_version_metadata(self, request: operations.InsertVersionMetadataReque
9298
if utils.match_content_type(content_type, 'application/json'):
9399
out = utils.unmarshal_json(http_res.text, Optional[shared.VersionMetadata])
94100
res.version_metadata = out
101+
else:
102+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
95103
else:
96104
if utils.match_content_type(content_type, 'application/json'):
97105
out = utils.unmarshal_json(http_res.text, Optional[shared.Error])
98106
res.error = out
107+
else:
108+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
99109

100110
return res
101111

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
2+
3+
from .sdkerror import SDKError
4+
__all__ = ["SDKError"]

0 commit comments

Comments
 (0)