Skip to content

Commit

Permalink
fix: lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Souvikns committed Dec 4, 2023
1 parent cd85748 commit 2043664
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ export default async function bundle(files: string[], options: any = {}) {
let resolvedJsons;

if (majorVersion === 3) {
resolvedJsons = await resolveV3Document(parsedJsons, {
referenceIntoComponents: options.referenceIntoComponents
});
resolvedJsons = await resolveV3Document(parsedJsons);
} else {
/**
* Bundle all external references for each file.
Expand Down
4 changes: 2 additions & 2 deletions src/v3/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ async function resolveExternalRefsForOperation(parsedJSON: any, $refs: $Refs) {
if (isExternalReference(ref)) {
const value: any = $refs.get(ref);
const component = new ExternalComponents(ref, value);
parent[parentProperty]['$ref'] = `#/components/messages/${component.getKey()}`;
parent[String(parentProperty)]['$ref'] = `#/components/messages/${component.getKey()}`;
}
});
}
Expand All @@ -95,7 +95,7 @@ export async function parse(JSONSchema: any) {
}
}

export async function resolveV3Document(asyncapiDocuments: AsyncAPIObject[], options: any) {
export async function resolveV3Document(asyncapiDocuments: AsyncAPIObject[]) {
const docs = [];
for (const asyncapiDocument of asyncapiDocuments) {
await parse(asyncapiDocument);
Expand Down

0 comments on commit 2043664

Please sign in to comment.