Also, need to handle the fact whether an output type is required or not is now handled by is_required but if an optional output_type is submitted, all output_type_ids must be present.
One current problem arises from the fact that for v4, all output_type_id values are stored under required even if the output type is not required. I fnot changed, all output_type_id values will end up as required. One thing that could be done, to maintain back-compatibility too, is to build on the current system in the back-end and shift required values to an optional property.
An additional complication, however, arises from the fact that, when an optional output type is having data submitted to, all output_type_ids should now be considered required, so no need to shift. This requires knowledge of output types in the data, something that expand_model_out_grid() has not required up to now. Need a simple and none invasive method of being able to indicated output_types that might be optional but their output type IDs must be included in the required_only output.
Originally posted by @annakrystalli in https://github.com/hubverse-org/hubValidations/issues/156#issuecomment-2467679059
One current problem arises from the fact that for v4, all output_type_id values are stored under
required
even if the output type is not required. I fnot changed, all output_type_id values will end up as required. One thing that could be done, to maintain back-compatibility too, is to build on the current system in the back-end and shiftrequired
values to anoptional
property.An additional complication, however, arises from the fact that, when an optional output type is having data submitted to, all output_type_ids should now be considered
required
, so no need to shift. This requires knowledge of output types in the data, something thatexpand_model_out_grid()
has not required up to now. Need a simple and none invasive method of being able to indicated output_types that might be optional but their output type IDs must be included in the required_only output.