Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Please, include the `User-Agent` header with the name of your application or pro
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: Latest
- Package version: 0.3.0
- Package version: 0.3.1
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

## Requirements.
Expand Down
2 changes: 1 addition & 1 deletion phrasetms_client/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"""


__version__ = "0.3.0"
__version__ = "0.3.1"

# import apis into sdk package
from phrasetms_client.api.additional_workflow_step_api import AdditionalWorkflowStepApi
Expand Down
2 changes: 1 addition & 1 deletion phrasetms_client/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ def to_debug_report(self):
"OS: {env}\n"
"Python Version: {pyversion}\n"
"Version of the API: Latest\n"
"SDK Package Version: 0.3.0".format(env=sys.platform, pyversion=sys.version)
"SDK Package Version: 0.3.1".format(env=sys.platform, pyversion=sys.version)
)

def get_host_settings(self):
Expand Down
3 changes: 2 additions & 1 deletion phrasetms_client/models/job_create_request_dto.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from phrasetms_client.models.providers_per_language import ProvidersPerLanguage
from phrasetms_client.models.uid_reference import UidReference
from phrasetms_client.models.workflow_step_configuration import WorkflowStepConfiguration
from phrasetms_client.utils import DateTimeEncoder

class JobCreateRequestDto(BaseModel):
"""
Expand Down Expand Up @@ -54,7 +55,7 @@ def to_str(self) -> str:

def to_json(self) -> str:
"""Returns the JSON representation of the model using alias"""
return json.dumps(self.to_dict())
return json.dumps(self.to_dict(), cls=DateTimeEncoder)

@classmethod
def from_json(cls, json_str: str) -> JobCreateRequestDto:
Expand Down
9 changes: 9 additions & 0 deletions phrasetms_client/utils.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from datetime import datetime
import json

class DateTimeEncoder(json.JSONEncoder):
def default(self, o):
if isinstance(o, datetime):
return o.isoformat()

return super().default(o)
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "phrasetms_client"
version = "0.3.0"
version = "0.3.1"
description = "Phrase TMS API"
authors = ["Martin Chrástek"]
license = "NoLicense"
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools
NAME = "phrasetms-client"
VERSION = "0.3.0"
VERSION = "0.3.1"
PYTHON_REQUIRES = ">=3.7"
REQUIRES = ["urllib3 >= 1.25.3", "python-dateutil", "pydantic >= 1.10.5, < 2", "aenum"]

Expand Down