Bugfix/openapi ensure url (#3183)

* added validations for spec and ref

* openapi import - cleanup url

---------

Co-authored-by: Anusree Subash <anusree@usebruno.com>
This commit is contained in:
anusreesubash 2024-09-24 12:34:14 +05:30 committed by GitHub
parent 4ef5534d41
commit 3a58c6d3bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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) => {