Ver Fonte

fix lint error

Yuki Takei há 4 anos atrás
pai
commit
963c6b3121
1 ficheiros alterados com 31 adições e 1 exclusões
  1. 31 1
      packages/app/src/server/routes/apiv3/pages.js

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

@@ -22,6 +22,36 @@ const LIMIT_FOR_LIST = 10;
  *    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
  *
@@ -219,7 +249,7 @@ module.exports = (crowi) => {
    *                        tags:
    *                          type: array
    *                          items:
-   *                            $ref: '#/components/schemas/Tag'
+   *                            $ref: '#/components/schemas/Tags'
    *                        revision:
    *                          $ref: '#/components/schemas/Revision'
    *          409: