mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 06:39:48 +00:00
Fix undefined id causing improper import (#1302)
Fix undefined id causing improper import
This commit is contained in:
parent
931f01c447
commit
7bdd40892d
@ -122,8 +122,9 @@ function parseEndpoints(document) {
|
|||||||
let { tags } = endpointSchema;
|
let { tags } = endpointSchema;
|
||||||
if (!tags || tags.length == 0) tags = [''];
|
if (!tags || tags.length == 0) tags = [''];
|
||||||
tags.forEach((tag, index) => {
|
tags.forEach((tag, index) => {
|
||||||
let id =
|
let id = endpointSchema.operationId
|
||||||
endpointSchema.operationId + (index > 0 ? index : '') || `__REQUEST_${requestCount++}__`;
|
? `${endpointSchema.operationId}${index > 0 ? index : ''}`
|
||||||
|
: `__REQUEST_${requestCount++}__`;
|
||||||
let parentId = folderLookup[tag] || defaultParent;
|
let parentId = folderLookup[tag] || defaultParent;
|
||||||
requests.push(importRequest(endpointSchema, globalMimeTypes, id, parentId));
|
requests.push(importRequest(endpointSchema, globalMimeTypes, id, parentId));
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user