diff --git a/lib/spec/openapi/utils.js b/lib/spec/openapi/utils.js index 8787efad..da135b42 100644 --- a/lib/spec/openapi/utils.js +++ b/lib/spec/openapi/utils.js @@ -88,7 +88,7 @@ function normalizeUrl (url, serverUrls, stripBasePath) { function resolveServerUrls (servers) { const resolvedUrls = [] - const findVariablesRegex = /\{(.*?)\}/gu // As for OpenAPI v3 spec url variables are named in brackets, e.g. {foo} + const findVariablesRegex = /\{([^{}]+)\}/gu // As for OpenAPI v3 spec url variables are named in brackets, e.g. {foo} servers = Array.isArray(servers) ? servers : [] for (const server of servers) {