Skip to content
This repository has been archived by the owner on Dec 27, 2024. It is now read-only.

Commit

Permalink
fix: remove not needed code for feature
Browse files Browse the repository at this point in the history
  • Loading branch information
joolfe committed Mar 26, 2021
1 parent de025fd commit 48d7952
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,13 @@ async function postmanToOpenApi (input, output, { info = {}, defaultTag = 'defau
const { item, name, description: tagDesc } = element
const tagged = item.map(e => ({ ...e, tag: element.tag ? element.tag + ' > ' + name : name }))
tags[element.tag ? element.tag + ' > ' + name : name] = tagDesc
if (tagged.length) {
items.splice(i, 1, ...tagged)
element = tagged.shift()
} else {
element = null
break
}
}
if (!element) {
continue
items.splice(i, 1, ...tagged)
element = tagged.shift()
}
const {
request: { url, method, body, description: rawDesc, header },
name: summary, tag = defaultTag, event: events
} = element

if (url.raw === '') {
console.log(`Empty url for request '${summary}'. Ignoring this request`)
continue
}
const { path, query, protocol, host, port } = scrapeURL(url)
domains.add(calculateDomains(protocol, host, port))
const joinedPath = calculatePath(path, pathDepth)
Expand Down

0 comments on commit 48d7952

Please sign in to comment.