feat: set default names for folders and requests in Postman collection importer

This commit is contained in:
Pragadesh-45
2025-03-19 16:11:51 +05:30
committed by Anoop M D
parent 7a8a0ae37e
commit e4c37b916a

View File

@@ -185,7 +185,7 @@ const importPostmanV2CollectionItem = (brunoParent, item, parentAuth, options) =
each(item, (i) => {
if (isItemAFolder(i)) {
const baseFolderName = i.name;
const baseFolderName = i.name || 'Untitled Folder';
let folderName = baseFolderName;
let count = 1;
@@ -236,7 +236,7 @@ const importPostmanV2CollectionItem = (brunoParent, item, parentAuth, options) =
return;
}
const baseRequestName = i.name;
const baseRequestName = i.name || 'Untitled Request';
let requestName = baseRequestName;
let count = 1;
@@ -545,7 +545,7 @@ const searchLanguageByHeader = (headers) => {
const importPostmanV2Collection = (collection, options) => {
const brunoCollection = {
name: collection.info.name,
name: collection.info.name || 'New Collection',
uid: uuid(),
version: '1',
items: [],
@@ -553,7 +553,7 @@ const importPostmanV2Collection = (collection, options) => {
root: {
docs: collection.info.description || '',
meta: {
name: collection.info.name
name: collection.info.name || 'New Collection'
},
request: {
auth: {