(value: string)
| 103 | } |
| 104 | |
| 105 | function 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 | |
| 114 | function joinUrl(baseUrl: string, path: string): string { |
| 115 | const normalizedBase = openApiTemplateToVariables(baseUrl).replace( |