code: function __populate(jsonSchema, populate) {
    var pTree = normailizePopulationTree(populate);
    var path, model, subDoc, jss;
    for (path of pTree) {
  
      jss = findPath(jsonSchema, path.path);
  
      if (!jss.spec) continue;
  
      model = jss.spec['x-ref'] || path.model;
      if (!model) continue;
      try {
        if (typeof model === 'string') model = this.base.model(model);
      } catch(e) {
        continue;
      }
      subDoc = model.jsonSchema(path.select, path.populate);
      subDoc['x-ref'] = jss.spec['x-ref'];
      if (jss.spec.description) subDoc.description = jss.spec.description;
      if (jss.isArray) {
        jss.cont.items = subDoc;
      } else {
        jss.cont[jss.prop] = subDoc;
      }
    }
    return jsonSchema;
  }
docs: __populate - enreaches jsonSchema with a sub-document schemas
  
  @param  {Object} jsonSchema              jsonSchema object
  @param  {String|Array|Object} populate   mongoose populate object
  @return {Object}                         enreached json-schema