2
0
Yuki Takei 4 жил өмнө
parent
commit
963c6b3121

+ 31 - 1
packages/app/src/server/routes/apiv3/pages.js

@@ -22,6 +22,36 @@ const LIMIT_FOR_LIST = 10;
  *    name: Pages
  *    name: Pages
  */
  */
 
 
+/**
+ * @swagger
+ *
+ *  components:
+ *    schemas:
+ *      Tags:
+ *        description: Tags
+ *        type: array
+ *        items:
+ *          $ref: '#/components/schemas/Tag/properties/name'
+ *        example: ['daily', 'report', 'tips']
+ *
+ *      Tag:
+ *        description: Tag
+ *        type: object
+ *        properties:
+ *          _id:
+ *            type: string
+ *            description: tag ID
+ *            example: 5e2d6aede35da4004ef7e0b7
+ *          name:
+ *            type: string
+ *            description: tag name
+ *            example: daily
+ *          count:
+ *            type: number
+ *            description: Count of tagged pages
+ *            example: 3
+ */
+
 /**
 /**
  * @swagger
  * @swagger
  *
  *
@@ -219,7 +249,7 @@ module.exports = (crowi) => {
    *                        tags:
    *                        tags:
    *                          type: array
    *                          type: array
    *                          items:
    *                          items:
-   *                            $ref: '#/components/schemas/Tag'
+   *                            $ref: '#/components/schemas/Tags'
    *                        revision:
    *                        revision:
    *                          $ref: '#/components/schemas/Revision'
    *                          $ref: '#/components/schemas/Revision'
    *          409:
    *          409: