function generateObjectName(filePathName, hash = '') {
  let decodedRef = jsonPointerDecodeAndReplace(filePathName),
    validName = decodedRef.replace(/\//g, '_').replace(/#/g, '-'),
    hashPart = hash ? `_${hash}` : '';
  validName = `${validName.replace(/[^a-zA-Z0-9\.\-_]/g, '')}${hashPart}`;
  return validName;
}
Get a path and return a valid key name in openapi spec
@param {string} filePathName - The filePath from the ref called
@param {string} hash - A calculated hash to join with the resultant generatedName
@returns {string} A valid in openapi object name