Skip to content

Commit cd033af

Browse files
committed
fix(breadbox): client body keyword mismatch
I think the recent pydantic upgrade changed some of the auto-generated breadbox client's parameters from `json_body` to `body`, so I am updating the facade pass in the correct parameters.
1 parent 08b53db commit cd033af

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

breadbox-client/breadbox_facade/client.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def get_dataset_data(
155155
breadbox_response = get_dataset_data_client.sync_detailed(
156156
dataset_id=dataset_id,
157157
client=self.client,
158-
json_body=request_params,
158+
body=request_params,
159159
)
160160
response = self._parse_client_response(breadbox_response)
161161
try:
@@ -196,7 +196,7 @@ def upload_file(self, file_handle: io.BytesIO, mime_type="text/csv", chunk_size=
196196

197197
breadbox_response = upload_file.sync_detailed(
198198
client=self.client,
199-
multipart_data=BodyUploadFile(
199+
body=BodyUploadFile(
200200
file=File(
201201
payload=io.BytesIO(chunk),
202202
file_name="unnamed",
@@ -250,7 +250,7 @@ def add_table_dataset(
250250
)
251251
breadbox_response = add_dataset_uploads_client.sync_detailed(
252252
client=self.client,
253-
json_body=params,
253+
body=params,
254254
)
255255
breadbox_response_ = typing.cast(AddDatasetResponse, self._parse_client_response(breadbox_response))
256256
result = self.await_task_result(breadbox_response_.id, timeout=timeout)
@@ -294,7 +294,7 @@ def add_matrix_dataset(
294294
)
295295
breadbox_response = add_dataset_uploads_client.sync_detailed(
296296
client=self.client,
297-
json_body=params,
297+
body=params,
298298
)
299299
breadbox_response_ = typing.cast(AddDatasetResponse, self._parse_client_response(breadbox_response))
300300
result = self.await_task_result(breadbox_response_.id, timeout=timeout)
@@ -335,13 +335,13 @@ def add_dimension_type(self, name: str, id_column: str, axis: Union[AddDimension
335335

336336
params = AddDimensionType(axis=axis, id_column=id_column, name=name)
337337

338-
breadbox_response = add_dimension_type_client.sync_detailed(client=self.client, json_body=params)
338+
breadbox_response = add_dimension_type_client.sync_detailed(client=self.client, body=params)
339339
return self._parse_client_response(breadbox_response)
340340

341341
def update_dimension_type(self, name: str, metadata_dataset_id: str, properties_to_index: List[str]):
342342
params = UpdateDimensionType(metadata_dataset_id, properties_to_index)
343343

344-
breadbox_response = update_dimension_type_client.sync_detailed(name=name, client=self.client, json_body=params)
344+
breadbox_response = update_dimension_type_client.sync_detailed(name=name, client=self.client, body=params)
345345
return self._parse_client_response(breadbox_response)
346346

347347
def get_dimension_types(self):
@@ -552,7 +552,7 @@ def compute_univariate_associations(
552552
)
553553
)
554554
# Convert the breadbox task status response into the similar format used by the legacy portal
555-
breadbox_response = compute_univariate_associations_client.sync_detailed(client=self.client, json_body=params)
555+
breadbox_response = compute_univariate_associations_client.sync_detailed(client=self.client, body=params)
556556
return self._parse_client_response(breadbox_response)
557557

558558
# OTHER

0 commit comments

Comments
 (0)