async processRelatedFiles(inputRelatedFiles, toBundle = false, options = {}) {
    let version = inputRelatedFiles.specificationVersion ? inputRelatedFiles.specificationVersion : '3.0',
      res = {
        result: true,
        output: {
          type: toBundle ? 'bundledContent' : 'relatedFiles',
          specification: {
            type: 'OpenAPI',
            version: version
          },
          data: [
          ]
        }
      };
    if (inputRelatedFiles.rootFiles && inputRelatedFiles.rootFiles.length > 0) {
      try {
        res.output.data = await this.mapProcessRelatedFiles(inputRelatedFiles.rootFiles, inputRelatedFiles.data,
          inputRelatedFiles.origin, version,
          inputRelatedFiles.bundleFormat, toBundle, options, inputRelatedFiles.remoteRefResolver);
        if (res.output.data === undefined || res.output.data.result === false ||
          res.output.data.length === 0) {
          res.result = false;
        }
      }
      catch (error) {
        if (error instanceof ParseError) {
          throw (error);
        }
        let newError = new Error('There was an error during the process');
        newError.stack = error.stack;
        throw (newError);
      }
      return res;
    }
    else {
      throw new Error('Input should have at least one root file');
    }
  }
@description Takes in a folder and identifies the related files from the
root file perspective (using $ref property)
@param {string} inputRelatedFiles - {rootFile:{path:string}, data: [{path:string}]}
@param {boolean} toBundle - if true it will return the bundle data
@param {object} options - a standard list of options that's globally passed around. Check options.js for more.

@returns {object} root files information and data input