Socket
Socket
Sign inDemoInstall

openapi-to-postmanv2

Package Overview
Dependencies
Maintainers
10
Versions
172
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openapi-to-postmanv2 - npm Package Compare versions

Comparing version 4.23.1 to 4.24.0

14

CHANGELOG.md

@@ -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 @@

2

lib/bundle.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc