diff --git a/routes/capture_system.js b/routes/capture_system.js index e219b23..2f0a1f7 100644 --- a/routes/capture_system.js +++ b/routes/capture_system.js @@ -135,7 +135,92 @@ router.post('/camera/stop', async (req, res) => { } }); - +/** + * @swagger + * /camera/status: + * get: + * summary: Get the current camera settings + * responses: + * 200: + * description: Successfully retrieved camera settings + * content: + * application/json: + * schema: + * type: object + * properties: + * id: + * type: integer + * interval: + * type: integer + * nb_images: + * type: integer + * maintenance: + * type: boolean + * stop_flag: + * type: boolean + * idle: + * type: boolean + * 500: + * description: Error retrieving camera settings + * + * /procedure/start: + * post: + * summary: Start the camera procedure + * requestBody: + * required: true + * content: + * application/json: + * schema: + * type: object + * properties: + * interval: + * type: integer + * nb_images: + * type: integer + * responses: + * 200: + * description: Camera started successfully + * 400: + * description: Interval and number of images are required + * 500: + * description: Error starting camera procedure + * + * /procedure/stop: + * post: + * summary: Initiate the camera stop procedure + * responses: + * 200: + * description: Camera stop procedure initiated successfully + * 500: + * description: Error stopping camera procedure + * + * /camera/stop: + * post: + * summary: Confirm the camera stop procedure + * responses: + * 200: + * description: Camera stopped successfully + * 500: + * description: Error stopping camera + * + * /camera/maintenance: + * post: + * summary: Activate maintenance mode for the camera + * responses: + * 200: + * description: Camera in maintenance mode + * 500: + * description: Error activating maintenance mode + * + * /camera/maintenance/deactivate: + * post: + * summary: Deactivate maintenance mode for the camera + * responses: + * 200: + * description: Camera out of maintenance mode + * 500: + * description: Error deactivating maintenance mode + */ router.post('/camera/maintenance', async (req, res) => { try { await activate_maintenance();