Skip to content

Commit f2a03a1

Browse files
authored
fix: Parse dateCreated in ImportSettingsDTO manually
Phrase changed date format to "Jan 9, 2024 9:52:37 AM" (#10)
1 parent 1faba41 commit f2a03a1

File tree

6 files changed

+7
-6
lines changed

6 files changed

+7
-6
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Please, include the `User-Agent` header with the name of your application or pro
1313
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
1414

1515
- API version: Latest
16-
- Package version: 0.3.4
16+
- Package version: 0.3.5
1717
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
1818

1919
## Requirements.

phrasetms_client/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"""
1515

1616

17-
__version__ = "0.3.4"
17+
__version__ = "0.3.5"
1818

1919
# import apis into sdk package
2020
from phrasetms_client.api.additional_workflow_step_api import AdditionalWorkflowStepApi

phrasetms_client/configuration.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ def to_debug_report(self):
423423
"OS: {env}\n"
424424
"Python Version: {pyversion}\n"
425425
"Version of the API: Latest\n"
426-
"SDK Package Version: 0.3.4".format(env=sys.platform, pyversion=sys.version)
426+
"SDK Package Version: 0.3.5".format(env=sys.platform, pyversion=sys.version)
427427
)
428428

429429
def get_host_settings(self):

phrasetms_client/models/import_settings_dto.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import json
1919

2020
from datetime import datetime
21+
from dateutil.parser import parse
2122
from typing import Optional
2223
from pydantic import BaseModel, Field, StrictStr
2324
from phrasetms_client.models.file_import_settings_dto import FileImportSettingsDto
@@ -79,7 +80,7 @@ def from_dict(cls, obj: dict) -> ImportSettingsDto:
7980
"uid": obj.get("uid"),
8081
"name": obj.get("name"),
8182
"created_by": UserReference.from_dict(obj.get("createdBy")) if obj.get("createdBy") is not None else None,
82-
"date_created": obj.get("dateCreated"),
83+
"date_created": parse(obj.get("dateCreated")),
8384
"file_import_settings": FileImportSettingsDto.from_dict(obj.get("fileImportSettings")) if obj.get("fileImportSettings") is not None else None
8485
})
8586
return _obj

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "phrasetms_client"
3-
version = "0.3.4"
3+
version = "0.3.5"
44
description = "Phrase TMS API"
55
authors = ["Martin Chrástek"]
66
license = "NoLicense"

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# prerequisite: setuptools
2222
# http://pypi.python.org/pypi/setuptools
2323
NAME = "phrasetms-client"
24-
VERSION = "0.3.4"
24+
VERSION = "0.3.5"
2525
PYTHON_REQUIRES = ">=3.7"
2626
REQUIRES = ["urllib3 >= 1.25.3", "python-dateutil", "pydantic >= 1.10.5, < 2", "aenum"]
2727

0 commit comments

Comments
 (0)