Skip to content

Commit 7c749b3

Browse files
committed
use a variable for baseurl when mulitple url options are present in spec
1 parent 31d7ade commit 7c749b3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/flowtest-electron/src/utils/collection.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const parseOpenAPISpec = (collection) => {
2727
let parsedNodes = [];
2828
try {
2929
// servers is array,, figure case where there can be multiple servers
30-
const baseUrl = collection['servers'][0]['url'];
30+
const baseUrl = collection['servers'].length > 1 ? '{baseUrl}' : collection['servers'][0]['url'];
3131
Object.entries(collection['paths']).map(([path, operations], _) => {
3232
const commonParameters = Object.prototype.hasOwnProperty.call(operations, 'parameters')
3333
? operations['parameters']

0 commit comments

Comments
 (0)