function resolveExternal (parser, options) {
if (!options.resolve.external) {
  // Nothing to resolve, so exit early
  return Promise.resolve();
}

try {
  debug('Resolving $ref pointers in %s', parser.$refs._root$Ref.path);
  var promises = crawl(parser.schema, parser.$refs._root$Ref.path + '#', parser.$refs, options);
  return Promise.all(promises);
}
catch (e) {
  return Promise.reject(e);
}
}
Crawls the JSON schema, finds all external JSON references, and resolves their values.
This method does not mutate the JSON schema. The resolved values are added to {@link $RefParser#$refs}.

NOTE: We only care about EXTERNAL references here. INTERNAL references are only relevant when dereferencing.

@param {$RefParser} parser
@param {$RefParserOptions} options

@returns {Promise}
The promise resolves once all JSON references in the schema have been resolved,
including nested references that are contained in externally-referenced files.