diff --git a/pages/api/docs.ts b/pages/api/docs.ts index d9aa75d18c..bb63cb79a3 100644 --- a/pages/api/docs.ts +++ b/pages/api/docs.ts @@ -9,8 +9,11 @@ const swaggerHandler = withSwagger({ title: `${pjson.name}: ${pjson.description}`, version: pjson.version, }, - components: { schemas: { ...jsonSchema.definitions } }, - definitions: jsonSchema.definitions, + components: { + securitySchemes: { ApiKeyAuth: { type: "apiKey", in: "query", name: "apiKey" } }, + schemas: { ...jsonSchema.definitions }, + }, + // definitions: jsonSchema.definitions, }, apiFolder: "pages/api", tags: ["users", "teams", "memeberships"], diff --git a/pages/api/users/index.ts b/pages/api/users/index.ts index 138395adba..84c2e7ec57 100644 --- a/pages/api/users/index.ts +++ b/pages/api/users/index.ts @@ -12,6 +12,8 @@ import { schemaUserPublic } from "@lib/validations/user"; * /v1/users: * get: * summary: Get all users (admin only), returns your user if regular user. + * security: + * - ApiKeyAuth: [] * tags: * - users * responses: