diff --git a/example/v3/bundle.js b/example/v3/bundle.js index f1867df..c0eae78 100644 --- a/example/v3/bundle.js +++ b/example/v3/bundle.js @@ -14,7 +14,7 @@ async function singleFileWithBaseDir(){ } async function singleFile(){ - const document = await bundle([readFileSync('./spec/main.yaml', 'utf-8')], {baseDir: './spec'}) + const document = await bundle([readFileSync('./spec/main.yaml', 'utf-8')]) writeFileSync('asyncapi.yaml', document.yml()) } diff --git a/src/util.ts b/src/util.ts index 35e57d7..f8b9741 100644 --- a/src/util.ts +++ b/src/util.ts @@ -129,8 +129,6 @@ export function resolveBaseFileDir(file: object, baseFileDir: string) { }).forEach(({parent, parentProperty}: {parent: any, parentProperty: string}) => { const ref = parent[String(parentProperty)]['$ref']; if (isExternalReference(ref) && notAUrl(ref)) { - // console.log(ref) - // console.log(path.resolve(baseFileDir, ref)) parent[String(parentProperty)]['$ref'] = path.resolve(baseFileDir, ref); } }); @@ -143,8 +141,6 @@ export function resolveBaseFileDir(file: object, baseFileDir: string) { ({parent, parentProperty}: {parent: any, parentProperty: string}) => { const ref = parent[String(parentProperty)]['$ref']; if (isExternalReference(ref) && notAUrl(ref)) { - // console.log(ref) - // console.log(path.resolve(baseFileDir, ref)) parent[String(parentProperty)]['$ref'] = path.resolve(baseFileDir, ref); } }