mirror of
https://github.com/postmanlabs/openapi-to-postman.git
synced 2022-11-29 22:05:00 +03:00
Fix defintions replacing instead of merging
Fix defintions replacing instead of merging
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
const { ParseError } = require('./common/ParseError.js');
|
||||
|
||||
const { formatDataPath, checkIsCorrectType, isKnownType } = require('./common/schemaUtilsCommon.js'),
|
||||
{ getConcreteSchemaUtils } = require('./common/versionUtils.js'),
|
||||
{ getConcreteSchemaUtils, SWAGGER_VERSION } = require('./common/versionUtils.js'),
|
||||
async = require('async'),
|
||||
sdk = require('postman-collection'),
|
||||
schemaFaker = require('../assets/json-schema-faker.js'),
|
||||
@@ -4834,7 +4834,7 @@ module.exports = {
|
||||
return bundleData;
|
||||
});
|
||||
let bundledFile = data[0].fileContent;
|
||||
if (version === '2.0') {
|
||||
if (version === SWAGGER_VERSION) {
|
||||
Object.entries(data[0].components).forEach(([key, value]) => {
|
||||
bundledFile[key] = value;
|
||||
});
|
||||
@@ -4870,7 +4870,7 @@ module.exports = {
|
||||
let parsedContent = this.parseFileOrThrow(rootFile.content);
|
||||
return { fileName: rootFile.fileName, content: rootFile.content, parsed: parsedContent };
|
||||
}).filter((rootWithParsedContent) => {
|
||||
let fileVersion = version === '2.0' ?
|
||||
let fileVersion = version === SWAGGER_VERSION ?
|
||||
rootWithParsedContent.parsed.oasObject.swagger :
|
||||
rootWithParsedContent.parsed.oasObject.openapi;
|
||||
bundleFormat = bundleFormat ? bundleFormat : rootWithParsedContent.parsed.inputFormat;
|
||||
|
||||
Reference in New Issue
Block a user