Skip to content

Commit 8bdfa5e

Browse files
fix serialization
1 parent 55f5af5 commit 8bdfa5e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/models-library/src/models_library/app_diagnostics.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
from typing import Annotated, Any
1+
from typing import Any
22

3-
from pydantic import AfterValidator, AnyUrl, BaseModel, Field
3+
from pydantic import AnyUrl, BaseModel, Field
44

55

66
class AppStatusCheck(BaseModel):
@@ -15,11 +15,11 @@ class AppStatusCheck(BaseModel):
1515
description="Client sessions info. If single session per app, then is denoted as main",
1616
)
1717

18-
url: Annotated[AnyUrl, AfterValidator(str)] | None = Field(
18+
url: AnyUrl | None = Field(
1919
default=None,
2020
description="Link to current resource",
2121
)
22-
diagnostics_url: Annotated[AnyUrl, AfterValidator(str)] | None = Field(
22+
diagnostics_url: AnyUrl | None = Field(
2323
default=None,
2424
description="Link to diagnostics report sub-resource. This MIGHT take some time to compute",
2525
)

services/api-server/tests/unit/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ def mocked_storage_service_api_base(
378378
"url": faker.url(),
379379
"diagnostics_url": faker.url(),
380380
}
381-
).model_dump(),
381+
).model_dump(mode="json"),
382382
)
383383

384384
# SEE https://github.com/pcrespov/sandbox-python/blob/f650aad57aced304aac9d0ad56c00723d2274ad0/respx-lib/test_disable_mock.py

0 commit comments

Comments
 (0)