function getRootFileTrace(nodeParents) {
  let trace = [];
  for (let parentKey of nodeParents) {
    if ([undefined, 'oasObject'].includes(parentKey)) {
      break;
    }
    trace.push(parentKey);
  }
  return trace.reverse();
}
Return a trace from the first parent node name attachable in components object
@param {array} nodeParents - The parent node's name from the current node
@returns {array} A trace from the first node name attachable in components object