Skip to content

Commit

Permalink
fix: update "properties" and "required" keys of JSON schema
Browse files Browse the repository at this point in the history
This is needed to handle the case in which the keys are newly created
  • Loading branch information
candleindark committed Nov 19, 2024
1 parent 0a69296 commit 99a66ed
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dandischema/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ def add_context(json_schema: dict) -> None:
}
required.append(context_key)

# Update the schema
# This is needed to handle the case in which the keys are newly created
json_schema["properties"] = properties
json_schema["required"] = required


class AccessType(Enum):
"""An enumeration of access status options"""
Expand Down

0 comments on commit 99a66ed

Please sign in to comment.