Skip to content

Commit

Permalink
nicer log for convert
Browse files Browse the repository at this point in the history
  • Loading branch information
barduinor committed Sep 14, 2023
1 parent ce1ee4c commit 6071327
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,16 @@ class Collection {
* Process the OpenAPI object and returns a Postman 2.1 collection
*/
process () {
return {
console.log('Processing collection')
const collection = {
info: this.getInfo(),
item: this.getItems(),
event: [],
variable: this.getVariables(),
auth: this.defaultAuth()
}
console.log('Done')
return collection
}

// PRIVATE
Expand Down Expand Up @@ -209,6 +212,9 @@ class Collection {
}
const folderId = Utils.GenID(JSON.stringify(folder))
folder.id = folderId
if (this.verbose) {
console.log(` Adding Folder [${folder.name}]`)
}
return folder
}

Expand Down Expand Up @@ -243,7 +249,7 @@ class Collection {
const parent = this.findFolder(endpoint)
parent.push(item)
if (this.verbose) {
console.log(`${item.name} [${item.id}] added to collection`)
console.log(` Adding Request [${item.name}]`)
}
} catch (e) {

Expand Down

0 comments on commit 6071327

Please sign in to comment.