code: function(allOfList, definitions) {
      var length = allOfList.length,
          index = -1,
          result = {};
  
      while (++index < length) {
        var item = allOfList[index];
  
        item = (typeof item.$ref !== 'undefined') ? getLocalRef(item.$ref, definitions) : item;
  
        result = merge(result, item);
      }
  
      return result;
    }
docs: merge list of objects from allOf properties
  if some of objects contains $ref field extracts this reference and merge it
  
  @param {Array} allOfList
  @param {Object} definitions
  @return {Object}