openapi-to-postmanv2
Advanced tools
Comparing version 4.18.0 to 4.19.0
@@ -5,2 +5,4 @@ # OpenAPI-Postman Changelog | ||
## [v4.19.0] - 2024-01-18 | ||
## [v4.18.0] - 2023-09-28 | ||
@@ -604,4 +606,6 @@ | ||
[Unreleased]: https://github.com/postmanlabs/openapi-to-postman/compare/v4.18.0...HEAD | ||
[Unreleased]: https://github.com/postmanlabs/openapi-to-postman/compare/v4.19.0...HEAD | ||
[v4.19.0]: https://github.com/postmanlabs/openapi-to-postman/compare/v4.18.0...v4.19.0 | ||
[v4.18.0]: https://github.com/postmanlabs/openapi-to-postman/compare/v4.17.0...v4.18.0 | ||
@@ -608,0 +612,0 @@ |
@@ -704,3 +704,3 @@ const _ = require('lodash'), | ||
notInLine.forEach(([key, value]) => { | ||
let [, partial] = key.split(localPointer); | ||
let [nodeRef, partial] = key.split(localPointer); | ||
if (documentContext.globalReferences[key].refHasContent) { | ||
@@ -710,3 +710,3 @@ setValueInComponents( | ||
components, | ||
getContentFromTrace(documentContext.nodeContents[key], partial), | ||
getContentFromTrace(documentContext.nodeContents[nodeRef], partial), | ||
COMPONENTS_KEYS | ||
@@ -713,0 +713,0 @@ ); |
@@ -136,3 +136,8 @@ const _ = require('lodash'), | ||
// for keywords in OpenAPI schema that are not standard defined JSON schema keywords, use default resolver | ||
defaultResolver: (compacted) => { return compacted[0]; } | ||
defaultResolver: (compacted) => { return compacted[0]; }, | ||
// Default resolver seems to fail for enum, so adding custom resolver that will return all unique enum values | ||
enum: (values) => { | ||
return _.uniq(_.concat(...values)); | ||
} | ||
} | ||
@@ -139,0 +144,0 @@ }); |
@@ -36,6 +36,7 @@ var yaml = require('js-yaml'), | ||
try { | ||
let obj = yaml.safeLoad(spec, { | ||
let obj = yaml.load(spec, { | ||
schema: yaml.JSON_SCHEMA | ||
}); | ||
// yaml.safeLoad does not throw errors for most of the cases in invalid yaml | ||
// yaml.safeLoad is removed in js-yaml 4. Hence Using yaml.load instead, which is now safe by default. | ||
// hence check if it returned an object | ||
@@ -42,0 +43,0 @@ if (typeof obj !== 'object') { |
{ | ||
"name": "openapi-to-postmanv2", | ||
"version": "4.18.0", | ||
"version": "4.19.0", | ||
"description": "Convert a given OpenAPI specification to Postman Collection v2.0", | ||
@@ -124,3 +124,3 @@ "homepage": "https://github.com/postmanlabs/openapi-to-postman", | ||
"commander": "2.20.3", | ||
"js-yaml": "3.14.1", | ||
"js-yaml": "4.1.0", | ||
"json-schema-merge-allof": "0.8.1", | ||
@@ -127,0 +127,0 @@ "lodash": "4.17.21", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
1851346
48463
+ Addedargparse@2.0.1(transitive)
+ Addedjs-yaml@4.1.0(transitive)
- Removedargparse@1.0.10(transitive)
- Removedesprima@4.0.1(transitive)
- Removedjs-yaml@3.14.1(transitive)
- Removedsprintf-js@1.0.3(transitive)
Updatedjs-yaml@4.1.0