function getParamSerialisationInfo (param, parameterSource, components, options) {
  var paramName = _.get(param, 'name'),
    paramSchema = resolveSchema(getDefaultContext(options, components), _.cloneDeep(param.schema), {
      resolveFor: PROCESSING_TYPE.VALIDATION,
      isResponseSchema: parameterSource === PARAMETER_SOURCE.RESPONSE
    }),
    style, // style property defined/inferred from schema
    explode, // explode property defined/inferred from schema
    propSeparator, // separates two properties or values
    keyValueSeparator, // separats key from value
    startValue = '', // starting value that is unique to each style
    // following prop represents whether param can be truly exploded, as for some style even when explode is true,
    // serialisation doesn't separate key-value
    isExplodable = paramSchema.type === 'object';

  // for invalid param object return null
  if (!_.isObject(param)) {
    return null;
  }

  // decide allowed / default style for respective param location
  switch (param.in) {
    case 'path':
      style = _.includes(['matrix', 'label', 'simple'], param.style) ? param.style : 'simple';
      break;
    case 'query':
      style = _.includes(['form', 'spaceDelimited', 'pipeDelimited', 'deepObject'], param.style) ?
        param.style : 'form';
      break;
    case 'header':
      style = 'simple';
      break;
    default:
      style = 'simple';
      break;
  }

  // decide allowed / default explode property for respective param location
  explode = (_.isBoolean(param.explode) ? param.explode : (_.includes(['form', 'deepObject'], style)));

  // decide explodable params, starting value and separators between key-value and properties for serialisation
  switch (style) {
    case 'matrix':
      isExplodable = paramSchema.type === 'object' || explode;
      startValue = ';' + ((paramSchema.type === 'object' && explode) ? '' : (paramName + '='));
      propSeparator = explode ? ';' : ',';
      keyValueSeparator = explode ? '=' : ',';
      break;
    case 'label':
      startValue = '.';
      propSeparator = '.';
      keyValueSeparator = explode ? '=' : '.';
      break;
    case 'form':
      // for 'form' when explode is true, query is divided into different key-value pairs
      propSeparator = keyValueSeparator = ',';
      break;
    case 'simple':
      propSeparator = ',';
      keyValueSeparator = explode ? '=' : ',';
      break;
    case 'spaceDelimited':
      explode = false;
      propSeparator = keyValueSeparator = '%20';
      break;
    case 'pipeDelimited':
      explode = false;
      propSeparator = keyValueSeparator = '|';
      break;
    case 'deepObject':
      // for 'deepObject' query is divided into different key-value pairs
      explode = true;
      break;
    default:
      break;
  }

  return { style, explode, startValue, propSeparator, keyValueSeparator, isExplodable };
}
Provides information regarding serialisation of param

@param {*} param - OpenAPI Parameter object
@param {String} parameterSource - Specifies whether the schema being faked is from a request or response.
@param {Object} components - OpenAPI components defined in the OAS spec. These are used to
 resolve references while generating params.
@param {object} options - a standard list of options that's globally passed around. Check options.js for more.
@returns {Object} - Information regarding parameter serialisation. Contains following properties.
{
 style - style property defined/inferred from schema
 explode - explode property defined/inferred from schema
 startValue - starting value that is prepended to serialised value
 propSeparator - Character that separates two properties or values in serialised string of respective param
 keyValueSeparator - Character that separates key from values in serialised string of respective param
 isExplodable - whether params can be exploded (serialised value can contain key and value)
}