Skip to content

Commit 868bc7d

Browse files
committed
specify required object properties
1 parent 7dcd3f3 commit 868bc7d

File tree

7 files changed

+22
-20
lines changed

7 files changed

+22
-20
lines changed

client/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ configuration.access_token = 'YOUR_BEARER_TOKEN'
5959
configuration.host = "https://api.stitchdata.com"
6060
# Create an instance of the API class
6161
api_instance = stitch_connect_client.DestinationsApi(stitch_connect_client.ApiClient(configuration))
62-
destination_info = stitch_connect_client.DestinationInfo() # DestinationInfo | Object containing type and properties of a destination (optional)
62+
create_destination_body = stitch_connect_client.CreateDestinationBody() # CreateDestinationBody | Object containing type and properties of a destination (optional)
6363

6464
try:
6565
# Creates a new destination. Only a single destination is supported per Stitch client account.
66-
api_instance.create_destination(destination_info=destination_info)
66+
api_instance.create_destination(create_destination_body=create_destination_body)
6767
except ApiException as e:
6868
print("Exception when calling DestinationsApi->create_destination: %s\n" % e)
6969

@@ -101,10 +101,10 @@ Class | Method | HTTP request | Description
101101
- [ConnectionStepProps](docs/ConnectionStepProps.md)
102102
- [ConnectionStepPropsAnyOf](docs/ConnectionStepPropsAnyOf.md)
103103
- [ConnectionStepPropsJsonSchema](docs/ConnectionStepPropsJsonSchema.md)
104+
- [CreateDestinationBody](docs/CreateDestinationBody.md)
104105
- [CreateSourceBody](docs/CreateSourceBody.md)
105106
- [Destination](docs/Destination.md)
106107
- [DestinationFormProperties](docs/DestinationFormProperties.md)
107-
- [DestinationInfo](docs/DestinationInfo.md)
108108
- [DestinationReportCard](docs/DestinationReportCard.md)
109109
- [ErrorObject](docs/ErrorObject.md)
110110
- [ErrorObjectError](docs/ErrorObjectError.md)

client/docs/DestinationsApi.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Method | HTTP request | Description
1212

1313

1414
# **create_destination**
15-
> create_destination(destination_info=destination_info)
15+
> create_destination(create_destination_body=create_destination_body)
1616
1717
Creates a new destination. Only a single destination is supported per Stitch client account.
1818

@@ -33,11 +33,11 @@ configuration.access_token = 'YOUR_BEARER_TOKEN'
3333
configuration.host = "https://api.stitchdata.com"
3434
# Create an instance of the API class
3535
api_instance = stitch_connect_client.DestinationsApi(stitch_connect_client.ApiClient(configuration))
36-
destination_info = stitch_connect_client.DestinationInfo() # DestinationInfo | Object containing type and properties of a destination (optional)
36+
create_destination_body = stitch_connect_client.CreateDestinationBody() # CreateDestinationBody | Object containing type and properties of a destination (optional)
3737

3838
try:
3939
# Creates a new destination. Only a single destination is supported per Stitch client account.
40-
api_instance.create_destination(destination_info=destination_info)
40+
api_instance.create_destination(create_destination_body=create_destination_body)
4141
except ApiException as e:
4242
print("Exception when calling DestinationsApi->create_destination: %s\n" % e)
4343
```
@@ -46,7 +46,7 @@ except ApiException as e:
4646

4747
Name | Type | Description | Notes
4848
------------- | ------------- | ------------- | -------------
49-
**destination_info** | [**DestinationInfo**](DestinationInfo.md)| Object containing type and properties of a destination | [optional]
49+
**create_destination_body** | [**CreateDestinationBody**](CreateDestinationBody.md)| Object containing type and properties of a destination | [optional]
5050

5151
### Return type
5252

client/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` | [optional]
8-
**metadata** | [**OneOfstreamLevelMetadatafieldLevelMetadata**](OneOfstreamLevelMetadatafieldLevelMetadata.md) | An object containing metadata associated with the breadcrumb. The type of metadata object depends on the breadcrumb: For the entire schema (breadcrumb: []), this will be a Stream-level Metadata object. For an individual field (breadcrumb: [\"properties\", \"<FIELD_NAME>\"]), this will be a Field-level Metadata object | [optional]
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** | [**OneOfstreamLevelMetadatafieldLevelMetadata**](OneOfstreamLevelMetadatafieldLevelMetadata.md) | An object containing metadata associated with the breadcrumb. The type of metadata object depends on the breadcrumb: For the entire schema (breadcrumb: []), this will be a Stream-level Metadata object. For an individual field (breadcrumb: [\"properties\", \"<FIELD_NAME>\"]), this will be a Field-level Metadata object |
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

client/stitch_connect_client/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@
3737
from stitch_connect_client.models.connection_step_props import ConnectionStepProps
3838
from stitch_connect_client.models.connection_step_props_any_of import ConnectionStepPropsAnyOf
3939
from stitch_connect_client.models.connection_step_props_json_schema import ConnectionStepPropsJsonSchema
40+
from stitch_connect_client.models.create_destination_body import CreateDestinationBody
4041
from stitch_connect_client.models.create_source_body import CreateSourceBody
4142
from stitch_connect_client.models.destination import Destination
4243
from stitch_connect_client.models.destination_form_properties import DestinationFormProperties
43-
from stitch_connect_client.models.destination_info import DestinationInfo
4444
from stitch_connect_client.models.destination_report_card import DestinationReportCard
4545
from stitch_connect_client.models.error_object import ErrorObject
4646
from stitch_connect_client.models.error_object_error import ErrorObjectError

client/stitch_connect_client/api/destinations_api.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def create_destination(self, **kwargs): # noqa: E501
4545
>>> result = thread.get()
4646
4747
:param async_req bool: execute request asynchronously
48-
:param DestinationInfo destination_info: Object containing type and properties of a destination
48+
:param CreateDestinationBody create_destination_body: Object containing type and properties of a destination
4949
:param _preload_content: if False, the urllib3.HTTPResponse object will
5050
be returned without reading/decoding response
5151
data. Default is True.
@@ -69,7 +69,7 @@ def create_destination_with_http_info(self, **kwargs): # noqa: E501
6969
>>> result = thread.get()
7070
7171
:param async_req bool: execute request asynchronously
72-
:param DestinationInfo destination_info: Object containing type and properties of a destination
72+
:param CreateDestinationBody create_destination_body: Object containing type and properties of a destination
7373
:param _return_http_data_only: response data without head status code
7474
and headers
7575
:param _preload_content: if False, the urllib3.HTTPResponse object will
@@ -86,7 +86,7 @@ def create_destination_with_http_info(self, **kwargs): # noqa: E501
8686

8787
local_var_params = locals()
8888

89-
all_params = ['destination_info'] # noqa: E501
89+
all_params = ['create_destination_body'] # noqa: E501
9090
all_params.append('async_req')
9191
all_params.append('_return_http_data_only')
9292
all_params.append('_preload_content')
@@ -113,8 +113,8 @@ def create_destination_with_http_info(self, **kwargs): # noqa: E501
113113
local_var_files = {}
114114

115115
body_params = None
116-
if 'destination_info' in local_var_params:
117-
body_params = local_var_params['destination_info']
116+
if 'create_destination_body' in local_var_params:
117+
body_params = local_var_params['create_destination_body']
118118
# HTTP header `Content-Type`
119119
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
120120
['application/json']) # noqa: E501

client/stitch_connect_client/models/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
from stitch_connect_client.models.connection_step_props import ConnectionStepProps
2222
from stitch_connect_client.models.connection_step_props_any_of import ConnectionStepPropsAnyOf
2323
from stitch_connect_client.models.connection_step_props_json_schema import ConnectionStepPropsJsonSchema
24+
from stitch_connect_client.models.create_destination_body import CreateDestinationBody
2425
from stitch_connect_client.models.create_source_body import CreateSourceBody
2526
from stitch_connect_client.models.destination import Destination
2627
from stitch_connect_client.models.destination_form_properties import DestinationFormProperties
27-
from stitch_connect_client.models.destination_info import DestinationInfo
2828
from stitch_connect_client.models.destination_report_card import DestinationReportCard
2929
from stitch_connect_client.models.error_object import ErrorObject
3030
from stitch_connect_client.models.error_object_error import ErrorObjectError

client/stitch_connect_client/models/metadata.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,8 @@ def __init__(self, breadcrumbs=None, metadata=None, local_vars_configuration=Non
5252
self._metadata = None
5353
self.discriminator = None
5454

55-
if breadcrumbs is not None:
56-
self.breadcrumbs = breadcrumbs
57-
if metadata is not None:
58-
self.metadata = metadata
55+
self.breadcrumbs = breadcrumbs
56+
self.metadata = metadata
5957

6058
@property
6159
def breadcrumbs(self):
@@ -77,6 +75,8 @@ def breadcrumbs(self, breadcrumbs):
7775
:param breadcrumbs: The breadcrumbs of this Metadata. # noqa: E501
7876
:type: list[str]
7977
"""
78+
if self.local_vars_configuration.client_side_validation and breadcrumbs is None: # noqa: E501
79+
raise ValueError("Invalid value for `breadcrumbs`, must not be `None`") # noqa: E501
8080

8181
self._breadcrumbs = breadcrumbs
8282

@@ -100,6 +100,8 @@ def metadata(self, metadata):
100100
:param metadata: The metadata of this Metadata. # noqa: E501
101101
:type: OneOfstreamLevelMetadatafieldLevelMetadata
102102
"""
103+
if self.local_vars_configuration.client_side_validation and metadata is None: # noqa: E501
104+
raise ValueError("Invalid value for `metadata`, must not be `None`") # noqa: E501
103105

104106
self._metadata = metadata
105107

0 commit comments

Comments
 (0)