From 3a58c6d3bd17800941a7f25da50b4542e05a1e4d Mon Sep 17 00:00:00 2001 From: anusreesubash <65728079+anusreesubash@users.noreply.github.com> Date: Tue, 24 Sep 2024 12:34:14 +0530 Subject: [PATCH] Bugfix/openapi ensure url (#3183) * added validations for spec and ref * openapi import - cleanup url --------- Co-authored-by: Anusree Subash --- packages/bruno-app/src/utils/importers/openapi-collection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/bruno-app/src/utils/importers/openapi-collection.js b/packages/bruno-app/src/utils/importers/openapi-collection.js index 3bfe8394f1..fd25b7f514 100644 --- a/packages/bruno-app/src/utils/importers/openapi-collection.js +++ b/packages/bruno-app/src/utils/importers/openapi-collection.js @@ -32,7 +32,7 @@ const readFile = (files) => { const ensureUrl = (url) => { // emoving multiple slashes after the protocol if it exists, or after the beginning of the string otherwise - return url.replace(/(^\w+:|^)\/{2,}/, '$1/'); + return url.replace(/([^:])\/{2,}/g, '$1/'); }; const buildEmptyJsonBody = (bodySchema) => {