File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
packages/models-library/tests Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1- """ This test suite does not intend to re-test pydantic but rather
1+ """This test suite does not intend to re-test pydantic but rather
22check some "corner cases" or critical setups with pydantic model such that:
33
44- we can ensure a given behaviour is preserved through updates
@@ -120,7 +120,7 @@ class Func(BaseModel):
120120 {"$ref" : "#/$defs/DatCoreFileLink" },
121121 {"$ref" : "#/$defs/DownloadLink" },
122122 {"type" : "array" , "items" : {}},
123- {"type" : "object" },
123+ {"type" : "object" , "additionalProperties" : True },
124124 ],
125125 }
126126
@@ -183,7 +183,9 @@ def test_nullable_fields_from_pydantic_v1():
183183 # SEE https://github.com/ITISFoundation/osparc-simcore/pull/6751
184184 class MyModel (BaseModel ):
185185 # pydanticv1 would add a default to fields set as nullable
186- nullable_required : str | None # <--- This was default to =None in pydantic 1 !!!
186+ nullable_required : (
187+ str | None
188+ ) # <--- This was default to =None in pydantic 1 !!!
187189 nullable_required_with_hyphen : str | None = Field (default = ...)
188190 nullable_optional : str | None = None
189191
You can’t perform that action at this time.
0 commit comments