(s, o, i = {})
| 55105 | ? s |
| 55106 | : encodeURIComponent(s).replace(/%5B/g, '[').replace(/%5D/g, ']'), |
| 55107 | Rx = ['literals', 'server-variable-name'], |
| 55108 | es_substitute = (s, o, i = {}) => { |
| 55109 | const a = { ...{ encoder: encodeServerVariable }, ...i }, |
| 55110 | u = openapi_server_url_templating_es_parse(s) |
| 55111 | if (!u.result.success) return s |
| 55112 | const _ = [] |
| 55113 | u.ast.translate(_) |
| 55114 | const w = _.filter(([s]) => Rx.includes(s)).map(([s, i]) => |
| 55115 | 'server-variable-name' === s |
| 55116 | ? Object.hasOwn(o, i) |
| 55117 | ? a.encoder(o[i], i) |
| 55118 | : `{${i}}` |
| 55119 | : i |
| 55120 | ) |
| 55121 | return w.join('') |
| 55122 | } |
| 55123 | function path_templating_grammar() { |
| 55124 | ;((this.grammarObject = 'grammarObject'), |
no test coverage detected