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

Function decodeSchemaRefName

packages/plugins/openapi/src/sdk/split.ts:324–325  ·  view source on GitHub ↗
(segment: string)

Source from the content-addressed store, hash-verified

322 * YAML keys, so only JSON-pointer tilde escaping can appear (no `%`-encoding
323 * in the wild specs we target); decode `~1`/`~0` and leave the rest verbatim. */
324const decodeSchemaRefName = (segment: string): string =>
325 segment.replace(/~1/g, "/").replace(/~0/g, "~");
326
327/** Collect the names of every `#/components/schemas/X` reference reachable in
328 * `value`, without resolving them. */

Callers 1

collectSchemaRefNamesFunction · 0.85

Calls 1

replaceMethod · 0.65

Tested by

no test coverage detected