mirror of
https://github.com/postmanlabs/openapi-to-postman.git
synced 2022-11-29 22:05:00 +03:00
Folder for multifile and multi data res
Change the use of folder and now use multiFile as option type value. Return a JS object instead of a json string return a data array in response
This commit is contained in:
@@ -4854,15 +4854,17 @@ module.exports = {
|
||||
let bundleData = getBundleContentAndComponents(root, inputData, origin);
|
||||
return bundleData;
|
||||
});
|
||||
let bundledFile = data[0].fileContent;
|
||||
bundledFile.components = data[0].components;
|
||||
if (format === parse.YAML_FORMAT) {
|
||||
bundledFile = parse.toYAML(bundledFile);
|
||||
}
|
||||
else if (format === parse.JSON_FORMAT) {
|
||||
bundledFile = parse.toJSON(bundledFile, 2);
|
||||
}
|
||||
return { rootFile: { path: parsedRootFiles[0].fileName }, bundledContent: bundledFile };
|
||||
|
||||
let bundleData = data.map((contentAndComponents) => {
|
||||
let bundledFile = contentAndComponents.fileContent;
|
||||
bundledFile.components = contentAndComponents.components;
|
||||
if (format === parse.YAML_FORMAT) {
|
||||
bundledFile = parse.toYAML(bundledFile);
|
||||
}
|
||||
return { rootFile: { path: parsedRootFiles[0].fileName }, bundledContent: bundledFile };
|
||||
});
|
||||
|
||||
return bundleData;
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user