From 21cb1686e17fa26fc74007cfd34aec1a6001f681 Mon Sep 17 00:00:00 2001 From: Pavel Nedelko Date: Fri, 8 Sep 2023 16:25:29 +0200 Subject: [PATCH] fix escapeUrlDots --- lib/utils/addCredentialsForComponentJson.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/utils/addCredentialsForComponentJson.js b/lib/utils/addCredentialsForComponentJson.js index a5674fa..19033d6 100644 --- a/lib/utils/addCredentialsForComponentJson.js +++ b/lib/utils/addCredentialsForComponentJson.js @@ -1,9 +1,11 @@ const _ = require("lodash"); +function escapeUrlDots(url) { + return url.replace(/\./g, "%2E"); +} + module.exports = { - escapeUrlDots: (url) => { - return url.replace(/\./g, "%2E"); - }, + escapeUrlDots, /** * Create a list of security schemes if they are not found in the original OpenAPI description