diff options
author | jld3103 <jld3103yt@gmail.com> | 2023-09-19 14:12:17 +0200 |
---|---|---|
committer | jld3103 <jld3103yt@gmail.com> | 2023-09-27 08:05:21 +0200 |
commit | c2d45cb1728e2191e51424734e74cb2a56b323b0 (patch) | |
tree | 0c46d10f4e5ef18bf0771069dd2a896da788b4ba /apps/provisioning_api/lib/Controller/UsersController.php | |
parent | 912b18b1fc9fd90bfc78f942cd2043a5a0145e69 (diff) | |
download | nextcloud-server-c2d45cb1728e2191e51424734e74cb2a56b323b0.tar.gz nextcloud-server-c2d45cb1728e2191e51424734e74cb2a56b323b0.zip |
Add single status code descriptions for OpenAPI
Signed-off-by: jld3103 <jld3103yt@gmail.com>
Diffstat (limited to 'apps/provisioning_api/lib/Controller/UsersController.php')
-rw-r--r-- | apps/provisioning_api/lib/Controller/UsersController.php | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php index c3e9d502675..b7e9b5d0de0 100644 --- a/apps/provisioning_api/lib/Controller/UsersController.php +++ b/apps/provisioning_api/lib/Controller/UsersController.php @@ -144,6 +144,8 @@ class UsersController extends AUserData { * @param int|null $limit Limit the amount of groups returned * @param int $offset Offset for searching for groups * @return DataResponse<Http::STATUS_OK, array{users: string[]}, array{}> + * + * 200: Users returned */ public function getUsers(string $search = '', int $limit = null, int $offset = 0): DataResponse { $user = $this->userSession->getUser(); @@ -183,6 +185,8 @@ class UsersController extends AUserData { * @param int|null $limit Limit the amount of groups returned * @param int $offset Offset for searching for groups * @return DataResponse<Http::STATUS_OK, array{users: array<string, ProvisioningApiUserDetails|array{id: string}>}, array{}> + * + * 200: Users details returned */ public function getUsersDetails(string $search = '', int $limit = null, int $offset = 0): DataResponse { $currentUser = $this->userSession->getUser(); @@ -537,6 +541,8 @@ class UsersController extends AUserData { * @param string $userId ID of the user * @return DataResponse<Http::STATUS_OK, ProvisioningApiUserDetails, array{}> * @throws OCSException + * + * 200: User returned */ public function getUser(string $userId): DataResponse { $includeScopes = false; @@ -561,6 +567,8 @@ class UsersController extends AUserData { * * @return DataResponse<Http::STATUS_OK, ProvisioningApiUserDetails, array{}> * @throws OCSException + * + * 200: Current user returned */ public function getCurrentUser(): DataResponse { $user = $this->userSession->getUser(); @@ -581,6 +589,8 @@ class UsersController extends AUserData { * * @return DataResponse<Http::STATUS_OK, string[], array{}> * @throws OCSException + * + * 200: Editable fields returned */ public function getEditableFields(): DataResponse { $currentLoggedInUser = $this->userSession->getUser(); @@ -600,6 +610,8 @@ class UsersController extends AUserData { * @param string $userId ID of the user * @return DataResponse<Http::STATUS_OK, string[], array{}> * @throws OCSException + * + * 200: Editable fields for user returned */ public function getEditableFieldsForUser(string $userId): DataResponse { $currentLoggedInUser = $this->userSession->getUser(); @@ -666,6 +678,8 @@ class UsersController extends AUserData { * @param string $value New value for the key * @return DataResponse<Http::STATUS_OK, array<empty>, array{}> * @throws OCSException + * + * 200: User values edited successfully */ public function editUserMultiValue( string $userId, @@ -765,6 +779,8 @@ class UsersController extends AUserData { * @param string $value New value for the key * @return DataResponse<Http::STATUS_OK, array<empty>, array{}> * @throws OCSException + * + * 200: User value edited successfully */ public function editUser(string $userId, string $key, string $value): DataResponse { $currentLoggedInUser = $this->userSession->getUser(); @@ -1076,6 +1092,8 @@ class UsersController extends AUserData { * @return DataResponse<Http::STATUS_OK, array<empty>, array{}> * * @throws OCSException + * + * 200: Wiped all user devices successfully */ public function wipeUserDevices(string $userId): DataResponse { /** @var IUser $currentLoggedInUser */ @@ -1111,6 +1129,8 @@ class UsersController extends AUserData { * @param string $userId ID of the user * @return DataResponse<Http::STATUS_OK, array<empty>, array{}> * @throws OCSException + * + * 200: User deleted successfully */ public function deleteUser(string $userId): DataResponse { $currentLoggedInUser = $this->userSession->getUser(); @@ -1148,6 +1168,8 @@ class UsersController extends AUserData { * @param string $userId ID of the user * @return DataResponse<Http::STATUS_OK, array<empty>, array{}> * @throws OCSException + * + * 200: User disabled successfully */ public function disableUser(string $userId): DataResponse { return $this->setEnabled($userId, false); @@ -1162,6 +1184,8 @@ class UsersController extends AUserData { * @param string $userId ID of the user * @return DataResponse<Http::STATUS_OK, array<empty>, array{}> * @throws OCSException + * + * 200: User enabled successfully */ public function enableUser(string $userId): DataResponse { return $this->setEnabled($userId, true); @@ -1201,6 +1225,8 @@ class UsersController extends AUserData { * @param string $userId ID of the user * @return DataResponse<Http::STATUS_OK, array{groups: string[]}, array{}> * @throws OCSException + * + * 200: Users groups returned */ public function getUsersGroups(string $userId): DataResponse { $loggedInUser = $this->userSession->getUser(); @@ -1249,6 +1275,8 @@ class UsersController extends AUserData { * @param string $groupid ID of the group * @return DataResponse<Http::STATUS_OK, array<empty>, array{}> * @throws OCSException + * + * 200: User added to group successfully */ public function addToGroup(string $userId, string $groupid = ''): DataResponse { if ($groupid === '') { @@ -1286,6 +1314,8 @@ class UsersController extends AUserData { * @param string $groupid ID of the group * @return DataResponse<Http::STATUS_OK, array<empty>, array{}> * @throws OCSException + * + * 200: User removed from group successfully */ public function removeFromGroup(string $userId, string $groupid): DataResponse { $loggedInUser = $this->userSession->getUser(); @@ -1349,6 +1379,8 @@ class UsersController extends AUserData { * @param string $groupid ID of the group * @return DataResponse<Http::STATUS_OK, array<empty>, array{}> * @throws OCSException + * + * 200: User added as group subadmin successfully */ public function addSubAdmin(string $userId, string $groupid): DataResponse { $group = $this->groupManager->get($groupid); @@ -1387,6 +1419,8 @@ class UsersController extends AUserData { * @param string $groupid ID of the group * @return DataResponse<Http::STATUS_OK, array<empty>, array{}> * @throws OCSException + * + * 200: User removed as group subadmin successfully */ public function removeSubAdmin(string $userId, string $groupid): DataResponse { $group = $this->groupManager->get($groupid); @@ -1417,6 +1451,8 @@ class UsersController extends AUserData { * @param string $userId ID if the user * @return DataResponse<Http::STATUS_OK, string[], array{}> * @throws OCSException + * + * 200: User subadmin groups returned */ public function getUserSubAdminGroups(string $userId): DataResponse { $groups = $this->getUserSubAdminGroupsData($userId); @@ -1432,6 +1468,8 @@ class UsersController extends AUserData { * @param string $userId ID if the user * @return DataResponse<Http::STATUS_OK, array<empty>, array{}> * @throws OCSException + * + * 200: Resent welcome message successfully */ public function resendWelcomeMessage(string $userId): DataResponse { $currentLoggedInUser = $this->userSession->getUser(); |