MCPcopy
hub / github.com/AndrewWalsh/openapi-devtools / parameterise

Method parameterise

src/lib/RequestStore.ts:115–132  ·  view source on GitHub ↗
(
    index: number,
    path: string,
    host: string
  )

Source from the content-addressed store, hash-verified

113 }
114
115 public parameterise(
116 index: number,
117 path: string,
118 host: string
119 ): string | null {
120 const result = parameterise({ store: this.store, index, path, host });
121 if (!result) return null;
122 const { removedPaths, insertedPath, insertedLeaf } = result;
123 const unsetLeafMap = (path: string) => unset(this.leafMap[host], path);
124 removedPaths.concat([path]).forEach(unsetLeafMap);
125 insertLeafMap({
126 leafMap: this.leafMap,
127 host,
128 leaf: insertedLeaf,
129 path: insertedPath,
130 });
131 return insertedPath;
132 }
133
134 public setDisabledHosts(disabledHosts: Set<string>): void {
135 this.disabledHosts = disabledHosts;

Callers 3

insertMethod · 0.95
MainFunction · 0.80

Calls 2

parameteriseFunction · 0.90
insertLeafMapFunction · 0.90

Tested by

no test coverage detected