From 91c91a65d7fbd224bde70c9e5a2a707805f6fc1c Mon Sep 17 00:00:00 2001 From: Isaac To Date: Fri, 26 Jan 2024 14:14:54 -0800 Subject: [PATCH 1/2] Set `Dandiset.model_config.extra` to `"allow"` So that the extra attributes passed to constructing a `Dandiset` object will be included in its dictionary representation produced by `BaseModel.model_dump()` --- dandischema/models.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dandischema/models.py b/dandischema/models.py index 7633143..7acc8fb 100644 --- a/dandischema/models.py +++ b/dandischema/models.py @@ -9,6 +9,7 @@ UUID4, AnyHttpUrl, BaseModel, + ConfigDict, EmailStr, Field, GetJsonSchemaHandler, @@ -1402,6 +1403,8 @@ class CommonModel(DandiBaseModel): class Dandiset(CommonModel): """A body of structured information describing a DANDI dataset.""" + model_config = ConfigDict(extra="allow") + @field_validator("contributor") @classmethod def contributor_musthave_contact( From 09e50e17db87321ccfad6c6c8fd5c40a3814ae37 Mon Sep 17 00:00:00 2001 From: Isaac To Date: Tue, 30 Jan 2024 10:50:06 -0800 Subject: [PATCH 2/2] Bump DANDI_SCHEMA_VERSION version to "0.6.6" The JSON schemata for `Dandiset` and `PublishedDandiset` now contain the additional key of "additionalProperties" with the value of "true" --- dandischema/consts.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dandischema/consts.py b/dandischema/consts.py index 802cb9f..88c42d2 100644 --- a/dandischema/consts.py +++ b/dandischema/consts.py @@ -1,4 +1,4 @@ -DANDI_SCHEMA_VERSION = "0.6.5" +DANDI_SCHEMA_VERSION = "0.6.6" ALLOWED_INPUT_SCHEMAS = [ "0.4.4", "0.5.1", @@ -8,6 +8,7 @@ "0.6.2", "0.6.3", "0.6.4", + "0.6.5", ] # ATM we allow only for a single target version which is current