Skip to content

Commit

Permalink
feat(schema): Add additionalProperties=false to context objects
Browse files Browse the repository at this point in the history
This is intended to give better guidance to tooling that would
auto-generate classes or interfaces for the validation context.
  • Loading branch information
effigies committed Aug 5, 2024
1 parent d2557e3 commit b01096a
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/schema/meta/context.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@
#
---
type: object
additionalProperties: false
properties:
schema:
description: 'The BIDS specification schema'
type: object
dataset:
description: 'Properties and contents of the entire dataset'
type: object
additionalProperties: false
properties:
dataset_description:
description: 'Contents of /dataset_description.json'
Expand All @@ -47,6 +49,7 @@ properties:
subjects:
description: 'Collections of subjects in dataset'
type: object
additionalProperties: false
properties:
sub_dirs:
description: 'Subjects as determined by sub-*/ directories'
Expand All @@ -66,10 +69,12 @@ properties:
subject:
description: 'Properties and contents of the current subject'
type: object
additionalProperties: false
properties:
sessions:
description: 'Collections of sessions in subject'
type: object
additionalProperties: false
properties:
ses_dirs:
description: 'Sessions as determined by ses-*/ directories'
Expand Down Expand Up @@ -120,10 +125,12 @@ properties:
description: |
Associated files, indexed by suffix, selected according to the inheritance principle
type: object
additionalProperties: false
properties:
events:
description: 'Events file'
type: object
additionalProperties: false
properties:
path:
description: 'Path to associated events file'
Expand All @@ -136,6 +143,7 @@ properties:
aslcontext:
description: 'ASL context file'
type: object
additionalProperties: false
properties:
path:
description: 'Path to associated aslcontext file'
Expand All @@ -151,27 +159,31 @@ properties:
m0scan:
description: 'M0 scan file'
type: object
additionalProperties: false
properties:
path:
description: 'Path to associated M0 scan file'
type: string
magnitude:
description: 'Magnitude image file'
type: object
additionalProperties: false
properties:
path:
description: 'Path to associated magnitude file'
type: string
magnitude1:
description: 'Magnitude1 image file'
type: object
additionalProperties: false
properties:
path:
description: 'Path to associated magnitude1 file'
type: string
bval:
description: 'B value file'
type: object
additionalProperties: false
properties:
path:
description: 'Path to associated bval file'
Expand All @@ -190,6 +202,7 @@ properties:
bvec:
description: 'B vector file'
type: object
additionalProperties: false
properties:
path:
description: 'Path to associated bvec file'
Expand All @@ -203,6 +216,7 @@ properties:
channels:
description: 'Channels file'
type: object
additionalProperties: false
properties:
path:
description: 'Path to associated channels file'
Expand All @@ -215,6 +229,7 @@ properties:
coordsystem:
description: 'Coordinate system file'
type: object
additionalProperties: false
properties:
path:
description: 'Path to associated coordsystem file'
Expand All @@ -231,6 +246,7 @@ properties:
gzip:
description: 'Parsed contents of gzip header'
type: object
additionalProperties: false
properties:
timestamp:
description: 'Modification time, unix timestamp'
Expand All @@ -245,11 +261,13 @@ properties:
name: 'NIfTI Header'
description: 'Parsed contents of NIfTI header referenced elsewhere in schema.'
type: object
additionalProperties: false
properties:
dim_info:
name: 'Dimension Information'
description: 'Metadata about dimensions data.'
type: object
additionalProperties: false
properties:
freq:
name: 'Frequency'
Expand Down Expand Up @@ -299,6 +317,7 @@ properties:
name: 'XYZT Units'
description: 'Units of pixdim[1..4]'
type: object
additionalProperties: false
properties:
xyz:
name: 'XYZ Units'
Expand Down Expand Up @@ -332,6 +351,7 @@ properties:
name: 'Open Microscopy Environment fields'
description: 'Parsed contents of OME-XML header, which may be found in OME-TIFF or OME-ZARR files'
type: object
additionalProperties: false
properties:
PhysicalSizeX:
name: 'PhysicalSizeX'
Expand Down Expand Up @@ -361,6 +381,7 @@ properties:
name: 'TIFF'
description: 'TIFF file format metadata'
type: object
additionalProperties: false
properties:
version:
name: 'Version'
Expand Down

0 comments on commit b01096a

Please sign in to comment.