From c2d45cb1728e2191e51424734e74cb2a56b323b0 Mon Sep 17 00:00:00 2001 From: jld3103 Date: Tue, 19 Sep 2023 14:12:17 +0200 Subject: Add single status code descriptions for OpenAPI Signed-off-by: jld3103 --- apps/user_status/lib/Controller/PredefinedStatusController.php | 2 ++ apps/user_status/lib/Controller/StatusesController.php | 4 +++- apps/user_status/lib/Controller/UserStatusController.php | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) (limited to 'apps/user_status/lib') diff --git a/apps/user_status/lib/Controller/PredefinedStatusController.php b/apps/user_status/lib/Controller/PredefinedStatusController.php index 0a108a56bf6..ec78fedbc0b 100644 --- a/apps/user_status/lib/Controller/PredefinedStatusController.php +++ b/apps/user_status/lib/Controller/PredefinedStatusController.php @@ -63,6 +63,8 @@ class PredefinedStatusController extends OCSController { * @NoAdminRequired * * @return DataResponse + * + * 200: Predefined statuses returned */ public function findAll():DataResponse { // Filtering out the invisible one, that should only be set by API diff --git a/apps/user_status/lib/Controller/StatusesController.php b/apps/user_status/lib/Controller/StatusesController.php index 0e4deca13b7..9e2bea8ff2f 100644 --- a/apps/user_status/lib/Controller/StatusesController.php +++ b/apps/user_status/lib/Controller/StatusesController.php @@ -68,6 +68,8 @@ class StatusesController extends OCSController { * @param int|null $limit Maximum number of statuses to find * @param int|null $offset Offset for finding statuses * @return DataResponse + * + * 200: Statuses returned */ public function findAll(?int $limit = null, ?int $offset = null): DataResponse { $allStatuses = $this->service->findAll($limit, $offset); @@ -86,7 +88,7 @@ class StatusesController extends OCSController { * @return DataResponse * @throws OCSNotFoundException The user was not found * - * 200: The status was found successfully + * 200: Status returned */ public function find(string $userId): DataResponse { try { diff --git a/apps/user_status/lib/Controller/UserStatusController.php b/apps/user_status/lib/Controller/UserStatusController.php index 321555a45f2..5f0647563ca 100644 --- a/apps/user_status/lib/Controller/UserStatusController.php +++ b/apps/user_status/lib/Controller/UserStatusController.php @@ -172,6 +172,8 @@ class UserStatusController extends OCSController { * @NoAdminRequired * * @return DataResponse, array{}> + * + * 200: Message cleared successfully */ public function clearMessage(): DataResponse { $this->service->clearMessage($this->userId); -- cgit v1.2.3