Browse Source

imprv swagger

mizozobu 6 years ago
parent
commit
188b670b4d

+ 8 - 8
src/server/routes/apiv3/export.js

@@ -23,10 +23,10 @@ module.exports = (crowi) => {
    *  /export/status:
    *    get:
    *      tags: [Export]
-   *      description: get properties of zip files for export
+   *      description: get properties of stored zip files for export
    *      responses:
    *        200:
-   *          description: export cache status
+   *          description: the zip file statuses
    *          content:
    *            application/json:
    *              schema:
@@ -35,7 +35,7 @@ module.exports = (crowi) => {
    *                    type: array
    *                    items:
    *                      type: object
-   *                      description: property of each file
+   *                      description: the property of each file
    */
   router.get('/status', async(req, res) => {
     const zipFileStats = await exportService.getStatus();
@@ -50,7 +50,7 @@ module.exports = (crowi) => {
    *  /export:
    *    post:
    *      tags: [Export]
-   *      description: generate a zipped json for multiple collections
+   *      description: generate zipped jsons for collections
    *      responses:
    *        200:
    *          description: a zip file is generated
@@ -60,7 +60,7 @@ module.exports = (crowi) => {
    *                properties:
    *                  zipFileStat:
    *                    type: object
-   *                    description: property of each file
+   *                    description: the property of the zip file
    */
   router.post('/', async(req, res) => {
     // TODO: add express validator
@@ -102,17 +102,17 @@ module.exports = (crowi) => {
    *  /export/{fileName}:
    *    delete:
    *      tags: [Export]
-   *      description: unlink all json and zip files for exports
+   *      description: delete the file
    *      parameters:
    *        - name: fileName
    *          in: path
-   *          description: file name of zip file
+   *          description: the file name of zip file
    *          required: true
    *          schema:
    *            type: string
    *      responses:
    *        200:
-   *          description: the json and zip file are deleted
+   *          description: the file is deleted
    *          content:
    *            application/json:
    *              schema:

+ 7 - 7
src/server/routes/apiv3/import.js

@@ -88,7 +88,7 @@ module.exports = (crowi) => {
    *      description: import a collection from a zipped json
    *      responses:
    *        200:
-   *          description: data is successfully imported
+   *          description: the data is successfully imported
    *          content:
    *            application/json:
    *              schema:
@@ -144,22 +144,22 @@ module.exports = (crowi) => {
    *      description: upload a zip file
    *      responses:
    *        200:
-   *          description: file is uploaded
+   *          description: the file is uploaded
    *          content:
    *            application/json:
    *              schema:
    *                properties:
    *                  meta:
    *                    type: object
-   *                    description: meta data of the uploaded file
+   *                    description: the meta data of the uploaded file
    *                  fileName:
    *                    type: string
-   *                    description: base name of the uploaded file
+   *                    description: the base name of the uploaded file
    *                  fileStats:
    *                    type: array
    *                    items:
    *                      type: object
-   *                      description: property of each extracted file
+   *                      description: the property of each extracted file
    */
   router.post('/upload', uploads.single('file'), async(req, res) => {
     const { file } = req;
@@ -194,13 +194,13 @@ module.exports = (crowi) => {
    *      parameters:
    *        - name: fileName
    *          in: path
-   *          description: file name of zip file
+   *          description: the file name of zip file
    *          required: true
    *          schema:
    *            type: string
    *      responses:
    *        200:
-   *          description: file is deleted
+   *          description: the file is deleted
    *          content:
    *            application/json:
    *              schema:

+ 1 - 1
src/server/routes/apiv3/mongo.js

@@ -22,7 +22,7 @@ module.exports = (crowi) => {
    *      description: get mongodb collections names
    *      responses:
    *        200:
-   *          description: list of collections in mongoDB
+   *          description: a list of collections in mongoDB
    *          content:
    *            application/json:
    *              schema: