openapi-to-postmanv2
Advanced tools
Comparing version 4.19.0 to 4.20.0
@@ -5,2 +5,8 @@ # OpenAPI-Postman Changelog | ||
## [v4.20.0] - 2024-02-15 | ||
### Added | ||
- Added support for reporting UserErrors in case when OpenAPI definition to converted is invalid. | ||
## [v4.19.0] - 2024-01-18 | ||
@@ -606,4 +612,6 @@ | ||
[Unreleased]: https://github.com/postmanlabs/openapi-to-postman/compare/v4.19.0...HEAD | ||
[Unreleased]: https://github.com/postmanlabs/openapi-to-postman/compare/v4.20.0...HEAD | ||
[v4.20.0]: https://github.com/postmanlabs/openapi-to-postman/compare/v4.19.0...v4.20.0 | ||
[v4.19.0]: https://github.com/postmanlabs/openapi-to-postman/compare/v4.18.0...v4.19.0 | ||
@@ -610,0 +618,0 @@ |
@@ -6,3 +6,5 @@ 'use strict'; | ||
const _ = require('lodash'), | ||
SchemaPack = require('./lib/schemapack.js').SchemaPack; | ||
SchemaPack = require('./lib/schemapack.js').SchemaPack, | ||
UserError = require('./lib/common/UserError'), | ||
DEFAULT_INVALID_ERROR = 'Provided definition is invalid'; | ||
@@ -17,3 +19,3 @@ module.exports = { | ||
} | ||
return cb(null, schema.validationResult); | ||
return cb(new UserError(_.get(schema, 'validationResult.reason', DEFAULT_INVALID_ERROR))); | ||
}, | ||
@@ -28,3 +30,3 @@ | ||
return cb(null, schema.validationResult); | ||
return cb(new UserError(_.get(schema, 'validationResult.reason', DEFAULT_INVALID_ERROR))); | ||
}, | ||
@@ -31,0 +33,0 @@ |
{ | ||
"name": "openapi-to-postmanv2", | ||
"version": "4.19.0", | ||
"version": "4.20.0", | ||
"description": "Convert a given OpenAPI specification to Postman Collection v2.0", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/postmanlabs/openapi-to-postman", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1851780
48465