Skip to content

Commit

Permalink
Bugfix/openapi ensure url (#3183)
Browse files Browse the repository at this point in the history
* added validations for spec and ref

* openapi import - cleanup url

---------

Co-authored-by: Anusree Subash <[email protected]>
  • Loading branch information
anusreesubash and Anusree Subash committed Sep 24, 2024
1 parent 4ef5534 commit 3a58c6d
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 3a58c6d

Please sign in to comment.