Skip to content

Commit d74c8e9

Browse files
committed
fixes all modeuls
1 parent 2ccde22 commit d74c8e9

File tree

4 files changed

+643
-10
lines changed

4 files changed

+643
-10
lines changed

api/specs/web-server/openapi.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
# add-ons ---
3030
"_activity",
3131
"_announcements",
32-
"_catalog", # < ---- FIXME: Invalid args for response field! Hint: check that <class 'models_library.api_schemas_webserver.catalog.ServiceResourcesGet'> is a valid Pydantic field type
33-
"_catalog_tags", # after _catalog
34-
"_cluster", # <--- FIXME: :TypeError: unhashable type: 'ClusterAccessRights'
32+
"_catalog",
33+
"_catalog_tags", # MUST BE after _catalog
34+
"_cluster",
3535
"_computations",
3636
"_exporter",
3737
"_folders",
@@ -51,7 +51,7 @@
5151
"_projects_tags",
5252
"_projects_wallet",
5353
"_projects_workspaces",
54-
"_publications", # <--- FIXME: RuntimeWarning: fields may not start with an underscore, ignoring "_file"
54+
"_publications",
5555
"_resource_usage",
5656
"_statics",
5757
"_storage",

packages/models-library/src/models_library/api_schemas_directorv2/clusters.py

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

33
from pydantic import (
44
AnyHttpUrl,
@@ -92,9 +92,10 @@ class ClusterDetails(BaseModel):
9292

9393

9494
class ClusterGet(Cluster):
95-
access_rights: dict[GroupID, ClusterAccessRights] = Field(
96-
alias="accessRights", default_factory=dict
97-
)
95+
access_rights: Annotated[
96+
dict[GroupID, ClusterAccessRights],
97+
Field(alias="accessRights", default_factory=dict),
98+
] = {}
9899

99100
model_config = ConfigDict(extra="allow", populate_by_name=True)
100101

packages/models-library/src/models_library/api_schemas_webserver/clusters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class ClusterPathParams(BaseModel):
1313
)
1414

1515

16-
class ClusterGet(directorv2_clusters.ClusterGet):
16+
class ClusterGet(directorv2_clusters.ClusterCreate):
1717
model_config = OutputSchema.model_config
1818

1919

0 commit comments

Comments
 (0)