File tree Expand file tree Collapse file tree 1 file changed +0
-9
lines changed
packages/models-library/src/models_library Expand file tree Collapse file tree 1 file changed +0
-9
lines changed Original file line number Diff line number Diff line change 11"""
22 Models a study's project document
33"""
4- from copy import deepcopy
54from datetime import datetime
65from enum import Enum
76from typing import Any , Final , TypeAlias
@@ -113,13 +112,6 @@ def convert_sql_alchemy_enum(cls, v):
113112 )
114113
115114
116- def _patch_json_schema_extra (schema : dict ) -> None :
117- # Patch to allow jsonschema nullable
118- # SEE https://github.com/samuelcolvin/pydantic/issues/990#issuecomment-645961530
119- state_pydantic_schema = deepcopy (schema ["properties" ]["state" ])
120- schema ["properties" ]["state" ] = {"anyOf" : [{"type" : "null" }, state_pydantic_schema ]}
121-
122-
123115class Project (BaseProjectModel ):
124116 # NOTE: This is the pydantic pendant of project-v0.0.1.json used in the API of the webserver/webclient
125117 # NOT for usage with DB!!
@@ -182,5 +174,4 @@ class Project(BaseProjectModel):
182174 model_config = ConfigDict (
183175 title = "osparc-simcore project" ,
184176 extra = "forbid" ,
185- json_schema_extra = _patch_json_schema_extra ,
186177 )
You can’t perform that action at this time.
0 commit comments