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

Function deriveLeafSeed

packages/plugins/openapi/src/sdk/definitions.ts:88–97  ·  view source on GitHub ↗
(operationId: string, group: string)

Source from the content-addressed store, hash-verified

86 .filter((s) => s.length > 0);
87
88const deriveLeafSeed = (operationId: string, group: string): string => {
89 const segments = splitOperationIdSegments(operationId);
90 if (segments.length > 1) {
91 const [first, ...rest] = segments;
92 if ((normalizeGroupSegment(first) ?? first) === group && rest.length > 0) {
93 return rest.join(" ");
94 }
95 }
96 return operationId;
97};
98
99const fallbackLeafSeed = (method: string, pathTemplate: string, group: string): string => {
100 const relevantSegments = pathSegmentsFromTemplate(pathTemplate)

Callers 1

deriveLeafFunction · 0.85

Calls 2

splitOperationIdSegmentsFunction · 0.85
normalizeGroupSegmentFunction · 0.85

Tested by

no test coverage detected