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

Function deriveLeaf

packages/plugins/openapi/src/sdk/definitions.ts:111–120  ·  view source on GitHub ↗
(
  operationId: string,
  method: string,
  pathTemplate: string,
  group: string,
)

Source from the content-addressed store, hash-verified

109};
110
111const deriveLeaf = (
112 operationId: string,
113 method: string,
114 pathTemplate: string,
115 group: string,
116): string => {
117 const preferred = toCamelCase(deriveLeafSeed(operationId, group));
118 if (preferred.length > 0 && preferred !== group) return preferred;
119 return toCamelCase(fallbackLeafSeed(method, pathTemplate, group));
120};
121
122// ---------------------------------------------------------------------------
123// Public types

Callers 1

planToolPathsFunction · 0.85

Calls 3

toCamelCaseFunction · 0.85
deriveLeafSeedFunction · 0.85
fallbackLeafSeedFunction · 0.85

Tested by

no test coverage detected