Skip to content

Commit ff51f43

Browse files
authored
Initial merge (#14)
1 parent ab0da24 commit ff51f43

File tree

4 files changed

+13
-11
lines changed

4 files changed

+13
-11
lines changed

.github/workflows/run_sdk_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ jobs:
2222
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
2323
PACER_USER_ID: ${{ secrets.PACER_USER_ID }}
2424
PACER_CLIENT_CODE: ${{ secrets.PACER_CLIENT_CODE }}
25-
run: python test/base.py --exclude TestPacer
25+
run: cd test && python base.py --exclude TestPacer

test/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ ENV SDK_VERSION $SDK_VERSION
1919
WORKDIR /app
2020
RUN git clone https://github.com/UniCourt/enterprise-api-py-sdk.git
2121
RUN python enterprise-api-py-sdk/setup.py install
22-
RUN python enterprise-api-py-sdk/test/base.py --exclude TestPacer
22+
RUN cd enterprise-api-py-sdk/test/ && python base.py --exclude TestPacer

unicourt/api_client.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@
77
Generated by: https://openapi-generator.tech
88
"""
99

10-
# The SDK generation for GET method has boolean value issue
11-
# Refer : https://github.com/OpenAPITools/openapi-generator/issues/1260
12-
# [APIT-79] https://unicourt.atlassian.net/browse/APIT-79
13-
# To fix this issue there is a addition of parameter `method` for function `sanitize_for_serialization`
14-
# Also, added elif condition at line 288 and subsequent change in return statement in lines 241 and 245
15-
1610
import json
1711
import atexit
1812
import mimetypes
@@ -236,6 +230,9 @@ def __call_api(
236230
else:
237231
return_data = None
238232

233+
# The SDK generation for GET method has boolean value issue
234+
# Refer : https://github.com/OpenAPITools/openapi-generator/issues/1260
235+
# [APIT-79] https://unicourt.atlassian.net/browse/APIT-79
239236
if _return_http_data_only:
240237
# return (return_data)
241238
return return_data, response_data.status
@@ -265,6 +262,10 @@ def parameters_to_multipart(self, params, collection_types):
265262
new_params.append((k, v))
266263
return new_params
267264

265+
# The SDK generation for GET method has boolean value issue
266+
# Refer : https://github.com/OpenAPITools/openapi-generator/issues/1260
267+
# [APIT-79] https://unicourt.atlassian.net/browse/APIT-79
268+
# To fix this issue there is a addition of parameter `method` for function `sanitize_for_serialization`
268269
@classmethod
269270
def sanitize_for_serialization(cls, obj, method=None):
270271
"""Prepares data for transmission before it is sent with the rest client

unicourt/model_utils.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
The version of the OpenAPI document:
77
Generated by: https://openapi-generator.tech
88
"""
9-
# The SDK generation for datetime has value issue "datetime serialization format override"
10-
# Refer : https://github.com/OpenAPITools/openapi-generator/issues/14503
11-
# Fix for the datetime is done at line 179 and 919
129

1310
from datetime import date, datetime # noqa: F401
1411
from copy import deepcopy
@@ -176,6 +173,8 @@ def set_attribute(self, name, value):
176173
value,
177174
self._configuration
178175
)
176+
# The SDK generation for datetime has value issue "datetime serialization format override"
177+
# Refer : https://github.com/OpenAPITools/openapi-generator/issues/14503
179178
if type(value) == datetime or type(value) == date:
180179
self.__dict__['_data_store'][name] = str(value)
181180
else:
@@ -914,6 +913,8 @@ def check_validations(
914913
configuration (Configuration): the configuration class.
915914
"""
916915

916+
# The SDK generation for datetime has value issue "datetime serialization format override"
917+
# Refer : https://github.com/OpenAPITools/openapi-generator/issues/14503
917918
if input_values is None:
918919
return
919920
elif type(input_values) == datetime or type(input_values) == date:

0 commit comments

Comments
 (0)