async processFile(filePath) {
    if (!filePath) {
      throw new Error('Argument not set');
    }
    const buffer = await fs.readFile(filePath);
    const ext = path.extname(filePath);
    if (this._isApiFile(ext)) {
      return await this._notifyApiParser(buffer);
    }
    // Only JSON files left. It can be either ARC, Postam or OAS
    return await this._discoverFile(buffer);
  }
/**
   * Recognizes file type and sends to appropriate parser.
   * @param {String} filePath Location of the file.
   * @return {Promise}
   */
Recognizes file type and sends to appropriate parser.
@param {String} filePath Location of the file.
@return {Promise}
Recognizes file type and sends to appropriate parser . @param { String } filePath Location of the file . @return { Promise }
async processFile(filePath) {
    if (!filePath) {
      throw new Error('Argument not set');
    }
    const buffer = await fs.readFile(filePath);
    const ext = path.extname(filePath);
    if (this._isApiFile(ext)) {
      return await this._notifyApiParser(buffer);
    }
    return await this._discoverFile(buffer);
  }
async processFile ( filePath ) { if ( ! filePath ) { throw new Error ( 'Argument not set' ) ; } const buffer = await fs . readFile ( filePath ) ; const ext = path . extname ( filePath ) ; if ( this . _isApiFile ( ext ) ) { return await this . _notifyApiParser ( buffer ) ; } return await this . _discoverFile ( buffer ) ; }
Recognizes file type and sends to appropriate parser.
Recognizes file type and sends to appropriate parser .
// Only JSON files left. It can be either ARC, Postam or OAS