Skip to content

Commit 0979a80

Browse files
author
Andrei Neagu
committed
mypy
1 parent e009e0e commit 0979a80

File tree

1 file changed

+11
-1
lines changed
  • packages/models-library/src/models_library/api_schemas_directorv2

1 file changed

+11
-1
lines changed

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,17 @@ class ComputationGet(ComputationTask):
1818
stop_url: AnyHttpUrl | None = Field(
1919
None, description="the link where to stop the task"
2020
)
21-
model_config = ConfigDict(json_schema_extra={"examples": []})
21+
22+
model_config = ConfigDict(
23+
json_schema_extra={
24+
"examples": [
25+
x | {"url": "http://example.com"} # type:ignore[operator]
26+
for x in ComputationTask.model_config[ # type:ignore[index,union-attr]
27+
"json_schema_extra"
28+
]["examples"]
29+
]
30+
}
31+
)
2232

2333

2434
class ComputationCreate(BaseModel):

0 commit comments

Comments
 (0)