Skip to content

Commit

Permalink
chore: cleanup logs from file
Browse files Browse the repository at this point in the history
  • Loading branch information
Souvikns committed Mar 19, 2024
1 parent c3a1840 commit 266fac1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion example/v3/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}

Expand Down
4 changes: 0 additions & 4 deletions src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
});
Expand All @@ -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);
}
}
Expand Down

0 comments on commit 266fac1

Please sign in to comment.