Extend configuration validity checks to sequences and mappings
As of utopia!157 (merged) (utopia#35 (closed)), the parameter validation feature is now implemented. Currently, it is restricted to checking scalar quantities, i.e. the leaves of the configuration tree.
Conceptually different checks are required for mappings and sequences, as those represent the branches of the configuration tree. These checks pertain more to the validation of the structure of the configuration instead of the values of an entry. Examples:
- Allowed/disallowed keys in a mapping
- Expected number of entries in a mapping or sequence
Proposal
- Come up with a design for the syntax (see utopia#35 (closed) and utopia!157 (merged) for some sketches) here in this issue
- Extend the infrastructure to allow validating mappings and sequences
- Consider subclassing
Parameter
for that
- Consider subclassing
This is a difficult task, design-wise. Essentially, we need to piggy-back some information onto custom YAML tags. While this is ok-ish for a mapping, sequences can be problematic in that respect – all these things should be planned here in this issue.