Suppression du fichier Swagger pour le schéma de mesure et mise à jour des descriptions dans les routes d'images et de projets
This commit is contained in:
@@ -13,7 +13,7 @@ const serverError = require('../utils/serverError');
|
|||||||
* summary: Retrieve a smile image
|
* summary: Retrieve a smile image
|
||||||
* responses:
|
* responses:
|
||||||
* 200:
|
* 200:
|
||||||
* description: Smile image retrieved successfully
|
* description: A smile image
|
||||||
* content:
|
* content:
|
||||||
* image/jpeg:
|
* image/jpeg:
|
||||||
* schema:
|
* schema:
|
||||||
@@ -37,32 +37,30 @@ router.get('/smile', (req, res) => {
|
|||||||
* @swagger
|
* @swagger
|
||||||
* /images/{projectId}/{orderId}:
|
* /images/{projectId}/{orderId}:
|
||||||
* get:
|
* get:
|
||||||
* summary: Retrieve an image by project ID and order ID
|
* summary: Retrieve an image by project and order ID
|
||||||
* parameters:
|
* parameters:
|
||||||
* - in: path
|
* - in: path
|
||||||
* name: projectId
|
* name: projectId
|
||||||
* required: true
|
* required: true
|
||||||
* schema:
|
* schema:
|
||||||
* type: string
|
* type: string
|
||||||
* description: The ID of the project
|
* description: The project ID
|
||||||
* - in: path
|
* - in: path
|
||||||
* name: orderId
|
* name: orderId
|
||||||
* required: true
|
* required: true
|
||||||
* schema:
|
* schema:
|
||||||
* type: string
|
* type: string
|
||||||
* description: The ID of the order
|
* description: The order ID
|
||||||
* responses:
|
* responses:
|
||||||
* 200:
|
* 200:
|
||||||
* description: Image retrieved successfully
|
* description: An image file
|
||||||
* content:
|
* content:
|
||||||
* image/jpeg:
|
* application/octet-stream:
|
||||||
* schema:
|
* schema:
|
||||||
* type: string
|
* type: string
|
||||||
* format: binary
|
* format: binary
|
||||||
* 404:
|
* 404:
|
||||||
* description: Image not found
|
* description: Image not found
|
||||||
* 500:
|
|
||||||
* description: Internal server error
|
|
||||||
*/
|
*/
|
||||||
router.get('/images/:projectId/:orderId', (req, res) => {
|
router.get('/images/:projectId/:orderId', (req, res) => {
|
||||||
const projectId = req.params.projectId;
|
const projectId = req.params.projectId;
|
||||||
|
|||||||
@@ -18,7 +18,21 @@ const serverError = require('../utils/serverError');
|
|||||||
* schema:
|
* schema:
|
||||||
* type: array
|
* type: array
|
||||||
* items:
|
* items:
|
||||||
* $ref: '#/components/schemas/Measurement'
|
* type: object
|
||||||
|
* properties:
|
||||||
|
* id:
|
||||||
|
* type: integer
|
||||||
|
* project_id:
|
||||||
|
* type: integer
|
||||||
|
* timestamp:
|
||||||
|
* type: string
|
||||||
|
* format: date-time
|
||||||
|
* image_path:
|
||||||
|
* type: string
|
||||||
|
* temperature:
|
||||||
|
* type: number
|
||||||
|
* humidity:
|
||||||
|
* type: number
|
||||||
* 500:
|
* 500:
|
||||||
* description: Erreur serveur.
|
* description: Erreur serveur.
|
||||||
*/
|
*/
|
||||||
@@ -51,7 +65,21 @@ router.get('/measurements', (req, res) => {
|
|||||||
* content:
|
* content:
|
||||||
* application/json:
|
* application/json:
|
||||||
* schema:
|
* schema:
|
||||||
* $ref: '#/components/schemas/Measurement'
|
* type: object
|
||||||
|
* properties:
|
||||||
|
* id:
|
||||||
|
* type: integer
|
||||||
|
* project_id:
|
||||||
|
* type: integer
|
||||||
|
* timestamp:
|
||||||
|
* type: string
|
||||||
|
* format: date-time
|
||||||
|
* image_path:
|
||||||
|
* type: string
|
||||||
|
* temperature:
|
||||||
|
* type: number
|
||||||
|
* humidity:
|
||||||
|
* type: number
|
||||||
* 400:
|
* 400:
|
||||||
* description: ID de mesure invalide.
|
* description: ID de mesure invalide.
|
||||||
* 500:
|
* 500:
|
||||||
@@ -96,7 +124,21 @@ router.get('/measurements/:id', (req, res) => {
|
|||||||
* content:
|
* content:
|
||||||
* application/json:
|
* application/json:
|
||||||
* schema:
|
* schema:
|
||||||
* $ref: '#/components/schemas/Measurement'
|
* type: object
|
||||||
|
* properties:
|
||||||
|
* id:
|
||||||
|
* type: integer
|
||||||
|
* project_id:
|
||||||
|
* type: integer
|
||||||
|
* timestamp:
|
||||||
|
* type: string
|
||||||
|
* format: date-time
|
||||||
|
* image_path:
|
||||||
|
* type: string
|
||||||
|
* temperature:
|
||||||
|
* type: number
|
||||||
|
* humidity:
|
||||||
|
* type: number
|
||||||
* 400:
|
* 400:
|
||||||
* description: ID de projet ou de commande invalide.
|
* description: ID de projet ou de commande invalide.
|
||||||
* 500:
|
* 500:
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ const serverError = require('../utils/serverError');
|
|||||||
* schema:
|
* schema:
|
||||||
* type: array
|
* type: array
|
||||||
* items:
|
* items:
|
||||||
* $ref: '#/components/schemas/Project'
|
* type: object
|
||||||
* 500:
|
* 500:
|
||||||
* description: Erreur serveur.
|
* description: Erreur serveur.
|
||||||
*/
|
*/
|
||||||
@@ -49,7 +49,7 @@ router.get('/projects', async (req, res) => {
|
|||||||
* content:
|
* content:
|
||||||
* application/json:
|
* application/json:
|
||||||
* schema:
|
* schema:
|
||||||
* $ref: '#/components/schemas/Project'
|
* type: object
|
||||||
* 400:
|
* 400:
|
||||||
* description: ID de projet invalide.
|
* description: ID de projet invalide.
|
||||||
* 500:
|
* 500:
|
||||||
@@ -89,7 +89,7 @@ router.get('/projects/:id', async (req, res) => {
|
|||||||
* schema:
|
* schema:
|
||||||
* type: array
|
* type: array
|
||||||
* items:
|
* items:
|
||||||
* $ref: '#/components/schemas/Video'
|
* type: object
|
||||||
* 400:
|
* 400:
|
||||||
* description: ID de projet invalide.
|
* description: ID de projet invalide.
|
||||||
* 500:
|
* 500:
|
||||||
@@ -129,7 +129,7 @@ router.get('/projects/:id/videos', async (req, res) => {
|
|||||||
* schema:
|
* schema:
|
||||||
* type: array
|
* type: array
|
||||||
* items:
|
* items:
|
||||||
* $ref: '#/components/schemas/Measurement'
|
* type: object
|
||||||
* 400:
|
* 400:
|
||||||
* description: ID de projet invalide.
|
* description: ID de projet invalide.
|
||||||
* 500:
|
* 500:
|
||||||
|
|||||||
@@ -1,27 +0,0 @@
|
|||||||
components:
|
|
||||||
schemas:
|
|
||||||
Measurement:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
id:
|
|
||||||
type: integer
|
|
||||||
description: The unique identifier for a measurement.
|
|
||||||
project_id:
|
|
||||||
type: integer
|
|
||||||
description: The ID of the project associated with the measurement.
|
|
||||||
timestamp:
|
|
||||||
type: string
|
|
||||||
format: date-time
|
|
||||||
description: The timestamp of the measurement.
|
|
||||||
image_path:
|
|
||||||
type: string
|
|
||||||
description: The path to the image associated with the measurement.
|
|
||||||
temperature:
|
|
||||||
type: number
|
|
||||||
description: The temperature recorded in the measurement.
|
|
||||||
humidity:
|
|
||||||
type: number
|
|
||||||
description: The humidity recorded in the measurement.
|
|
||||||
completed:
|
|
||||||
type: boolean
|
|
||||||
description: Indicates whether the measurement is completed.
|
|
||||||
@@ -17,7 +17,32 @@ const serverError = require('../utils/serverError');
|
|||||||
* schema:
|
* schema:
|
||||||
* type: array
|
* type: array
|
||||||
* items:
|
* items:
|
||||||
* $ref: '#/components/schemas/Video'
|
* type: object
|
||||||
|
* properties:
|
||||||
|
* id:
|
||||||
|
* type: integer
|
||||||
|
* project_id:
|
||||||
|
* type: integer
|
||||||
|
* measurement_ids:
|
||||||
|
* type: string
|
||||||
|
* video_path:
|
||||||
|
* type: string
|
||||||
|
* start_timestamp:
|
||||||
|
* type: string
|
||||||
|
* end_timestamp:
|
||||||
|
* type: string
|
||||||
|
* image_count:
|
||||||
|
* type: integer
|
||||||
|
* resolution:
|
||||||
|
* type: string
|
||||||
|
* duration:
|
||||||
|
* type: number
|
||||||
|
* fps:
|
||||||
|
* type: number
|
||||||
|
* status:
|
||||||
|
* type: integer
|
||||||
|
* name:
|
||||||
|
* type: string
|
||||||
* 500:
|
* 500:
|
||||||
* description: Erreur serveur.
|
* description: Erreur serveur.
|
||||||
*/
|
*/
|
||||||
@@ -50,7 +75,32 @@ router.get('/videos', (req, res) => {
|
|||||||
* content:
|
* content:
|
||||||
* application/json:
|
* application/json:
|
||||||
* schema:
|
* schema:
|
||||||
* $ref: '#/components/schemas/Video'
|
* type: object
|
||||||
|
* properties:
|
||||||
|
* id:
|
||||||
|
* type: integer
|
||||||
|
* project_id:
|
||||||
|
* type: integer
|
||||||
|
* measurement_ids:
|
||||||
|
* type: string
|
||||||
|
* video_path:
|
||||||
|
* type: string
|
||||||
|
* start_timestamp:
|
||||||
|
* type: string
|
||||||
|
* end_timestamp:
|
||||||
|
* type: string
|
||||||
|
* image_count:
|
||||||
|
* type: integer
|
||||||
|
* resolution:
|
||||||
|
* type: string
|
||||||
|
* duration:
|
||||||
|
* type: number
|
||||||
|
* fps:
|
||||||
|
* type: number
|
||||||
|
* status:
|
||||||
|
* type: integer
|
||||||
|
* name:
|
||||||
|
* type: string
|
||||||
* 400:
|
* 400:
|
||||||
* description: ID de vidéo invalide.
|
* description: ID de vidéo invalide.
|
||||||
* 500:
|
* 500:
|
||||||
|
|||||||
Reference in New Issue
Block a user