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

Commit

Permalink
Merge pull request #202 from joolfe/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
joolfe authored Jul 25, 2022
2 parents 73718f5 + e2624c0 commit e4cbd34
Show file tree
Hide file tree
Showing 7 changed files with 1,627 additions and 1,188 deletions.
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
### [2.4.1](https://github.com/joolfe/postman-to-openapi/compare/2.2.1...2.4.1) (2022-07-25)


### Features

* request bodies & examples with json comments ([a2df3a6](https://github.com/joolfe/postman-to-openapi/commit/a2df3a697c83022faa8bdec37b60671dc7fefc4d))


### Bug Fixes

* support null body in examples responses ([14093e3](https://github.com/joolfe/postman-to-openapi/commit/14093e38f06cf06f465d7714c7a92a59f1a8612b))
* trying to fix lint ([5e57b58](https://github.com/joolfe/postman-to-openapi/commit/5e57b5835de523210b54b1427b0687c669acf362))


### Documentation

* update changelog ([62b9ef0](https://github.com/joolfe/postman-to-openapi/commit/62b9ef0236c0cdef2a2942f4b779401428a29d58))
* update CHANGELOG ([78a0895](https://github.com/joolfe/postman-to-openapi/commit/78a0895e14b41105c0f16ed908a83096b7a3565b))


### Build System

* update deps ([97c1e50](https://github.com/joolfe/postman-to-openapi/commit/97c1e50e6c0195d6167ac8b73e76008e7bc1e106))
* update deps ([6745a1d](https://github.com/joolfe/postman-to-openapi/commit/6745a1d6ab2a1cb7b0ffecf963c06240b9d3182b))
* update version ([1d1c7ca](https://github.com/joolfe/postman-to-openapi/commit/1d1c7ca863848719f7158e49f62e86dd3d02d30e))
* update version ([f2c6ba5](https://github.com/joolfe/postman-to-openapi/commit/f2c6ba535d27e5d030267bd656a5bb799b91f8a3))

## [2.4.0](https://github.com/joolfe/postman-to-openapi/compare/2.2.1...2.4.0) (2022-06-18)


Expand Down
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ function parseExamples (bodies, language) {
function safeSampleParse (body, name, language) {
if (language === 'json') {
const errors = []
const parsedBody = jsonc.parse((body.trim().length === 0) ? '{}' : body, errors)
const parsedBody = jsonc.parse((body === null || body.trim().length === 0) ? '{}' : body, errors)
if (errors.length > 0) {
throw new Error('Error parsing response example "' + name + '"')
}
Expand Down
Loading

0 comments on commit e4cbd34

Please sign in to comment.