Skip to content

Commit f9bba62

Browse files
committed
fix: update "properties" and "required" keys of JSON schema
This is needed to handle the case in which the keys are newly added
1 parent 0a69296 commit f9bba62

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

dandischema/models.py

+5
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,11 @@ def add_context(json_schema: dict) -> None:
116116
}
117117
required.append(context_key)
118118

119+
# Update the schema
120+
# This is needed to handle the case in which the keys are newly added
121+
json_schema["properties"] = properties
122+
json_schema["required"] = required
123+
119124

120125
class AccessType(Enum):
121126
"""An enumeration of access status options"""

0 commit comments

Comments
 (0)