openapi-to-postmanv2
Advanced tools
Comparing version 4.21.0 to 4.22.0
@@ -5,2 +5,8 @@ # OpenAPI-Postman Changelog | ||
## [v4.22.0] - 2024-07-10 | ||
### Chore | ||
- Updated postman-collection to v4.4.0. | ||
## [v4.21.0] - 2024-05-17 | ||
@@ -624,4 +630,6 @@ | ||
[Unreleased]: https://github.com/postmanlabs/openapi-to-postman/compare/v4.21.0...HEAD | ||
[Unreleased]: https://github.com/postmanlabs/openapi-to-postman/compare/v4.22.0...HEAD | ||
[v4.22.0]: https://github.com/postmanlabs/openapi-to-postman/compare/v4.21.0...v4.22.0 | ||
[v4.21.0]: https://github.com/postmanlabs/openapi-to-postman/compare/v4.20.1...v4.21.0 | ||
@@ -628,0 +636,0 @@ |
@@ -215,5 +215,6 @@ const _ = require('lodash'), | ||
openapi20 = getVersionRegexp(VERSION_20), | ||
is30 = data.match(openapi30), | ||
is31 = data.match(openapi31), | ||
is20 = data.match(openapi20); | ||
is30 = typeof data === 'string' && data.match(openapi30), | ||
is31 = typeof data === 'string' && data.match(openapi31), | ||
is20 = typeof data === 'string' && data.match(openapi20); | ||
let version = DEFAULT_SPEC_VERSION; | ||
@@ -220,0 +221,0 @@ |
@@ -9,3 +9,4 @@ 'use strict'; | ||
async = require('async'), | ||
sdk = require('postman-collection'), | ||
{ Collection } = require('postman-collection/lib/collection/collection'), | ||
{ Url } = require('postman-collection/lib/collection/url'), | ||
OasResolverOptions = { | ||
@@ -344,3 +345,3 @@ resolve: true, // Resolve external references | ||
// All generated folders and requests will go inside this | ||
generatedStore.collection = new sdk.Collection({ | ||
generatedStore.collection = new Collection({ | ||
info: { | ||
@@ -535,3 +536,3 @@ name: utils.getCollectionName(_.get(openapi, 'info.title')) | ||
// SDK URL object. Get raw string representation. | ||
requestUrl = (new sdk.Url(requestUrl)).toString(); | ||
requestUrl = (new Url(requestUrl)).toString(); | ||
} | ||
@@ -538,0 +539,0 @@ |
/* eslint-disable one-var */ | ||
const _ = require('lodash'), | ||
sdk = require('postman-collection'), | ||
{ Collection } = require('postman-collection/lib/collection/collection'), | ||
GraphLib = require('graphlib'), | ||
@@ -48,3 +48,3 @@ generateSkeletonTreeFromOpenAPI = require('./helpers/collection/generateSkeletionTreeFromOpenAPI'), | ||
const { data, variables } = generateCollectionFromOpenAPI(context, node); | ||
collection = new sdk.Collection(data); | ||
collection = new Collection(data); | ||
@@ -217,2 +217,7 @@ collection = collection.toJSON(); | ||
// Remove duplicate variables as different requests could end up creating same variables | ||
if (!_.isEmpty(collection.variable)) { | ||
collection.variable = _.uniqBy(collection.variable, 'key'); | ||
} | ||
return cb(null, { | ||
@@ -219,0 +224,0 @@ result: true, |
@@ -1,3 +0,4 @@ | ||
const sdk = require('postman-collection'), | ||
_ = require('lodash'), | ||
const _ = require('lodash'), | ||
{ Item } = require('postman-collection/lib/collection/item'), | ||
{ Response } = require('postman-collection/lib/collection/response'), | ||
@@ -33,3 +34,3 @@ // This is the default collection name if one can't be inferred from the OpenAPI spec | ||
let sdkResponse = new sdk.Response({ | ||
let sdkResponse = new Response({ | ||
name: response.name, | ||
@@ -54,3 +55,3 @@ code: response.code, | ||
generateRequestItemObject = (requestObject) => { | ||
const requestItem = new sdk.Item(requestObject), | ||
const requestItem = new Item(requestObject), | ||
queryParams = _.get(requestObject, 'request.params.queryParams'), | ||
@@ -57,0 +58,0 @@ pathParams = _.get(requestObject, 'request.params.pathParams', []), |
{ | ||
"name": "openapi-to-postmanv2", | ||
"version": "4.21.0", | ||
"version": "4.22.0", | ||
"description": "Convert a given OpenAPI specification to Postman Collection v2.0", | ||
@@ -131,3 +131,3 @@ "homepage": "https://github.com/postmanlabs/openapi-to-postman", | ||
"path-browserify": "1.0.1", | ||
"postman-collection": "4.2.1", | ||
"postman-collection": "^4.4.0", | ||
"swagger2openapi": "7.0.8", | ||
@@ -134,0 +134,0 @@ "traverse": "0.6.6", |
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
1856900
48529
+ Addedpostman-collection@4.5.0(transitive)
+ Addedsemver@7.6.3(transitive)
- Removedlru-cache@6.0.0(transitive)
- Removedpostman-collection@4.2.1(transitive)
- Removedsemver@7.5.4(transitive)
- Removedyallist@4.0.0(transitive)
Updatedpostman-collection@^4.4.0