fix: import openapi file servers url detection (#4373)
Co-authored-by: Claudio Pennati <claudio.pennati@lastminute.com>
This commit is contained in:
parent
98a2631ba4
commit
35a471f120
1 changed files with 1 additions and 1 deletions
|
|
@ -735,7 +735,7 @@ const parseOpenAPIUrl = (
|
||||||
* Relevant v3 reference: https://swagger.io/specification/#server-object
|
* Relevant v3 reference: https://swagger.io/specification/#server-object
|
||||||
**/
|
**/
|
||||||
if (objectHasProperty(doc, "servers")) {
|
if (objectHasProperty(doc, "servers")) {
|
||||||
return doc.servers?.[0].url ?? "<<baseUrl>>"
|
return doc.servers?.[0]?.url ?? "<<baseUrl>>"
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the document is neither v2 nor v3 then return a env variable as placeholder
|
// If the document is neither v2 nor v3 then return a env variable as placeholder
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue