MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / toFastifyPath

Function toFastifyPath

packages/server/src/middleware/defineRoute.ts:51–53  ·  view source on GitHub ↗

Convert OpenAPI `{param}` segments to Fastify `:param` segments.

(openApiPath: string)

Source from the content-addressed store, hash-verified

49
50/** Convert OpenAPI `{param}` segments to Fastify `:param` segments. */
51function toFastifyPath(openApiPath: string): string {
52 return openApiPath.replace(/\{([^}]+)\}/g, ':$1');
53}
54
55// ---------------------------------------------------------------------------
56// Schema builders

Callers 1

defineRouteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected