function getReferences (currentNode, refTypeResolver, pathSolver) {
  let referencesInNode = [];
  traverseUtility(currentNode).forEach((property) => {
    if (property) {
      let hasReferenceTypeKey;
      hasReferenceTypeKey = Object.keys(property)
        .find(
          (key) => {
            return refTypeResolver(property, key);
          }
        );
      if (hasReferenceTypeKey) {
        if (!added(property.$ref, referencesInNode)) {
          referencesInNode.push({ path: pathSolver(property) });
        }
      }
    }
  });
  return referencesInNode;
}
Gets all the $refs from an object
@param {object} currentNode - current node in process
@param {Function} refTypeResolver - function to resolve the ref according to type (local, external, web etc)
@param {Function} pathSolver - function to resolve the Path
@returns {object} - {path : $ref value}