function validateConditionalGeneration(conditionalGeneration) {
  if (!conditionalGeneration || typeof conditionalGeneration !== 'object') return;
  
  for (const [fileName, def] of Object.entries(conditionalGeneration)) {
    const { subject, parameter, validation } = def;
    if (subject && typeof subject !== 'string')
      throw new Error(`Invalid 'subject' for ${fileName}: ${subject}`);
    if (parameter && typeof parameter !== 'string')
      throw new Error(`Invalid 'parameter' for ${fileName}: ${parameter}`);
    if (subject && parameter)
      throw new Error(`Both 'subject' and 'parameter' cannot be defined for ${fileName}`);
    if (typeof validation !== 'object')
      throw new Error(`Invalid 'validation' object for ${fileName}: ${validation}`);
    def.validate = ajv.compile(validation);
  }
}
Validates conditionalGeneration settings in the template config.
@private
@param {Object} conditionalGeneration - The conditions specified in the template config.