Skip to content

Commit b2953a6

Browse files
committed
doc: Document null deletion
1 parent 4b68300 commit b2953a6

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/schema/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,26 @@ references (the cases in which they are used will be presented later):
185185
When multiple references are aggregated, the first reference takes
186186
precedence.
187187

188+
Note also that `value: null` can be used to "delete" a key from a template.
189+
For example, in `rules.files.raw.events`:
190+
191+
```YAML
192+
events__pet:
193+
$ref: rules.files.raw.events.events
194+
datatypes:
195+
- pet
196+
entities:
197+
$ref: meta.templates.raw.task.entities
198+
tracer: optional
199+
reconstruction: optional
200+
# Most events allow acquisition, PET doesn't
201+
acquisition: null
202+
```
203+
204+
This technique should be used judiciously, preferring semantic clarity to brevity.
205+
Templates should be expected to grow as BIDS evolves,
206+
and should thus be used only where those changes should propagate.
207+
188208
### Expressions
189209

190210
Rules definitions make use of a limited language of expressions that always evaluate to `true` or `false`.

0 commit comments

Comments
 (0)