From 2c766ff664d6c883c2ce596510bf9e6ae4c33c77 Mon Sep 17 00:00:00 2001 From: Atsushi Nakatsugawa Date: Thu, 26 Dec 2024 21:21:40 +0900 Subject: [PATCH] support(jsdoc): add swagger document to invited.ts --- apps/app/src/server/routes/apiv3/invited.ts | 42 +++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/apps/app/src/server/routes/apiv3/invited.ts b/apps/app/src/server/routes/apiv3/invited.ts index 4766f58d927..4a3f185d190 100644 --- a/apps/app/src/server/routes/apiv3/invited.ts +++ b/apps/app/src/server/routes/apiv3/invited.ts @@ -18,6 +18,48 @@ module.exports = (crowi: Crowi): Router => { const applicationInstalled = require('../../middlewares/application-installed')(crowi); const router = express.Router(); + /** + * @swagger + * + * /invited: + * post: + * tags: [Users] + * security: + * - cookieAuth: [] + * operationId: activateInvitedUser + * summary: /invited + * description: Activate invited user + * requestBody: + * required: true + * content: + * application/json: + * schema: + * type: object + * properties: + * invitedForm: + * type: object + * properties: + * username: + * type: string + * description: The username of the invited user. + * name: + * type: string + * description: The name of the invited user. + * password: + * type: string + * description: The password for the invited user. + * responses: + * 200: + * description: User activated successfully + * content: + * application/json: + * schema: + * type: object + * properties: + * redirectTo: + * type: string + * description: URL to redirect after successful activation. + */ router.post('/', applicationInstalled, invitedRules(), invitedValidation, async(req: InvitedFormRequest, res: ApiV3Response) => { if (!req.user) { return res.apiv3({ redirectTo: '/login' });