function forEachSpec(app, specType, cb) {
  let models = app.models;
  console.log(`Iterate over model ${specType}...`);

  try {
    // For each model...
    Object.keys(models).forEach(function(modelName) {
      let model = app.models[modelName];
      let dpModelCustomSpecs = model.settings._vp;

      // ...if it has the right VuePoint.js (_vp) custom specs defined, then execute callback
      if (dpModelCustomSpecs && dpModelCustomSpecs[specType]) {
        let modelSpec = dpModelCustomSpecs[specType];
        cb(modelName, model, modelSpec);
      }
    });
    console.log(`Completed iteration over model ${specType}.`);
  } catch (e) {
    console.log('Error iterating over custom model validations:', e);
  }
}
/**
 * Execute a provided callback function once for every custom model spec
 * of the type indicated (i.e., validations, FKs)
 * @param app The LoopBack app
 * @param specType The type of spec the caller wishes to iterate over
 * @param cb The callback
 */
Execute a provided callback function once for every custom model spec
of the type indicated
@param app The LoopBack app
@param specType The type of spec the caller wishes to iterate over
@param cb The callback
Execute a provided callback function once for every custom model spec of the type indicated @param app The LoopBack app @param specType The type of spec the caller wishes to iterate over @param cb The callback
function forEachSpec(app, specType, cb) {
  let models = app.models;
  console.log(`Iterate over model ${specType}...`);
  try {
    Object.keys(models).forEach(function(modelName) {
      let model = app.models[modelName];
      let dpModelCustomSpecs = model.settings._vp;
      if (dpModelCustomSpecs && dpModelCustomSpecs[specType]) {
        let modelSpec = dpModelCustomSpecs[specType];
        cb(modelName, model, modelSpec);
      }
    });
    console.log(`Completed iteration over model ${specType}.`);
  } catch (e) {
    console.log('Error iterating over custom model validations:', e);
  }
}
function forEachSpec ( app , specType , cb ) { let models = app . models ; console . log ( ` ${ specType } ` ) ; try { Object . keys ( models ) . forEach ( function ( modelName ) { let model = app . models [ modelName ] ; let dpModelCustomSpecs = model . settings . _vp ; if ( dpModelCustomSpecs && dpModelCustomSpecs [ specType ] ) { let modelSpec = dpModelCustomSpecs [ specType ] ; cb ( modelName , model , modelSpec ) ; } } ) ; console . log ( ` ${ specType } ` ) ; } catch ( e ) { console . log ( 'Error iterating over custom model validations:' , e ) ; } }
Execute a provided callback function once for every custom model spec
 of the type indicated (i.e., validations, FKs)
 @param app The LoopBack app
 @param specType The type of spec the caller wishes to iterate over
 @param cb The callback
Execute a provided callback function once for every custom model spec of the type indicated ( i . e . validations FKs ) @param app The LoopBack app @param specType The type of spec the caller wishes to iterate over @param cb The callback
// For each model... // ...if it has the right VuePoint.js (_vp) custom specs defined, then execute callback