Render valid value restrictions in tables based on object definitions in schema #912
Labels
enhancement
New feature or request
schema
Issues related to the YAML schema representation of the specification. Patch version release.
It would be great if tables in the specification automatically included restrictions on valid values, without having to hardcode those restrictions in the object "description" fields.
This stems from #827 (comment).
As a simple example, we can look at the
CASLType
metadata field:bids-specification/src/schema/objects/metadata.yaml
Lines 299 to 307 in 251f440
Note that there are currently two valid values for this field: "single-coil" and "double-coil". These values are written out in two places: (1) the "enum" that actually restricts valid values for the field and (2) the "description", which redundantly includes the values. Optimally, we wouldn't need to include a list of valid values in the description, since that information is already available, in a more useful form, elsewhere in the object definition. One step in this direction is to update our table-rendering functions to attempt to convert restrictions on valid values to a human-readable form and append that new string to the "description" cell in the table automatically.
NOTE: Preferably, any enhancements to the code to implement this would also work with #904.
The text was updated successfully, but these errors were encountered: