Skip to content

Commit

Permalink
openapi import - cleanup url
Browse files Browse the repository at this point in the history
  • Loading branch information
Anusree Subash committed Sep 23, 2024
1 parent 29a0052 commit f186ee7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit f186ee7

Please sign in to comment.