function getFixedPartsFromPathSegment (segment, pathType = 'collection') {
  var tempSegment = segment,
    // collection is default
    varMatches = segment.match(pathType === 'schema' ? /(\{[^\/\{\}]+\})/g : /(\{\{[^\/\{\}]+\}\})/g),
    fixedParts = [];

  _.forEach(varMatches, (match) => {
    let matchedIndex = tempSegment.indexOf(match);

    // push fixed part before collection variable if present
    (matchedIndex !== 0) && (fixedParts.push(tempSegment.slice(0, matchedIndex)));

    // substract starting fixed and variable part from tempSegment
    tempSegment = tempSegment.substr(matchedIndex + match.length);
  });

  // add last fixed part if present
  (tempSegment.length > 0) && (fixedParts.push(tempSegment));

  return fixedParts;
}
Finds fixed parts present in path segment of collection or schema.

@param {String} segment - Path segment
@param {String} pathType - Path type (one of 'collection' / 'schema')
@returns {Array} - Array of strings where each element is fixed part in order of their occurence