function getRequestParams (context, operationParam, pathParam) {
  if (!Array.isArray(operationParam)) {
    operationParam = [];
  }
  if (!Array.isArray(pathParam)) {
    pathParam = [];
  }
  pathParam.forEach((param, index, arr) => {
    if (_.has(param, '$ref')) {
      arr[index] = resolveRefFromSchema(context, param.$ref);
    }
  });

  operationParam.forEach((param, index, arr) => {
    if (_.has(param, '$ref')) {
      arr[index] = resolveRefFromSchema(context, param.$ref);
    }
  });

  if (_.isEmpty(pathParam)) {
    return operationParam;
  }
  else if (_.isEmpty(operationParam)) {
    return pathParam;
  }

  // If both path and operation params exist,
  // we need to de-duplicate
  // A param with the same name and 'in' value from operationParam
  // will get precedence
  var reqParam = operationParam.slice();
  pathParam.forEach((param) => {
    var dupParam = operationParam.find(function(element) {
      return element.name === param.name && element.in === param.in &&
      // the below two conditions because undefined === undefined returns true
        element.name && param.name &&
        element.in && param.in;
    });
    if (!dupParam) {
      // if there's no duplicate param in operationParam,
      // use the one from the common pathParam list
      // this ensures that operationParam is given precedence
      reqParam.push(param);
    }
  });
  return reqParam;
}
Returns params applied to specific operation with resolved references. Params from parent
blocks (collection/folder) are merged, so that the request has a flattened list of params needed.
OperationParams take precedence over pathParams

@param {Object} context - Required context from related SchemaPack function
@param {array} operationParam operation (Postman request)-level params.
@param {array} pathParam are path parent-level params.
@returns {*} combined requestParams from operation and path params.