I'd consider adding an API for extensive consistency checks in the model definitions. The annotations like @FixedField or @FixedFormat leave room for errors and inconsistencies. For example:
- All
@FixedField annotations together do not describe the dataset exhaustively, meaning there are gaps in the data which do not map onto a @FixedField.
- The length of a format pattern exceeds the length allocated by
@FixedField.
- The length of the
@FixedField is too small to accommodate the nested @FixedObject.
- ...
I have already prototyped the first rule - all fields must be 'contiguous' / 'gapless' - and found it to be very useful, because the check already identified a typo in one of my model objects.
Mind that this is not only about detectable error conditions, but also about heuristics. As a result, one could have different severity levels like 'error', or 'warning'.
What do you think? Does such a feature fit the scope of your project?
I'd consider adding an API for extensive consistency checks in the model definitions. The annotations like
@FixedFieldor@FixedFormatleave room for errors and inconsistencies. For example:@FixedFieldannotations together do not describe the dataset exhaustively, meaning there are gaps in the data which do not map onto a@FixedField.@FixedField.@FixedFieldis too small to accommodate the nested@FixedObject.I have already prototyped the first rule - all fields must be 'contiguous' / 'gapless' - and found it to be very useful, because the check already identified a typo in one of my model objects.
Mind that this is not only about detectable error conditions, but also about heuristics. As a result, one could have different severity levels like 'error', or 'warning'.
What do you think? Does such a feature fit the scope of your project?