Skip to content

Commit

Permalink
Initial merge
Browse files Browse the repository at this point in the history
  • Loading branch information
snehals-uc committed Feb 21, 2024
1 parent ab0da24 commit 902bd80
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run_sdk_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ jobs:
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
PACER_USER_ID: ${{ secrets.PACER_USER_ID }}
PACER_CLIENT_CODE: ${{ secrets.PACER_CLIENT_CODE }}
run: python test/base.py --exclude TestPacer
run: cd test && python base.py --exclude TestPacer
2 changes: 1 addition & 1 deletion test/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ ENV SDK_VERSION $SDK_VERSION
WORKDIR /app
RUN git clone https://github.com/UniCourt/enterprise-api-py-sdk.git
RUN python enterprise-api-py-sdk/setup.py install
RUN python enterprise-api-py-sdk/test/base.py --exclude TestPacer
RUN cd enterprise-api-py-sdk/test/ && python base.py --exclude TestPacer
13 changes: 7 additions & 6 deletions unicourt/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@
Generated by: https://openapi-generator.tech
"""

# The SDK generation for GET method has boolean value issue
# Refer : https://github.com/OpenAPITools/openapi-generator/issues/1260
# [APIT-79] https://unicourt.atlassian.net/browse/APIT-79
# To fix this issue there is a addition of parameter `method` for function `sanitize_for_serialization`
# Also, added elif condition at line 288 and subsequent change in return statement in lines 241 and 245

import json
import atexit
import mimetypes
Expand Down Expand Up @@ -236,6 +230,9 @@ def __call_api(
else:
return_data = None

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

# The SDK generation for GET method has boolean value issue
# Refer : https://github.com/OpenAPITools/openapi-generator/issues/1260
# [APIT-79] https://unicourt.atlassian.net/browse/APIT-79
# To fix this issue there is a addition of parameter `method` for function `sanitize_for_serialization`
@classmethod
def sanitize_for_serialization(cls, obj, method=None):
"""Prepares data for transmission before it is sent with the rest client
Expand Down
7 changes: 4 additions & 3 deletions unicourt/model_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
The version of the OpenAPI document:
Generated by: https://openapi-generator.tech
"""
# The SDK generation for datetime has value issue "datetime serialization format override"
# Refer : https://github.com/OpenAPITools/openapi-generator/issues/14503
# Fix for the datetime is done at line 179 and 919

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

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

0 comments on commit 902bd80

Please sign in to comment.