mirror of
https://github.com/postmanlabs/openapi-to-postman.git
synced 2022-11-29 22:05:00 +03:00
ignore web refs like http...
ignore web refs and fix the root location
This commit is contained in:
committed by
Erik Mendoza
parent
578943adfd
commit
0f23e60afd
@@ -665,8 +665,17 @@ class SchemaPack {
|
||||
const input = this.input;
|
||||
if (!input.rootFiles || input.rootFiles.length === 0) {
|
||||
let rootFiles = await this.detectRootFiles(input);
|
||||
input.rootFiles = rootFiles.output.data;
|
||||
return schemaUtils.processRelatedFiles(input);
|
||||
if (rootFiles.output.data) {
|
||||
let inputContent = [];
|
||||
rootFiles.output.data.forEach((rootFile) => {
|
||||
let founInData = input.data.find((dataFile) => { return dataFile.fileName === rootFile.path; });
|
||||
if (founInData) {
|
||||
inputContent.push({ path: founInData.fileName, content: founInData.content });
|
||||
}
|
||||
});
|
||||
input.rootFiles = inputContent;
|
||||
return schemaUtils.processRelatedFiles(input);
|
||||
}
|
||||
}
|
||||
return schemaUtils.processRelatedFiles(input);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user