summaryrefslogtreecommitdiffstats
path: root/apps/files_reminders/lib
diff options
context:
space:
mode:
authorjld3103 <jld3103yt@gmail.com>2023-08-21 05:45:43 +0200
committerjld3103 <jld3103yt@gmail.com>2023-08-22 08:33:42 +0200
commita95bebde348f1146ca1ae3103123a04aa5347b62 (patch)
tree6ed83a39ae8fb4fd9dddbe7a80ba65fba0e94d39 /apps/files_reminders/lib
parenta4f3088c6eab2c76bf0c64d39d5493dfe184593e (diff)
downloadnextcloud-server-a95bebde348f1146ca1ae3103123a04aa5347b62.tar.gz
nextcloud-server-a95bebde348f1146ca1ae3103123a04aa5347b62.zip
files_reminders: Add OpenAPI spec
Signed-off-by: jld3103 <jld3103yt@gmail.com>
Diffstat (limited to 'apps/files_reminders/lib')
-rw-r--r--apps/files_reminders/lib/Controller/ApiController.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/apps/files_reminders/lib/Controller/ApiController.php b/apps/files_reminders/lib/Controller/ApiController.php
index ed23ee032ba..91b7e51eb6f 100644
--- a/apps/files_reminders/lib/Controller/ApiController.php
+++ b/apps/files_reminders/lib/Controller/ApiController.php
@@ -54,6 +54,12 @@ class ApiController extends OCSController {
/**
* Get a reminder
+ *
+ * @param int $fileId ID of the file
+ * @return DataResponse<Http::STATUS_OK, array{dueDate: ?string}, array{}>|DataResponse<Http::STATUS_UNAUTHORIZED, array<empty>, array{}>
+ *
+ * 200: Reminder returned
+ * 401: User not found
*/
#[NoAdminRequired]
public function get(int $fileId): DataResponse {
@@ -79,7 +85,16 @@ class ApiController extends OCSController {
/**
* Set a reminder
*
+ * @param int $fileId ID of the file
* @param string $dueDate ISO 8601 formatted date time string
+ *
+ * @return DataResponse<Http::STATUS_OK|Http::STATUS_CREATED|Http::STATUS_BAD_REQUEST|Http::STATUS_UNAUTHORIZED|Http::STATUS_NOT_FOUND, array<empty>, array{}>
+ *
+ * 200: Reminder updated
+ * 201: Reminder created successfully
+ * 400: Creating reminder is not possible
+ * 401: User not found
+ * 404: File not found
*/
#[NoAdminRequired]
public function set(int $fileId, string $dueDate): DataResponse {
@@ -108,6 +123,14 @@ class ApiController extends OCSController {
/**
* Remove a reminder
+ *
+ * @param int $fileId ID of the file
+ *
+ * @return DataResponse<Http::STATUS_OK|Http::STATUS_UNAUTHORIZED|Http::STATUS_NOT_FOUND, array<empty>, array{}>
+ *
+ * 200: Reminder deleted successfully
+ * 401: User not found
+ * 404: Reminder not found
*/
#[NoAdminRequired]
public function remove(int $fileId): DataResponse {