diff --git a/packages/admin/src/hermes/swaggerMetadata.ts b/packages/admin/src/hermes/swaggerMetadata.ts index fdcb7301f..0f84d321c 100644 --- a/packages/admin/src/hermes/swaggerMetadata.ts +++ b/packages/admin/src/hermes/swaggerMetadata.ts @@ -25,7 +25,12 @@ export const getSwaggerMetadata: () => SwaggerRouterMetadata = () => ({ ], setExtraRouteHeaders(route: ConduitRoute, swaggerRouteDoc: Indexable): void { if (route.input.path !== '/login' && route.input.path !== '/modules') { - swaggerRouteDoc.security[0].adminToken = []; + swaggerRouteDoc.security = swaggerRouteDoc.security.map( + (originalSecEntry: { [field: string]: string }) => ({ + ...originalSecEntry, + adminToken: [], + }), + ); } }, });