Quellcode durchsuchen

add swagger in an attachment file

kaoritokashiki vor 5 Jahren
Ursprung
Commit
a2e6542499
1 geänderte Dateien mit 18 neuen und 1 gelöschten Zeilen
  1. 18 1
      src/server/routes/apiv3/attachment.js

+ 18 - 1
src/server/routes/apiv3/attachment.js

@@ -8,7 +8,12 @@ const router = express.Router();
 
 
 const ErrorV3 = require('../../models/vo/error-apiv3');
 const ErrorV3 = require('../../models/vo/error-apiv3');
 
 
-// TODO: add swagger by GW3441
+
+/**
+ * @swagger
+ *  tags:
+ *    name: Attachment
+ */
 
 
 module.exports = (crowi) => {
 module.exports = (crowi) => {
   const accessTokenParser = require('../../middlewares/access-token-parser')(crowi);
   const accessTokenParser = require('../../middlewares/access-token-parser')(crowi);
@@ -16,6 +21,18 @@ module.exports = (crowi) => {
   const Page = crowi.model('Page');
   const Page = crowi.model('Page');
   const Attachment = crowi.model('Attachment');
   const Attachment = crowi.model('Attachment');
 
 
+  /**
+   * @swagger
+   *
+   *    /attachment/list:
+   *      get:
+   *        tags: [Attachment]
+   *        description: Get attachment list
+   *        responses:
+   *          200:
+   *            description: Return attachment list
+   */
+
   router.get('/list', accessTokenParser, loginRequired, async(req, res) => {
   router.get('/list', accessTokenParser, loginRequired, async(req, res) => {
 
 
     try {
     try {