From 875aee6902bb5c8210137499511df62ff56563eb Mon Sep 17 00:00:00 2001 From: Miwory Date: Thu, 27 Nov 2025 00:05:54 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=BF=D1=8B=D1=82=D0=BA=D0=B0=20?= =?UTF-8?q?=D0=BF=D0=BE=D1=84=D0=B8=D0=BA=D1=81=D0=B8=D1=82=D1=8C=20=D1=8D?= =?UTF-8?q?=D0=BB=D0=B8=D0=B0=D1=81=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 2 +- src/osuclient/schema.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index cd21e03..45cd18f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "osuclient" -version = "0.5.4" +version = "0.5.5" description = "Client for osu! API" readme = "README.md" authors = [ diff --git a/src/osuclient/schema.py b/src/osuclient/schema.py index e7f8faa..7e21892 100644 --- a/src/osuclient/schema.py +++ b/src/osuclient/schema.py @@ -27,6 +27,8 @@ class UserToken(Token): class CustomModel(BaseModel): model_config = ConfigDict( extra='forbid', + validate_by_alias=True, + validate_by_name=True, json_encoders={datetime: lambda dt: dt.isoformat() if dt else None}, )