openapi-to-postmanv2
Advanced tools
Comparing version 4.23.1 to 4.24.0
@@ -5,2 +5,12 @@ # OpenAPI-Postman Changelog | ||
## [v4.24.0] - 2024-08-13 | ||
### Added | ||
- [#98](https://github.com/postmanlabs/openapi-to-postman/issues/98) [12255](https://github.com/postmanlabs/postman-app-support/issues/12255) Added support for readOnly and writeOnly properties to be correctly present in generated collection. | ||
### Chore | ||
- Replaced traverse with neotraverse. | ||
## [v4.23.1] - 2024-07-22 | ||
@@ -641,4 +651,6 @@ | ||
[Unreleased]: https://github.com/postmanlabs/openapi-to-postman/compare/v4.23.1...HEAD | ||
[Unreleased]: https://github.com/postmanlabs/openapi-to-postman/compare/v4.24.0...HEAD | ||
[v4.24.0]: https://github.com/postmanlabs/openapi-to-postman/compare/v4.23.1...v4.24.0 | ||
[v4.23.1]: https://github.com/postmanlabs/openapi-to-postman/compare/v4.22.0...v4.23.1 | ||
@@ -645,0 +657,0 @@ |
@@ -17,3 +17,3 @@ const _ = require('lodash'), | ||
} = require('./jsonPointer'), | ||
traverseUtility = require('traverse'), | ||
traverseUtility = require('neotraverse/legacy'), | ||
parse = require('./parse.js'), | ||
@@ -20,0 +20,0 @@ { ParseError } = require('./common/ParseError'), |
@@ -38,3 +38,3 @@ const _ = require('lodash'), | ||
DEFAULT_SCHEMA_UTILS = require('./30XUtils/schemaUtils30X'), | ||
traverseUtility = require('traverse'), | ||
traverseUtility = require('neotraverse/legacy'), | ||
PROPERTIES_TO_ASSIGN_ON_CASCADE = ['type', 'nullable']; | ||
@@ -41,0 +41,0 @@ |
const parse = require('./parse.js'), | ||
traverseUtility = require('traverse'), | ||
traverseUtility = require('neotraverse/legacy'), | ||
BROWSER = 'browser', | ||
@@ -4,0 +4,0 @@ { DFS } = require('./dfs'), |
const _ = require('lodash'), | ||
jsonPointer = require('json-pointer'), | ||
{ Item } = require('postman-collection/lib/collection/item'), | ||
@@ -203,4 +204,46 @@ { Response } = require('postman-collection/lib/collection/response'), | ||
/** | ||
* Adds provided property array to the given JSON path | ||
* | ||
* @param {string} jsonPath - JSON path to which properties should be added | ||
* @param {array} propArray - Array of properties to be added to JSON path | ||
* @returns {string} - Combined JSON path | ||
*/ | ||
addToJsonPath: function (jsonPath, propArray) { | ||
const jsonPathArray = jsonPointer.parse(jsonPath), | ||
escapedPropArray = _.map(propArray, (prop) => { | ||
return jsonPointer.escape(prop); | ||
}); | ||
return jsonPointer.compile(jsonPathArray.concat(escapedPropArray)); | ||
}, | ||
/** | ||
* Merges two JSON paths. i.e. Parent JSON path and Child JSON path | ||
* | ||
* @param {string} parentJsonPath - Parent JSON path | ||
* @param {string} childJsonPath - Child JSON path | ||
* @returns {string} - Merged JSON path | ||
*/ | ||
mergeJsonPath: function (parentJsonPath, childJsonPath) { | ||
let jsonPathArray = jsonPointer.parse(parentJsonPath); | ||
// Merges childJsonPath with parentJsonPath | ||
jsonPathArray = jsonPathArray.concat(jsonPointer.parse(childJsonPath)); | ||
return jsonPointer.compile(jsonPathArray); | ||
}, | ||
/** | ||
* Gets JSON path in array from string JSON path | ||
* | ||
* @param {string} jsonPath - input JSON path | ||
* @returns {array} - Parsed JSON path (each part is distributed in an array) | ||
*/ | ||
getJsonPathArray: function (jsonPath) { | ||
return jsonPointer.parse(jsonPointer.unescape(jsonPath)); | ||
}, | ||
generatePmResponseObject, | ||
generateRequestItemObject | ||
}; |
{ | ||
"name": "openapi-to-postmanv2", | ||
"version": "4.23.1", | ||
"version": "4.24.0", | ||
"description": "Convert a given OpenAPI specification to Postman Collection v2.0", | ||
@@ -125,4 +125,6 @@ "homepage": "https://github.com/postmanlabs/openapi-to-postman", | ||
"js-yaml": "4.1.0", | ||
"json-pointer": "0.6.2", | ||
"json-schema-merge-allof": "0.8.1", | ||
"lodash": "4.17.21", | ||
"neotraverse": "0.6.15", | ||
"oas-resolver-browser": "2.5.6", | ||
@@ -134,3 +136,2 @@ "object-hash": "3.0.0", | ||
"swagger2openapi": "7.0.8", | ||
"traverse": "0.6.6", | ||
"yaml": "1.10.2" | ||
@@ -137,0 +138,0 @@ }, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
1870390
48766
17
+ Addedjson-pointer@0.6.2
+ Addedneotraverse@0.6.15
+ Addedforeach@2.0.6(transitive)
+ Addedjson-pointer@0.6.2(transitive)
+ Addedneotraverse@0.6.15(transitive)
- Removedtraverse@0.6.6
- Removedtraverse@0.6.6(transitive)