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