Skip to content

Commit c435616

Browse files
GitHKAndrei Neagu
and
Andrei Neagu
authored
♻️ Move service extras to catalog (#7025)
Co-authored-by: Andrei Neagu <[email protected]>
1 parent abbddb3 commit c435616

File tree

28 files changed

+2123
-2078
lines changed

28 files changed

+2123
-2078
lines changed

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

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,7 @@ class ServiceExtras(BaseModel):
6767
json_schema_extra={
6868
"examples": [
6969
{"node_requirements": node_example}
70-
for node_example in NodeRequirements.model_config["json_schema_extra"][
71-
"examples"
72-
] # type: ignore[index,union-attr]
70+
for node_example in NodeRequirements.model_json_schema()["examples"]
7371
]
7472
+ [
7573
{
@@ -80,9 +78,7 @@ class ServiceExtras(BaseModel):
8078
"vcs_url": "[email protected]:ITISFoundation/osparc-simcore.git",
8179
},
8280
}
83-
for node_example in NodeRequirements.model_config["json_schema_extra"][
84-
"examples"
85-
] # type: ignore[index,dict-item, union-attr]
81+
for node_example in NodeRequirements.model_json_schema()["examples"]
8682
]
8783
+ [
8884
{
@@ -94,9 +90,7 @@ class ServiceExtras(BaseModel):
9490
},
9591
"container_spec": {"Command": ["run", "subcommand"]},
9692
}
97-
for node_example in NodeRequirements.model_config["json_schema_extra"][
98-
"examples"
99-
] # type: ignore[index,union-attr]
93+
for node_example in NodeRequirements.model_json_schema()["examples"]
10094
]
10195
}
10296
)

0 commit comments

Comments
 (0)