Просмотр исходного кода

support(jsdoc): Add swagger document to user-activation.ts

Atsushi Nakatsugawa 1 год назад
Родитель
Сommit
838259a7f4
1 измененных файлов с 40 добавлено и 0 удалено
  1. 40 0
      apps/app/src/server/routes/apiv3/user-activation.ts

+ 40 - 0
apps/app/src/server/routes/apiv3/user-activation.ts

@@ -70,6 +70,46 @@ async function sendEmailToAllAdmins(userData, admins, appTitle, mailService, tem
   });
   });
 }
 }
 
 
+/**
+ * @swagger
+ *
+ * /complete-registration:
+ *   post:
+ *     summary: /complete-registration
+ *     tags: [Users]
+ *     security: []
+ *     operationId: completeRegistration
+ *     requestBody:
+ *       required: true
+ *       content:
+ *         application/json:
+ *           schema:
+ *             type: object
+ *             properties:
+ *               registerForm:
+ *                 type: object
+ *                 properties:
+ *                   username:
+ *                     type: string
+ *                   name:
+ *                     type: string
+ *                   password:
+ *                     type: string
+ *                   token:
+ *                     type: string
+ *                   email:
+ *                     type: string
+ *     responses:
+ *       200:
+ *         description: User activation successful
+ *         content:
+ *           application/json:
+ *             schema:
+ *               type: object
+ *               properties:
+ *                 redirectTo:
+ *                   type: string
+ */
 export const completeRegistrationAction = (crowi: Crowi) => {
 export const completeRegistrationAction = (crowi: Crowi) => {
   const User = mongoose.model<IUser, { isEmailValid, isRegisterable, createUserByEmailAndPassword, findAdmins }>('User');
   const User = mongoose.model<IUser, { isEmailValid, isRegisterable, createUserByEmailAndPassword, findAdmins }>('User');
   const activityEvent = crowi.event('activity');
   const activityEvent = crowi.event('activity');