getPathMethods = function(pathKeys) {
        var methods = [];
        // TODO: Show warning for incorrect schema if !pathKeys
        pathKeys && pathKeys.forEach(function(element) {
          if (METHODS.includes(element)) {
            methods.push(element);
          }
        });
        return methods;
      }
Generates a Trie-like folder structure from the root path object of the OpenAPI specification.
@param {Object} spec - specification in json format
@param {object} options - a standard list of options that's globally passed around. Check options.js for more.
@param {boolean} fromWebhooks - true when we are creating the webhooks group trie - default: false
@returns {Object} - The final object consists of the tree structure