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.22.0 to 4.23.0

19

CHANGELOG.md

@@ -5,2 +5,17 @@ # OpenAPI-Postman Changelog

## [v4.23.0] - 2024-07-22
### Added
- Conversion - Added option to set preferred request body content-type and use the first mentioned content-type as request body.
### Fixed
- Fixed issue with getOptions() API where default module version was still v1.
- Fix to convert "format:binary" to "type:file" for requests with formdata body.
### Chore
- Replace traverse with neotraverse to reduce related dependencies.
## [v4.22.0] - 2024-07-10

@@ -630,4 +645,6 @@

[Unreleased]: https://github.com/postmanlabs/openapi-to-postman/compare/v4.22.0...HEAD
[Unreleased]: https://github.com/postmanlabs/openapi-to-postman/compare/v4.23.0...HEAD
[v4.23.0]: https://github.com/postmanlabs/openapi-to-postman/compare/v4.22.0...v4.23.0
[v4.22.0]: https://github.com/postmanlabs/openapi-to-postman/compare/v4.21.0...v4.22.0

@@ -634,0 +651,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 @@

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

* with all options being described. 'use' will return the default values of all options
* @param {Object} criteria Decribes required criteria for options to be returned. can have properties
* external: <boolean>
* usage: <array> (Array of supported usage type - CONVERSION, VALIDATION)
* version: <string> ('3.0' by default, supported values: '3.0', '3.1')
* @param {Object} criteria Decribes required criteria for options to be returned.
* @param {string} criteria.version The version of the OpenAPI spec to be converted
* (can be one of '2.0', '3.0', '3.1')
* @param {string} criteria.moduleVersion The version of the module (can be one of 'v1' or 'v2')
* @param {Array<string>} criteria.usage The usage of the option (values can be one of 'CONVERSION', 'VALIDATION')
* @param {boolean} criteria.external Whether the option is exposed to Postman App UI or not
* @returns {mixed} An array or object (depending on mode) that describes available options

@@ -390,2 +392,16 @@ */

supportedModuleVersion: [MODULE_VERSION.V2, MODULE_VERSION.V1]
},
{
name: 'Select request body type',
id: 'preferredRequestBodyType',
type: 'enum',
default: 'first-listed',
availableOptions: ['x-www-form-urlencoded', 'form-data', 'raw', 'first-listed'],
description: 'When there are multiple content-types defined in the request body of OpenAPI, the conversion ' +
'selects the preferred option content-type as request body.If "first-listed" is set, the first ' +
'content-type defined in the OpenAPI spec will be selected.',
external: false,
usage: ['CONVERSION'],
supportedIn: [VERSION20, VERSION30, VERSION31],
supportedModuleVersion: [MODULE_VERSION.V2]
}

@@ -413,3 +429,3 @@ ];

// Setting default value
criteria.moduleVersion = _.has(criteria, 'moduleVersion') ? criteria.moduleVersion : MODULE_VERSION.V1;
criteria.moduleVersion = _.has(criteria, 'moduleVersion') ? criteria.moduleVersion : MODULE_VERSION.V2;

@@ -416,0 +432,0 @@ if (!_.includes(option.supportedModuleVersion, criteria.moduleVersion)) {

const parse = require('./parse.js'),
traverseUtility = require('traverse'),
traverseUtility = require('neotraverse/legacy'),
BROWSER = 'browser',

@@ -4,0 +4,0 @@ { DFS } = require('./dfs'),

@@ -9,4 +9,7 @@ id|type|available options|default|description|usage|version

exampleParametersResolution|enum|Example, Schema|Example|Select whether to generate the response parameters based on the [schema](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#schemaObject) or the [example](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#exampleObject) in the schema.|CONVERSION|v1
disabledParametersValidation|boolean|-|true|Whether disabled parameters of collection should be validated|VALIDATION|v2, v1
parametersResolution|enum|Example, Schema|Schema|Select whether to generate the request and response parameters based on the [schema](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#schemaObject) or the [example](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#exampleObject) in the schema.|CONVERSION|v2, v1
folderStrategy|enum|Paths, Tags|Paths|Select whether to create folders according to the spec’s paths or tags.|CONVERSION|v2, v1
schemaFaker|boolean|-|true|Whether or not schemas should be faked.|CONVERSION|v2, v1
stackLimit|integer|-|10|Number of nesting limit till which schema resolution will happen. Increasing this limit may result in more time to convert collection depending on complexity of specification. (To make sure this option works correctly "optimizeConversion" option needs to be disabled)|CONVERSION|v2, v1
includeAuthInfoInExample|boolean|-|true|Select whether to include authentication parameters in the example request.|CONVERSION|v2, v1

@@ -24,3 +27,6 @@ shortValidationErrors|boolean|-|false|Whether detailed error messages are required for request <> schema validation operations.|VALIDATION|v2, v1

keepImplicitHeaders|boolean|-|false|Whether to keep implicit headers from the OpenAPI specification, which are removed by default.|CONVERSION|v2, v1
includeWebhooks|boolean|-|false|Select whether to include Webhooks in the generated collection|CONVERSION|v2, v1
includeReferenceMap|boolean|-|false|Whether or not to include reference map or not as part of output|BUNDLE|v2, v1
includeDeprecated|boolean|-|true|Select whether to include deprecated operations, parameters, and properties in generated collection or not|CONVERSION, VALIDATION|v2, v1
alwaysInheritAuthentication|boolean|-|false|Whether authentication details should be included on every request, or always inherited from the collection.|CONVERSION|v2, v1
preferredRequestBodyType|enum|x-www-form-urlencoded, form-data, raw, first-listed|first-listed|When there are multiple content-types defined in the request body of OpenAPI, the conversion selects the preferred option content-type as request body.If "first-listed" is set, the first content-type defined in the OpenAPI spec will be selected.|CONVERSION|v2
{
"name": "openapi-to-postmanv2",
"version": "4.22.0",
"version": "4.23.0",
"description": "Convert a given OpenAPI specification to Postman Collection v2.0",

@@ -127,2 +127,3 @@ "homepage": "https://github.com/postmanlabs/openapi-to-postman",

"lodash": "4.17.21",
"neotraverse": "0.6.14",
"oas-resolver-browser": "2.5.6",

@@ -134,3 +135,2 @@ "object-hash": "3.0.0",

"swagger2openapi": "7.0.8",
"traverse": "0.6.6",
"yaml": "1.10.2"

@@ -137,0 +137,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