MCPcopy Index your code
hub / github.com/massCodeIO/massCode / openApiTemplateToVariables

Function openApiTemplateToVariables

src/main/http/import/openapi.ts:105–112  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

103}
104
105function openApiTemplateToVariables(value: string): string {
106 return value
107 .replaceAll('%7B%7B', '__MASSCODE_OPEN_VAR__')
108 .replaceAll('%7D%7D', '__MASSCODE_CLOSE_VAR__')
109 .replace(/\{([^{}]+)\}/g, '{{$1}}')
110 .replaceAll('__MASSCODE_OPEN_VAR__', '{{')
111 .replaceAll('__MASSCODE_CLOSE_VAR__', '}}')
112}
113
114function joinUrl(baseUrl: string, path: string): string {
115 const normalizedBase = openApiTemplateToVariables(baseUrl).replace(

Callers 1

joinUrlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected