docs: function crawl (parent, key, path, pathFromRoot, indirections, inventory, $refs, options) {
    var obj = key === null ? parent : parent[key];
  
    if (obj && typeof obj === "object") {
      if ($Ref.isAllowed$Ref(obj)) {
        inventory$Ref(parent, key, path, pathFromRoot, indirections, inventory, $refs, options);
      }
      else {
        // Crawl the object in a specific order that's optimized for bundling.
        // This is important because it determines how `pathFromRoot` gets built,
        // which later determines which keys get dereferenced and which ones get remapped
        var keys = Object.keys(obj)
          .sort(function (a, b) {
            // Most people will expect references to be bundled into the the "definitions" property,
            // so we always crawl that property first, if it exists.
            if (a === "definitions") {
              return -1;
            }
            else if (b === "definitions") {
              return 1;
            }
            else {
              // Otherwise, crawl the keys based on their length.
              // This produces the shortest possible bundled references
              return a.length - b.length;
            }
          });
  
        keys.forEach(function (key) {
          var keyPath = Pointer.join(path, key);
          var keyPathFromRoot = Pointer.join(pathFromRoot, key);
          var value = obj[key];
  
          if ($Ref.isAllowed$Ref(value)) {
            inventory$Ref(obj, key, path, keyPathFromRoot, indirections, inventory, $refs, options);
          }
          else {
            crawl(obj, key, keyPath, keyPathFromRoot, indirections, inventory, $refs, options);
          }
        });
      }
    }
  }