Skip to content

Commit 557d077

Browse files
refactor: clearUnusedSchemas
The function only preserves schemas but drops other component types (parameters, responses, etc.) that might exist in the components object. Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 03aec8c commit 557d077

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/core/clearUnusedSchemas.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export default function clearUnusedSchemas({
1717
return {
1818
paths,
1919
components: {
20+
...components,
2021
schemas: Object.fromEntries(Object.entries(components.schemas).filter(([schemaName]) => {
2122
const otherSchemas = omit(stringifiedSchemas, schemaName);
2223
return (

0 commit comments

Comments
 (0)