diff --git a/src/schema/meta/context.yaml b/src/schema/meta/context.yaml index 8783b46371..8deb853cc2 100644 --- a/src/schema/meta/context.yaml +++ b/src/schema/meta/context.yaml @@ -269,6 +269,15 @@ properties: type: array items: type: string + electrodes: + description: 'Electrodes file' + type: object + required: [path] + additionalProperties: false + properties: + path: + description: 'Path to associated electrodes file' + type: string coordsystem: description: 'Coordinate system file' type: object diff --git a/src/schema/rules/checks/ieeg.yaml b/src/schema/rules/checks/ieeg.yaml new file mode 100644 index 0000000000..1a60e35de0 --- /dev/null +++ b/src/schema/rules/checks/ieeg.yaml @@ -0,0 +1,14 @@ +--- +iEEGElectrodesRequired: + issue: + code: IEEG_ELECTRODES_REQUIRED + message: | + iEEG data files must have an associated electrodes.tsv. + A single electrodes file may apply to multiple data files + via the inheritance principle. + level: error + selectors: + - suffix == "ieeg" + - extension != ".json" + checks: + - associations.electrodes.path != ""