Quellcode durchsuchen

add attachments.limit API reference

Ryu Sato vor 6 Jahren
Ursprung
Commit
695ac73295
1 geänderte Dateien mit 35 neuen und 0 gelöschten Zeilen
  1. 35 0
      src/server/routes/attachment.js

+ 35 - 0
src/server/routes/attachment.js

@@ -363,6 +363,41 @@ module.exports = function(crowi, app) {
     return res.json(ApiResponse.success({ attachments }));
   };
 
+  /**
+   * @swagger
+   *
+   *    /_api/attachments.limit:
+   *      get:
+   *        tags: [Attachments]
+   *        operationId: getAttachmentsLimit
+   *        summary: /_api/attachments.limit
+   *        description: Get available capacity of uploaded file with GridFS
+   *        parameters:
+   *          - in: query
+   *            name: fileSize
+   *            schema:
+   *              type: number
+   *              description: file size
+   *              example: 23175
+   *            required: true
+   *        responses:
+   *          200:
+   *            description: Succeeded to get available capacity of uploaded file with GridFS.
+   *            content:
+   *              application/json:
+   *                schema:
+   *                  properties:
+   *                    isUploadable:
+   *                      type: boolean
+   *                      description: uploadable
+   *                      example: true
+   *                    ok:
+   *                      $ref: '#/components/schemas/V1Response/properties/ok'
+   *          403:
+   *            $ref: '#/components/responses/403'
+   *          500:
+   *            $ref: '#/components/responses/500'
+   */
   /**
    * @api {get} /attachments.limit get available capacity of uploaded file with GridFS
    * @apiName AddAttachments