From ff51f43beaa0b40527ad6f31b24bc62ea770521a Mon Sep 17 00:00:00 2001 From: Snehal Sakhardande <46550209+snehals-uc@users.noreply.github.com> Date: Fri, 23 Feb 2024 10:23:47 +0530 Subject: [PATCH] Initial merge (#14) --- .github/workflows/run_sdk_test.yml | 2 +- test/Dockerfile | 2 +- unicourt/api_client.py | 13 +++++++------ unicourt/model_utils.py | 7 ++++--- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/run_sdk_test.yml b/.github/workflows/run_sdk_test.yml index 3a2ce83..33f9674 100644 --- a/.github/workflows/run_sdk_test.yml +++ b/.github/workflows/run_sdk_test.yml @@ -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 \ No newline at end of file + run: cd test && python base.py --exclude TestPacer \ No newline at end of file diff --git a/test/Dockerfile b/test/Dockerfile index 26e92e5..9440303 100644 --- a/test/Dockerfile +++ b/test/Dockerfile @@ -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 \ No newline at end of file +RUN cd enterprise-api-py-sdk/test/ && python base.py --exclude TestPacer \ No newline at end of file diff --git a/unicourt/api_client.py b/unicourt/api_client.py index 6aa6ff8..6792578 100755 --- a/unicourt/api_client.py +++ b/unicourt/api_client.py @@ -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 @@ -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 @@ -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 diff --git a/unicourt/model_utils.py b/unicourt/model_utils.py index 290d1e2..545d12c 100755 --- a/unicourt/model_utils.py +++ b/unicourt/model_utils.py @@ -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 @@ -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: @@ -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: