Skip to content

Commit

Permalink
fix: remove extra components
Browse files Browse the repository at this point in the history
  • Loading branch information
BelfordZ authored and shanejonas committed Oct 8, 2024
1 parent ffd6c84 commit 39c2120
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion src/dereference-document.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ describe("dereferenceDocument", () => {
},
},
};

const document = await dereferenceDocument(testDoc as OpenrpcDocument);
const docMethods = document.methods as MethodObject[];
expect(docMethods).toBeDefined();
Expand Down
1 change: 1 addition & 0 deletions src/dereference-document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ const handleSchemaWithSchemaComponents = async (s: JSONSchema, schemaComponents:
const dereffed = await dereffer.resolve();
if (dereffed !== true && dereffed !== false) {
delete dereffed.components;
delete s.components;
}
return dereffed;
} catch (e: any) {

Check warning on line 68 in src/dereference-document.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
Expand Down

0 comments on commit 39c2120

Please sign in to comment.