Explorar el Código

Wrote first swagger

ryuichi-e hace 6 años
padre
commit
6ce31c3193
Se han modificado 1 ficheros con 20 adiciones y 1 borrados
  1. 20 1
      src/server/routes/apiv3/users.js

+ 20 - 1
src/server/routes/apiv3/users.js

@@ -102,7 +102,26 @@ module.exports = (crowi) => {
     query('page').isInt({ min: 1 }),
     query('page').isInt({ min: 1 }),
   ];
   ];
 
 
-  // TODO write swagger
+  /**
+   * @swagger
+   *
+   *  paths:
+   *    /users:
+   *      get:
+   *        tags: [Users]
+   *        operationId: listUsers
+   *        summary: /users
+   *        description: Get users
+   *        responses:
+   *          200:
+   *            description: users are fetched
+   *            content:
+   *              application/json:
+   *                schema:
+   *                  properties:
+   *                    paginateResult:
+   *                      $ref: '#/components/schemas/PaginateResult'
+   */
 
 
   router.get('/', validator.statusList, ApiV3FormValidator, async(req, res) => {
   router.get('/', validator.statusList, ApiV3FormValidator, async(req, res) => {