Skip to content

Commit 2c25321

Browse files
committed
update package with spec
1 parent 75587cc commit 2c25321

File tree

16 files changed

+280
-61
lines changed

16 files changed

+280
-61
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ https://www.stitchdata.com/docs/developers/stitch-connect/api
77
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
88

99
- API version: 0.1
10-
- Package version: 0.1.2
10+
- Package version: 0.1.3
1111
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
1212

1313
Table of Contents:
@@ -108,6 +108,7 @@ Class | Method | HTTP request | Description
108108
- [Stream](docs/Stream.md)
109109
- [StreamLevelMetadata](docs/StreamLevelMetadata.md)
110110
- [StreamSchema](docs/StreamSchema.md)
111+
- [StreamsUpdate](docs/StreamsUpdate.md)
111112
- [UpdateSourceBody](docs/UpdateSourceBody.md)
112113

113114

@@ -145,6 +146,6 @@ npx openapi-generator generate \
145146
--package-name stitch_connect_client \
146147
--git-user-id NarrativeScience \
147148
--git-repo-id stitch-connect-python \
148-
-p packageVersion=0.1.2 \
149+
-p packageVersion=0.1.3 \
149150
-t templates
150151
```

docs/Metadata.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ A Metadata object describes a stream’s schema and the current state of its con
44
## Properties
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**breadcrumbs** | **list[str]** | An array of strings describing a path into the schema. For example: A value of [] refers to the entire schema, or stream A value of [\"properties\", \"<FIELD_NAME>\"] refers to the properties.<FIELD_NAME> portion of the schema. For example: [\"properties\", \"id\"] would refer to a field named `id` |
8-
**metadata_object** | [**MetadataObject**](MetadataObject.md) | |
7+
**breadcrumb** | **list[str]** | An array of strings describing a path into the schema. For example: A value of [] refers to the entire schema, or stream A value of [\"properties\", \"<FIELD_NAME>\"] refers to the properties.<FIELD_NAME> portion of the schema. For example: [\"properties\", \"id\"] would refer to a field named `id` |
8+
**metadata** | [**MetadataObject**](MetadataObject.md) | |
99

1010
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1111

docs/Stream.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
88
**selected** | **bool** | Indicates if the stream is selected for replication. Possible values are: null - Only present if a stream has never been selected. Otherwise, this value will be true if selected, and false if de-selected. true - The stream is selected and data will be replicated for all selected fields false - The stream is not selected and data for this stream will not be replicated | [optional]
99
**stream_name** | **str** | The name of the stream. This value may not be unique. For example: A database with multiple schemas can have the same stream name in multiple schemas. | [optional]
1010
**tap_stream_id** | **str** | The unique version of the stream name. For database sources, this value will be the database name, schema name, and table name, combined. | [optional]
11-
**metadata** | [**StreamLevelMetadata**](StreamLevelMetadata.md) | | [optional]
11+
**metadata** | [**list[StreamLevelMetadata]**](StreamLevelMetadata.md) | | [optional]
1212

1313
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1414

docs/StreamsApi.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ Name | Type | Description | Notes
129129
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
130130

131131
# **update_stream_metadata**
132-
> update_stream_metadata(source_id, stream)
132+
> update_stream_metadata(source_id, streams_update)
133133
134134
Updates the metadata for streams and fields. This endpoint is used to define the metadata properties returned in the Stream Schema object’s non-discoverable-metadata-keys property.
135135

@@ -151,11 +151,11 @@ configuration.host = "https://api.stitchdata.com"
151151
# Create an instance of the API class
152152
api_instance = stitch_connect_client.StreamsApi(stitch_connect_client.ApiClient(configuration))
153153
source_id = 'source_id_example' # str | The ID of the source
154-
stream = [stitch_connect_client.Stream()] # list[Stream] | Array of streams to update metadata for
154+
streams_update = stitch_connect_client.StreamsUpdate() # StreamsUpdate | Array of streams to update metadata for
155155

156156
try:
157157
# Updates the metadata for streams and fields. This endpoint is used to define the metadata properties returned in the Stream Schema object’s non-discoverable-metadata-keys property.
158-
api_instance.update_stream_metadata(source_id, stream)
158+
api_instance.update_stream_metadata(source_id, streams_update)
159159
except ApiException as e:
160160
print("Exception when calling StreamsApi->update_stream_metadata: %s\n" % e)
161161
```
@@ -165,7 +165,7 @@ except ApiException as e:
165165
Name | Type | Description | Notes
166166
------------- | ------------- | ------------- | -------------
167167
**source_id** | **str**| The ID of the source |
168-
**stream** | [**list[Stream]**](Stream.md)| Array of streams to update metadata for |
168+
**streams_update** | [**StreamsUpdate**](StreamsUpdate.md)| Array of streams to update metadata for |
169169

170170
### Return type
171171

docs/StreamsUpdate.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# StreamsUpdate
2+
3+
Object containing a list of stream objects with information to update
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**streams** | [**list[Stream]**](Stream.md) | List of Streams to update | [optional]
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+
11+

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from setuptools import setup, find_packages # noqa: H301
1414

1515
NAME = "stitch-connect-client"
16-
VERSION = "0.1.2"
16+
VERSION = "0.1.3"
1717
# To install the library, run the following
1818
#
1919
# python setup.py install

stitch_connect_client/__init__.py

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

1515
from __future__ import absolute_import
1616

17-
__version__ = "0.1.2"
17+
__version__ = "0.1.3"
1818

1919
# import apis into sdk package
2020
from stitch_connect_client.api.destinations_api import DestinationsApi
@@ -60,5 +60,6 @@
6060
from stitch_connect_client.models.stream import Stream
6161
from stitch_connect_client.models.stream_level_metadata import StreamLevelMetadata
6262
from stitch_connect_client.models.stream_schema import StreamSchema
63+
from stitch_connect_client.models.streams_update import StreamsUpdate
6364
from stitch_connect_client.models.update_source_body import UpdateSourceBody
6465

stitch_connect_client/api/streams_api.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -256,17 +256,17 @@ def get_streams_with_http_info(self, source_id, **kwargs): # noqa: E501
256256
_request_timeout=local_var_params.get('_request_timeout'),
257257
collection_formats=collection_formats)
258258

259-
def update_stream_metadata(self, source_id, stream, **kwargs): # noqa: E501
259+
def update_stream_metadata(self, source_id, streams_update, **kwargs): # noqa: E501
260260
"""Updates the metadata for streams and fields. This endpoint is used to define the metadata properties returned in the Stream Schema object’s non-discoverable-metadata-keys property. # noqa: E501
261261
262262
This method makes a synchronous HTTP request by default. To make an
263263
asynchronous HTTP request, please pass async_req=True
264-
>>> thread = api.update_stream_metadata(source_id, stream, async_req=True)
264+
>>> thread = api.update_stream_metadata(source_id, streams_update, async_req=True)
265265
>>> result = thread.get()
266266
267267
:param async_req bool: execute request asynchronously
268268
:param str source_id: The ID of the source (required)
269-
:param list[Stream] stream: Array of streams to update metadata for (required)
269+
:param StreamsUpdate streams_update: Array of streams to update metadata for (required)
270270
:param _preload_content: if False, the urllib3.HTTPResponse object will
271271
be returned without reading/decoding response
272272
data. Default is True.
@@ -279,19 +279,19 @@ def update_stream_metadata(self, source_id, stream, **kwargs): # noqa: E501
279279
returns the request thread.
280280
"""
281281
kwargs['_return_http_data_only'] = True
282-
return self.update_stream_metadata_with_http_info(source_id, stream, **kwargs) # noqa: E501
282+
return self.update_stream_metadata_with_http_info(source_id, streams_update, **kwargs) # noqa: E501
283283

284-
def update_stream_metadata_with_http_info(self, source_id, stream, **kwargs): # noqa: E501
284+
def update_stream_metadata_with_http_info(self, source_id, streams_update, **kwargs): # noqa: E501
285285
"""Updates the metadata for streams and fields. This endpoint is used to define the metadata properties returned in the Stream Schema object’s non-discoverable-metadata-keys property. # noqa: E501
286286
287287
This method makes a synchronous HTTP request by default. To make an
288288
asynchronous HTTP request, please pass async_req=True
289-
>>> thread = api.update_stream_metadata_with_http_info(source_id, stream, async_req=True)
289+
>>> thread = api.update_stream_metadata_with_http_info(source_id, streams_update, async_req=True)
290290
>>> result = thread.get()
291291
292292
:param async_req bool: execute request asynchronously
293293
:param str source_id: The ID of the source (required)
294-
:param list[Stream] stream: Array of streams to update metadata for (required)
294+
:param StreamsUpdate streams_update: Array of streams to update metadata for (required)
295295
:param _return_http_data_only: response data without head status code
296296
and headers
297297
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -308,7 +308,7 @@ def update_stream_metadata_with_http_info(self, source_id, stream, **kwargs): #
308308

309309
local_var_params = locals()
310310

311-
all_params = ['source_id', 'stream'] # noqa: E501
311+
all_params = ['source_id', 'streams_update'] # noqa: E501
312312
all_params.append('async_req')
313313
all_params.append('_return_http_data_only')
314314
all_params.append('_preload_content')
@@ -326,10 +326,10 @@ def update_stream_metadata_with_http_info(self, source_id, stream, **kwargs): #
326326
if self.api_client.client_side_validation and ('source_id' not in local_var_params or # noqa: E501
327327
local_var_params['source_id'] is None): # noqa: E501
328328
raise ApiValueError("Missing the required parameter `source_id` when calling `update_stream_metadata`") # noqa: E501
329-
# verify the required parameter 'stream' is set
330-
if self.api_client.client_side_validation and ('stream' not in local_var_params or # noqa: E501
331-
local_var_params['stream'] is None): # noqa: E501
332-
raise ApiValueError("Missing the required parameter `stream` when calling `update_stream_metadata`") # noqa: E501
329+
# verify the required parameter 'streams_update' is set
330+
if self.api_client.client_side_validation and ('streams_update' not in local_var_params or # noqa: E501
331+
local_var_params['streams_update'] is None): # noqa: E501
332+
raise ApiValueError("Missing the required parameter `streams_update` when calling `update_stream_metadata`") # noqa: E501
333333

334334
collection_formats = {}
335335

@@ -345,8 +345,8 @@ def update_stream_metadata_with_http_info(self, source_id, stream, **kwargs): #
345345
local_var_files = {}
346346

347347
body_params = None
348-
if 'stream' in local_var_params:
349-
body_params = local_var_params['stream']
348+
if 'streams_update' in local_var_params:
349+
body_params = local_var_params['streams_update']
350350
# HTTP header `Content-Type`
351351
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
352352
['application/json']) # noqa: E501

stitch_connect_client/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
7777
self.default_headers[header_name] = header_value
7878
self.cookie = cookie
7979
# Set default User-Agent.
80-
self.user_agent = 'OpenAPI-Generator/0.1.2/python'
80+
self.user_agent = 'OpenAPI-Generator/0.1.3/python'
8181
self.client_side_validation = configuration.client_side_validation
8282

8383
def __del__(self):

stitch_connect_client/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def to_debug_report(self):
260260
"OS: {env}\n"\
261261
"Python Version: {pyversion}\n"\
262262
"Version of the API: 0.1\n"\
263-
"SDK Package Version: 0.1.2".\
263+
"SDK Package Version: 0.1.3".\
264264
format(env=sys.platform, pyversion=sys.version)
265265

266266
def get_host_settings(self):

0 commit comments

Comments
 (0)