MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / keptPathItem

Function keptPathItem

packages/plugins/openapi/src/sdk/extract.ts:778–786  ·  view source on GitHub ↗
(range: ByteRange)

Source from the content-addressed store, hash-verified

776 // Parse one path-item range to its kept (optionally trimmed) value, applying
777 // `keepPathItem` identically in both passes so the operation index aligns.
778 const keptPathItem = (range: ByteRange): readonly [string, PathItemObject] | null => {
779 const entry = parseEntry(structure.text, range, 2);
780 if (!entry) return null;
781 const [path, rawValue] = entry;
782 if (!isPathItemValue(rawValue)) return null;
783 if (!keepPathItem) return [path, rawValue as PathItemObject];
784 const kept = keepPathItem(path, rawValue);
785 return kept ? [path, kept as PathItemObject] : null;
786 };
787
788 // Pass 1 (light): collect schema-free tool-path planning metadata in
789 // document order. No bindings, no schemas; one path-item resident at a time.

Callers 1

Calls 2

parseEntryFunction · 0.90
isPathItemValueFunction · 0.85

Tested by

no test coverage detected