fix(common): handle missing host and basePath in OpenAPI URL parsing (#4908)

Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com>
This commit is contained in:
Anwarul Islam 2025-03-19 14:20:03 +06:00 committed by GitHub
parent 2b5395011a
commit 5f3a7754d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -745,7 +745,9 @@ const parseOpenAPIUrl = (
**/
if (objectHasProperty(doc, "swagger")) {
return `${doc.host}${doc.basePath}`
const { host = "<<baseUrl>>", basePath = "" } =
doc satisfies OpenAPIV2.Document
return `${host}${basePath}`
}
/**