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

Commit

Permalink
docs: fix documentation code examples
Browse files Browse the repository at this point in the history
  • Loading branch information
joolfe committed Aug 3, 2020
1 parent 2f14a29 commit 8efbdda
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,16 @@ const outputFile = './api/collection.yml'

// Async/await
try {
const result = await postmanToOpenApi(postmanCollection, outputFile, { save: true })
const result = await postmanToOpenApi(postmanCollection, outputFile, { defaultTag: 'General' })
// Without save the result in a file
const result2 = await postmanToOpenApi(postmanCollection, null, { save: true })
const result2 = await postmanToOpenApi(postmanCollection, null, { defaultTag: 'General' })
console.log(`OpenAPI specs: ${result}`)
} catch (err) {
console.log(err)
}

// Promise callback style
postmanToOpenApi(postmanCollection, outputFile, { save: true })
postmanToOpenApi(postmanCollection, outputFile, { defaultTag: 'General' })
.then(result => {
console.log(`OpenAPI specs: ${result}`)
})
Expand Down

0 comments on commit 8efbdda

Please sign in to comment.