MCPcopy Create free account
hub / github.com/middleapi/orpc / toRou3Pattern

Function toRou3Pattern

packages/openapi/src/adapters/standard/utils.ts:10–12  ·  view source on GitHub ↗
(path: HTTPPath)

Source from the content-addressed store, hash-verified

8 * @internal
9 */
10export function toRou3Pattern(path: HTTPPath): string {
11 return standardizeHTTPPath(path).replace(/\/\{\+([^}]+)\}/g, '/**:$1').replace(/\/\{([^}]+)\}/g, '/:$1')
12}
13
14/**
15 * @internal

Callers 2

initMethod · 0.90
utils.test.tsFile · 0.90

Calls 2

standardizeHTTPPathFunction · 0.90
replaceMethod · 0.65

Tested by

no test coverage detected