code: function loadValidator (resourceName, rootDir, objectType, logger) {
    const schemaName = (objectType !== 'Resource')
      ? `${kebabCase(objectType)}-schema`
      : 'schema'
  
    for (const [schemaType, validatorLoader] of Object.entries(schemaTypes)) {
      const schemaFile = path.resolve(rootDir, `${schemaName}.${schemaType}`)
      if (fs.existsSync(schemaFile)) {
        try {
          return validatorLoader(schemaFile)
        } catch (err) {
          logger.error(`Couldn't load ${objectType} schema for ${resourceName}:\n  ${err.message}`)
          return null
        }
      } // if ...
    } // for ...
  
    return null
  }
docs: CheckTaskNodes / ///////////////////////////////////////////////