feat: adds apiKey auth as query params in docs and users endpoint

This commit is contained in:
Agusti Fernandez Pardo committed 2022-04-17 16:18:42 +02:00
1 parent 3ad84a7c15
commit 5013ea2ef5
2 files changed
+7 -2

No files matched your search

+5 -2
View File
@@ -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"],
+2
View File
@@ -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: