Skip to content

Commit d1144b4

Browse files
committed
fix: do not add components section to single operation spec if there are no components
1 parent 5fd571f commit d1144b4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/apitypes/rest/rest.operation.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -357,9 +357,9 @@ export const createSingleOperationSpec = (
357357
...extractSymbolProperty(pathData, INLINE_REFS_FLAG),
358358
},
359359
},
360-
components: {
361-
...takeIfDefined({ securitySchemes: effectiveSecuritySchemes }),
362-
},
360+
...takeIfDefined({
361+
components: effectiveSecuritySchemes ? { securitySchemes: effectiveSecuritySchemes } : undefined,
362+
}),
363363
}
364364
}
365365

0 commit comments

Comments
 (0)