Просмотр исходного кода

Fixing swagger comment lint error

arvid-e 9 месяцев назад
Родитель
Сommit
ef92e9dc44
1 измененных файлов с 69 добавлено и 1 удалено
  1. 69 1
      apps/app/src/server/routes/apiv3/content-disposition-settings.js

+ 69 - 1
apps/app/src/server/routes/apiv3/content-disposition-settings.js

@@ -29,7 +29,75 @@ const validator = {
   ],
 };
 
-
+ /**
+ * @swagger
+ *
+ * components:
+ *   responses:
+ *     400:
+ *       description: Bad Request
+ *       content:
+ *         application/json:
+ *           schema:
+ *             $ref: '#/components/schemas/ErrorResponse'
+ *     401:
+ *       description: Unauthorized
+ *       content:
+ *         application/json:
+ *           schema:
+ *             $ref: '#/components/schemas/ErrorResponse'
+ *     403:
+ *       description: Forbidden
+ *       content:
+ *         application/json:
+ *           schema:
+ *             $ref: '#/components/schemas/ErrorResponse'
+ *     500:
+ *       description: Internal Server Error
+ *       content:
+ *         application/json:
+ *           schema:
+ *             $ref: '#/components/schemas/ErrorResponse'
+ *   schemas:
+ *     ErrorResponse:
+ *       type: object
+ *       properties:
+ *         message:
+ *           type: string
+ *           description: Error message
+ *         status:
+ *           type: number
+ *           description: HTTP status code
+ *         example:
+ *           message: "Error message details"
+ *           status: 500
+ *   parameters:
+ *     MimeTypePathParam:
+ *       name: mimeType
+ *       in: path
+ *       required: true
+ *       description: Configurable MIME type (e.g., image/png, application/pdf)
+ *       schema:
+ *         type: string
+ *         enum:
+ *           - application/pdf
+ *           - image/png
+ *           - image/jpeg
+ *           - image/gif
+ *           - text/plain
+ *           - text/html
+ *           - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
+ *           - application/vnd.openxmlformats-officedocument.wordprocessingml.document
+ *           - application/vnd.openxmlformats-officedocument.presentationml.presentation
+ *           - application/msword
+ *           - application/vnd.ms-excel
+ *           - application/vnd.ms-powerpoint
+ *           - application/zip
+ *           - application/x-rar-compressed
+ *           - audio/mpeg
+ *           - video/mp4
+ *           - application/octet-stream
+ */
 module.exports = (crowi) => {
   const loginRequiredStrictly = require('../../middlewares/login-required')(crowi);
   const adminRequired = require('../../middlewares/admin-required')(crowi);