Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

openapi-to-postmanv2

Package Overview
Dependencies
Maintainers
8
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.9.0-beta.36 to 4.9.0-beta.37

5

CHANGELOG.md
# OpenAPI-Postman Changelog
#### v4.10.0 (March 08, 2023)
* Added support for convertV2() interface which has more stacklimit for schema resolution.
* Added support for validateTransactionV2() interface uses same v2 interface for resolving schema.
* Fixed multiple issues for urlencoded body with anyOf and oneOf schemas where valid data was reported as mismatches.
#### v4.9.0 (February 06, 2023)

@@ -4,0 +9,0 @@ * Fixed issue [#660](https://github.com/postmanlabs/openapi-to-postman/issues/660) where for certain XML request bodies, conversion was failing with TypeError.

27

lib/deref.js

@@ -435,3 +435,3 @@ const _ = require('lodash'),

if (schema.hasOwnProperty('type')) {
// Override default value to schema for CONVERSION only for parmeter resolution set to schema
// Override default value to schema for CONVERSION only for parameter resolution set to schema
if (resolveFor === 'CONVERSION' && resolveTo === 'schema') {

@@ -456,6 +456,23 @@ if (!schema.hasOwnProperty('format')) {

else if (schema.enum && schema.enum.length > 0) {
return {
type: (typeof (schema.enum[0])),
value: schema.enum[0]
};
if (resolveFor === 'CONVERSION' && resolveTo === 'schema') {
schema.type = (typeof (schema.enum[0]));
if (!schema.hasOwnProperty('format')) {
schema.default = '<' + schema.type + '>';
}
else if (typesMap.hasOwnProperty(schema.type)) {
schema.default = typesMap[schema.type][schema.format];
if (!schema.default && schema.format) {
schema.default = '<' + schema.format + '>';
}
}
else {
schema.default = '<' + schema.type + (schema.format ? ('-' + schema.format) : '') + '>';
}
}
else {
return {
type: (typeof (schema.enum[0])),
value: schema.enum[0]
};
}
}

@@ -462,0 +479,0 @@ else if (isAllOf) {

@@ -382,3 +382,8 @@ const { filterOptionsByVersion } = require('./common/versionUtils');

if (_.isObject(criteria)) {
typeof criteria.external === 'boolean' && (optsArray = _.filter(optsArray, { external: criteria.external }));
const externalDefault = typeof criteria.external === 'boolean' ? criteria.external : true,
usageDefault = ['CONVERSION'];
typeof criteria.external === 'boolean' && (optsArray = _.filter(optsArray, { external: externalDefault }));
(!_.isArray(criteria.usage) || _.isEmpty(criteria.usage)) && (criteria.usage = usageDefault);
if (_.isArray(criteria.usage)) {

@@ -385,0 +390,0 @@ let tempOptsArray = [];

@@ -1515,2 +1515,5 @@ const generateAuthForCollectionFromOpenAPI = require('./helpers/collection/generateAuthForCollectionFromOpenAPI');

// Request name should be max 256 characters so trim if needed.
reqName = utils.trimRequestName(reqName);
return reqName;

@@ -1517,0 +1520,0 @@ },

2

package.json
{
"name": "openapi-to-postmanv2",
"version": "4.9.0-beta.36",
"version": "4.9.0-beta.37",
"description": "Convert a given OpenAPI specification to Postman Collection v2.0",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/postmanlabs/openapi-to-postman",

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