Skip to content

Commit 44d210d

Browse files
author
Kyle
committed
Allow additional properties on Device schema (manufacturer fix)
neuroconv 0.7.0+ populates Device metadata with 'manufacturer' field. pynwb's Device schema includes it but sets additionalProperties: false. The frontend resolution may not properly resolve the Device definition, causing validation to reject 'manufacturer' as an additional property. Set additionalProperties: true to allow it.
1 parent bfa8c87 commit 44d210d

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/pyflask/manageNeuroconv/manage_neuroconv.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -665,6 +665,13 @@ def on_recording_interface(name, recording_interface):
665665
}
666666
)
667667

668+
# Allow additional properties on Device definitions (e.g. manufacturer from neuroconv)
669+
for modality_key in ("Ecephys", "Ophys"):
670+
modality_schema = schema.get("properties", {}).get(modality_key, {})
671+
device_def = modality_schema.get("definitions", {}).get("Device", {})
672+
if device_def:
673+
device_def["additionalProperties"] = True
674+
668675
# TODO: generalize logging stuff
669676
log_base = GUIDE_ROOT_FOLDER / "logs"
670677
log_base.mkdir(exist_ok=True)

0 commit comments

Comments
 (0)