Skip to content

Commit 5f74ca8

Browse files
committed
ci: regenerated with OpenAPI Doc 1.0.0, Speakeay CLI 1.61.0
1 parent 804e323 commit 5f74ca8

File tree

14 files changed

+100
-14
lines changed

14 files changed

+100
-14
lines changed

RELEASES.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,4 +350,12 @@ Based on:
350350
- OpenAPI Doc 1.0.0
351351
- Speakeasy CLI 1.59.0 (2.65.0) https://github.com/speakeasy-api/speakeasy
352352
### Releases
353-
- [PyPI v0.23.0] https://pypi.org/project/airbyte-api/0.23.0 - .
353+
- [PyPI v0.23.0] https://pypi.org/project/airbyte-api/0.23.0 - .
354+
355+
## 2023-07-18 00:23:32
356+
### Changes
357+
Based on:
358+
- OpenAPI Doc 1.0.0
359+
- Speakeasy CLI 1.61.0 (2.70.0) https://github.com/speakeasy-api/speakeasy
360+
### Releases
361+
- [PyPI v0.24.0] https://pypi.org/project/airbyte-api/0.24.0 - .

files.gen

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ pylintrc
1010
setup.py
1111
src/airbyte/__init__.py
1212
src/airbyte/models/__init__.py
13+
src/airbyte/models/errors/sdkerror.py
1314
src/airbyte/utils/__init__.py
1415
src/airbyte/utils/retries.py
1516
src/airbyte/utils/utils.py
@@ -365,6 +366,7 @@ src/airbyte/models/shared/workspacesresponse.py
365366
src/airbyte/models/shared/workspaceupdaterequest.py
366367
src/airbyte/models/shared/security.py
367368
src/airbyte/models/shared/__init__.py
369+
src/airbyte/models/errors/__init__.py
368370
docs/sdks/airbyte/README.md
369371
docs/sdks/connections/README.md
370372
docs/sdks/destinations/README.md

gen.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ configVersion: 1.0.0
22
management:
33
docChecksum: bb2011e16a0ec78eb8a13a803e08b4aa
44
docVersion: 1.0.0
5-
speakeasyVersion: 1.59.0
6-
generationVersion: 2.65.0
5+
speakeasyVersion: 1.61.0
6+
generationVersion: 2.70.0
77
generation:
88
comments:
99
disableComments: false
@@ -14,7 +14,7 @@ generation:
1414
tagNamespacingDisabled: false
1515
telemetryEnabled: true
1616
python:
17-
version: 0.23.0
17+
version: 0.24.0
1818
author: Airbyte
1919
description: Python Client SDK for Airbyte API
2020
maxMethodParams: 0

pylintrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,9 @@ disable=raw-checker-failed,
438438
using-constant-test,
439439
too-many-statements,
440440
cyclic-import,
441-
too-many-nested-blocks
441+
too-many-nested-blocks,
442+
too-many-boolean-expressions,
443+
no-else-raise
442444

443445
# Enable the message, report, category or checker with the given id(s). You can
444446
# 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="airbyte-api",
13-
version="0.23.0",
13+
version="0.24.0",
1414
author="Airbyte",
1515
description="Python Client SDK for Airbyte API",
1616
long_description=long_description,

src/airbyte/connections.py

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

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

88
class Connections:
@@ -37,6 +37,8 @@ def create_connection(self, request: shared.ConnectionCreateRequest) -> operatio
3737
if utils.match_content_type(content_type, 'application/json'):
3838
out = utils.unmarshal_json(http_res.text, Optional[shared.ConnectionResponse])
3939
res.connection_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
elif http_res.status_code in [400, 403]:
4143
pass
4244

@@ -83,6 +85,8 @@ def get_connection(self, request: operations.GetConnectionRequest) -> operations
8385
if utils.match_content_type(content_type, 'application/json'):
8486
out = utils.unmarshal_json(http_res.text, Optional[shared.ConnectionResponse])
8587
res.connection_response = out
88+
else:
89+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
8690
elif http_res.status_code in [403, 404]:
8791
pass
8892

@@ -110,6 +114,8 @@ def list_connections(self, request: operations.ListConnectionsRequest) -> operat
110114
if utils.match_content_type(content_type, 'application/json'):
111115
out = utils.unmarshal_json(http_res.text, Optional[shared.ConnectionsResponse])
112116
res.connections_response = out
117+
else:
118+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
113119
elif http_res.status_code in [403, 404]:
114120
pass
115121

@@ -141,6 +147,8 @@ def patch_connection(self, request: operations.PatchConnectionRequest) -> operat
141147
if utils.match_content_type(content_type, 'application/json'):
142148
out = utils.unmarshal_json(http_res.text, Optional[shared.ConnectionResponse])
143149
res.connection_response = out
150+
else:
151+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
144152
elif http_res.status_code in [403, 404]:
145153
pass
146154

src/airbyte/destinations.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 airbyte import utils
5-
from airbyte.models import operations, shared
5+
from airbyte.models import errors, operations, shared
66
from typing import Optional
77

88
class Destinations:
@@ -37,6 +37,8 @@ def create_destination(self, request: shared.DestinationCreateRequest) -> operat
3737
if utils.match_content_type(content_type, 'application/json'):
3838
out = utils.unmarshal_json(http_res.text, Optional[shared.DestinationResponse])
3939
res.destination_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
elif http_res.status_code in [400, 403, 404]:
4143
pass
4244

@@ -83,6 +85,8 @@ def get_destination(self, request: operations.GetDestinationRequest) -> operatio
8385
if utils.match_content_type(content_type, 'application/json'):
8486
out = utils.unmarshal_json(http_res.text, Optional[shared.DestinationResponse])
8587
res.destination_response = out
88+
else:
89+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
8690
elif http_res.status_code in [403, 404]:
8791
pass
8892

@@ -110,6 +114,8 @@ def list_destinations(self, request: operations.ListDestinationsRequest) -> oper
110114
if utils.match_content_type(content_type, 'application/json'):
111115
out = utils.unmarshal_json(http_res.text, Optional[shared.DestinationsResponse])
112116
res.destinations_response = out
117+
else:
118+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
113119
elif http_res.status_code in [403, 404]:
114120
pass
115121

@@ -139,6 +145,8 @@ def patch_destination(self, request: operations.PatchDestinationRequest) -> oper
139145
if utils.match_content_type(content_type, 'application/json'):
140146
out = utils.unmarshal_json(http_res.text, Optional[shared.DestinationResponse])
141147
res.destination_response = out
148+
else:
149+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
142150
elif http_res.status_code in [403, 404]:
143151
pass
144152

@@ -168,6 +176,8 @@ def put_destination(self, request: operations.PutDestinationRequest) -> operatio
168176
if utils.match_content_type(content_type, 'application/json'):
169177
out = utils.unmarshal_json(http_res.text, Optional[shared.DestinationResponse])
170178
res.destination_response = out
179+
else:
180+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
171181
elif http_res.status_code in [403, 404]:
172182
pass
173183

src/airbyte/jobs.py

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

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

88
class Jobs:
@@ -32,6 +32,8 @@ def cancel_job(self, request: operations.CancelJobRequest) -> operations.CancelJ
3232
if utils.match_content_type(content_type, 'application/json'):
3333
out = utils.unmarshal_json(http_res.text, Optional[shared.JobResponse])
3434
res.job_response = out
35+
else:
36+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
3537
elif http_res.status_code in [403, 404]:
3638
pass
3739

@@ -63,6 +65,8 @@ def create_job(self, request: shared.JobCreateRequest) -> operations.CreateJobRe
6365
if utils.match_content_type(content_type, 'application/json'):
6466
out = utils.unmarshal_json(http_res.text, Optional[shared.JobResponse])
6567
res.job_response = out
68+
else:
69+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
6670
elif http_res.status_code in [400, 403]:
6771
pass
6872

@@ -89,6 +93,8 @@ def get_job(self, request: operations.GetJobRequest) -> operations.GetJobRespons
8993
if utils.match_content_type(content_type, 'application/json'):
9094
out = utils.unmarshal_json(http_res.text, Optional[shared.JobResponse])
9195
res.job_response = out
96+
else:
97+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
9298
elif http_res.status_code in [403, 404]:
9399
pass
94100

@@ -116,6 +122,8 @@ def list_jobs(self, request: operations.ListJobsRequest) -> operations.ListJobsR
116122
if utils.match_content_type(content_type, 'application/json'):
117123
out = utils.unmarshal_json(http_res.text, Optional[shared.JobsResponse])
118124
res.jobs_response = out
125+
else:
126+
raise errors.SDKError(f'unknown content-type received: {content_type}', http_res.status_code, http_res.text, http_res)
119127
elif http_res.status_code == 403:
120128
pass
121129

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"]
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""
2+
3+
import requests as requests_http
4+
5+
6+
class SDKError(Exception):
7+
"""Represents an error returned by the API."""
8+
message: str
9+
status_code: int
10+
body: str
11+
raw_response: requests_http.Response
12+
13+
def __init__(self, message: str, status_code: int, body: str, raw_response: requests_http.Response):
14+
self.message = message
15+
self.status_code = status_code
16+
self.body = body
17+
self.raw_response = raw_response
18+
19+
def __str__(self):
20+
body = ''
21+
if len(self.body) > 0:
22+
body = f'\n{self.body}'
23+
24+
return f'{self.message}: Status {self.status_code}{body}'

0 commit comments

Comments
 (0)