function resolveRefsAt(location,options){var allTasks=Promise.resolve();allTasks=allTasks.then(function(){// Validate the provided location
if(!isType(location,'String')){throw new TypeError('location must be a string');}// Validate options
options=validateOptions(options);// Combine the location and the optional relative base
location=combineURIs(options.relativeBase,location);return getRemoteDocument(location,options);}).then(function(res){var cOptions=clone(options);var uriDetails=parseURI(location);// Set the sub document path if necessary
if(!isType(uriDetails.fragment,'Undefined')){cOptions.subDocPath=pathFromPtr(decodeURI(uriDetails.fragment));}// Update the relative base based on the retrieved location
cOptions.relativeBase=path.dirname(location);return resolveRefs(res,cOptions).then(function(res2){return{refs:res2.refs,resolved:res2.resolved,value:res};});});return allTasks;}
Resolves JSON References defined within the document at the provided location.

This API is identical to {@link module:JsonRefs.resolveRefs} except this API will retrieve a remote document and then
return the result of {@link module:JsonRefs.resolveRefs} on the retrieved document.

@param {string} location - The location to retrieve *(Can be relative or absolute, just make sure you look at the
{@link module:JsonRefs~JsonRefsOptions|options documentation} to see how relative references are handled.)*
@param {module:JsonRefs~JsonRefsOptions} [options] - The JsonRefs options

@returns {Promise} a promise that resolves a {@link module:JsonRefs~RetrievedResolvedRefsResults} and rejects with an
`Error` when the input arguments fail validation, when `options.subDocPath` points to an invalid location or when
 the location argument points to an unloadable resource

@alias module:JsonRefs.resolveRefsAt

@example
// Example that loads a JSON document (No options.loaderOptions.processContent required) and resolves all references
JsonRefs.resolveRefsAt('./swagger.json')
  .then(function (res) {
     // Do something with the response
     //
     // res.refs: JSON Reference locations and details
     // res.resolved: The document with the appropriate JSON References resolved
     // res.value: The retrieved document
  }, function (err) {
    console.log(err.stack);
  });