itizawa 6 years ago
parent
commit
13594b97d5
1 changed files with 34 additions and 1 deletions
  1. 34 1
      src/server/routes/apiv3/notification-setting.js

+ 34 - 1
src/server/routes/apiv3/notification-setting.js

@@ -190,7 +190,40 @@ module.exports = (crowi) => {
 
   });
 
-  // TODO swagger
+  /**
+   * @swagger
+   *
+   *    /_api/v3/notification-setting/global-notification/{id}/enabled:
+   *      put:
+   *        tags: [NotificationSetting]
+   *        description: toggle enabled global notification
+   *        parameters:
+   *          - name: id
+   *            in: path
+   *            required: true
+   *            description: notification id for updated
+   *            schema:
+   *              type: string
+   *        requestBody:
+   *          required: true
+   *          content:
+   *            application/json:
+   *              schema:
+   *                properties:
+   *                  isEnabled:
+   *                    type: boolean
+   *                    description: is notification enabled
+   *        responses:
+   *          200:
+   *            description: Succeeded to delete global notification pattern
+   *            content:
+   *              application/json:
+   *                schema:
+   *                  properties:
+   *                    deletedNotificaton:
+   *                      type: object
+   *                      description: notification id for updated
+   */
   router.put('/global-notification/:id/enabled', loginRequiredStrictly, adminRequired, csrf, async(req, res) => {
     const { id } = req.params;
     const { isEnabled } = req.body;