Browse Source

Fixed same name in doc params

rigwild 2 years ago
parent
commit
d4c984f840

+ 5 - 7
server/routes/getImage.js

@@ -20,8 +20,6 @@ const router = express.Router()
  * @apiParam {String} sceneName The selected scene
  * @apiParam {Number} imageQuality The required quality of the image
  *
- * @apiHeader (Response Headers) {String} Content-Type application/json; charset=utf-8
- *
  * @apiExample Usage example
  * curl -i -L -X GET "http://diran.univ-littoral.fr/api/getImage?sceneName=bathroom&imageQuality=200"
  *
@@ -32,14 +30,14 @@ const router = express.Router()
  *   "data": "/api/images/bathroom/bathroom_00200.png"
  * }
  *
- * @apiError (Error 4xx) 400 Missing parameter(s)
+ * @apiError (Error 4xx) 400_[1] Missing parameter(s)
  * @apiErrorExample {json} Missing parameter
  * HTTP/1.1 400 Bad Request
  * {
  *   "message": "Missing parameter(s). Required parameters : sceneName, imageQuality."
  * }
  *
- * @apiError (Error 4xx) 400 Invalid query parameter
+ * @apiError (Error 4xx) 400_[2] Invalid query parameter
  * @apiErrorExample {json} Invalid query parameter(s)
  * HTTP/1.1 400 Bad Request
  * {
@@ -50,21 +48,21 @@ const router = express.Router()
  *   ]
  * }
  *
- * @apiError (Error 4xx) 404 Quality not found
+ * @apiError (Error 4xx) 404_[1] Quality not found
  * @apiErrorExample {json} Quality not found
  * HTTP/1.1 404 Not Found
  * {
  *   "message": "The requested quality (9999) was not found for the requested scene (bathroom)."
  * }
  *
- * @apiError (Error 5xx) 500 Can't access the `IMAGES_PATH` directory
+ * @apiError (Error 5xx) 500_[1] Can't access the `IMAGES_PATH` directory
  * @apiErrorExample {json} Images directory not accessible
  * HTTP/1.1 500 Internal Server Error
  * {
  *   "message": "Can't access the \"images\" directory. Check it exists and you have read permission on it"
  * }
  *
- * @apiError (Error 5xx) 500 Failed to parse a file's name
+ * @apiError (Error 5xx) 500_[2] Failed to parse a file's name
  * @apiErrorExample {json} Failed to parse a file's name
  * HTTP/1.1 500 Internal Server Error
  * {

+ 6 - 8
server/routes/getImageExtracts.js

@@ -25,8 +25,6 @@ const router = express.Router()
  * @apiParam {Number} horizontalExtractCount The amount of extracts for the horizontal axis
  * @apiParam {Number} verticalExtractCount The amount of extracts for the vertical axis
  *
- * @apiHeader (Response Headers) {String} Content-Type application/json; charset=utf-8
- *
  * @apiExample Usage example
  * curl -i -L -X GET "http://diran.univ-littoral.fr/api/getImageExtracts?sceneName=bathroom&imageQuality=200&horizontalExtractCount=1&verticalExtractCount=2"
  *
@@ -40,14 +38,14 @@ const router = express.Router()
  *   ]
  * }
  *
- * @apiError (Error 4xx) 400 Missing parameter(s)
+ * @apiError (Error 4xx) 400_[1] Missing parameter(s)
  * @apiErrorExample {json} Missing parameter
  * HTTP/1.1 400 Bad Request
  * {
  *   "message": "Missing parameter(s). Required parameters : sceneName, imageQuality, horizontalExtractCount, verticalExtractCount."
  * }
  *
- * @apiError (Error 4xx) 400 Invalid query parameter
+ * @apiError (Error 4xx) 400_[2] Invalid query parameter
  * @apiErrorExample {json} Invalid query parameter(s)
  * HTTP/1.1 400 Bad Request
  * {
@@ -60,7 +58,7 @@ const router = express.Router()
  *   ]
  * }
  *
- * @apiError (Error 4xx) 400 Invalid configuration
+ * @apiError (Error 4xx) 400_[3] Invalid configuration
  * @apiErrorExample {json} Invalid configuration
  * HTTP/1.1 400 Bad Request
  * {
@@ -71,21 +69,21 @@ const router = express.Router()
  *   ]
  * }
  *
- * @apiError (Error 4xx) 404 Quality not found
+ * @apiError (Error 4xx) 404_[1] Quality not found
  * @apiErrorExample {json} Quality not found
  * HTTP/1.1 404 Not Found
  * {
  *   "message": "The requested quality (9999) was not found for the requested scene (bathroom)."
  * }
  *
- * @apiError (Error 5xx) 500 Can't access the `IMAGES_PATH` directory
+ * @apiError (Error 5xx) 500_[1] Can't access the `IMAGES_PATH` directory
  * @apiErrorExample {json} Images directory not accessible
  * HTTP/1.1 500 Internal Server Error
  * {
  *   "message": "Can't access the \"images\" directory. Check it exists and you have read permission on it"
  * }
  *
- * @apiError (Error 5xx) 500 Failed to parse a file's name
+ * @apiError (Error 5xx) 500_[2] Failed to parse a file's name
  * @apiErrorExample {json} Failed to parse a file's name
  * HTTP/1.1 500 Internal Server Error
  * {

+ 4 - 6
server/routes/listSceneQualities.js

@@ -15,8 +15,6 @@ const router = express.Router()
  *
  * @apiParam {String} sceneName The selected scene
  *
- * @apiHeader (Response Headers) {String} Content-Type application/json; charset=utf-8
- *
  * @apiExample Usage example
  * curl -i -L -X GET "http://diran.univ-littoral.fr/api/listSceneQualities?sceneName=bathroom"
  *
@@ -31,28 +29,28 @@ const router = express.Router()
  *   ]
  * }
  *
- * @apiError (Error 4xx) 400 Missing parameter(s)
+ * @apiError (Error 4xx) 400_[1] Missing parameter(s)
  * @apiErrorExample {json} Missing parameter
  * HTTP/1.1 400 Bad Request
  * {
  *   "message": "Missing parameter(s). Required parameters : sceneName."
  * }
  *
- * @apiError (Error 4xx) 400 The requested scene name is not valid
+ * @apiError (Error 4xx) 400_[2] The requested scene name is not valid
  * @apiErrorExample {json} Invalid scene name
  * HTTP/1.1 400 Bad Request
  * {
  *   "message": "The requested scene name \"bathroom/../\" is not valid."
  * }
  *
- * @apiError (Error 5xx) 500 Can't access the `IMAGES_PATH` directory
+ * @apiError (Error 5xx) 500_[1] Can't access the `IMAGES_PATH` directory
  * @apiErrorExample {json} Images directory not accessible
  * HTTP/1.1 500 Internal Server Error
  * {
  *   "message": "Can't access the \"images\" directory. Check it exists and you have read permission on it"
  * }
  *
- * @apiError (Error 5xx) 500 Failed to parse a file's name
+ * @apiError (Error 5xx) 500_[2] Failed to parse a file's name
  * @apiErrorExample {json} Failed to parse a file's name
  * HTTP/1.1 500 Internal Server Error
  * {

+ 1 - 3
server/routes/listScenes.js

@@ -18,8 +18,6 @@ const router = express.Router()
  * @apiDescription List all scenes availables in your `IMAGES_PATH` directory
  * @apiSampleRequest /listScenes
  *
- * @apiHeader (Response Headers) {String} Content-Type application/json; charset=utf-8
- *
  * @apiExample Usage example
  * curl -i -L -X GET "http://diran.univ-littoral.fr/api/listScenes"
  *
@@ -33,7 +31,7 @@ const router = express.Router()
  *   ]
  * }
  *
- * @apiError (Error 5xx) 500 Can't access the `IMAGES_PATH` directory
+ * @apiError (Error 5xx) 500_[1] Can't access the `IMAGES_PATH` directory
  * @apiErrorExample {json} Images directory not accessible
  * HTTP/1.1 500 Internal Server Error
  * {