Skip to content

Commit

Permalink
Merge pull request #140 from joolfe/develop
Browse files Browse the repository at this point in the history
Fix missing variable field cause an error
  • Loading branch information
joolfe authored Aug 5, 2021
2 parents 9c26105 + 512673e commit a7630eb
Show file tree
Hide file tree
Showing 5 changed files with 278 additions and 208 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
### [1.16.1](https://github.com/joolfe/postman-to-openapi/compare/1.16.0...1.16.1) (2021-08-05)


### Bug Fixes

* fail when collection don't have ´variable´ parameter ([bb02ad6](https://github.com/joolfe/postman-to-openapi/commit/bb02ad64dcf49e27e3d48cfeed71f08bc3064b29))


### Build System

* update version and deps ([c95d377](https://github.com/joolfe/postman-to-openapi/commit/c95d37761798e8cf456cfe071ede2e7e634afc6c))

## [1.16.0](https://github.com/joolfe/postman-to-openapi/compare/1.15.0...1.16.0) (2021-08-01)


Expand Down
2 changes: 1 addition & 1 deletion lib/var-replacer.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Mustache.Writer.prototype.escapedValue = function escapedValue (token, context,

function replacePostmanVariables (collectionString, additionalVars = {}) {
const postmanJson = JSON.parse(collectionString)
const { variable } = postmanJson
const { variable = [] } = postmanJson
const formatVars = variable.reduce((obj, { key, value }) => {
obj[key] = value
return obj
Expand Down
Loading

0 comments on commit a7630eb

Please sign in to comment.