diff --git a/htdocs/modulebuilder/template/class/api_mymodule.class.php b/htdocs/modulebuilder/template/class/api_mymodule.class.php index d7a810ac2cd..6dd93aceacd 100644 --- a/htdocs/modulebuilder/template/class/api_mymodule.class.php +++ b/htdocs/modulebuilder/template/class/api_mymodule.class.php @@ -63,6 +63,7 @@ class MyModuleApi extends DolibarrApi * @return array|mixed data without useless information * * @url GET myobjects/{id} + * * @throws RestException */ public function get($id) @@ -186,6 +187,8 @@ class MyModuleApi extends DolibarrApi * @param array $request_data Request datas * @return int ID of myobject * + * @throws RestException + * * @url POST myobjects/ */ public function post($request_data = null) @@ -212,6 +215,8 @@ class MyModuleApi extends DolibarrApi * @param array $request_data Datas * @return int * + * @throws RestException + * * @url PUT myobjects/{id} */ public function put($id, $request_data = null) @@ -250,6 +255,8 @@ class MyModuleApi extends DolibarrApi * @param int $id MyObject ID * @return array * + * @throws RestException + * * @url DELETE myobjects/{id} */ public function delete($id) diff --git a/htdocs/societe/class/api_contacts.class.php b/htdocs/societe/class/api_contacts.class.php index 6b6c5a439a6..2ae9fd34869 100644 --- a/htdocs/societe/class/api_contacts.class.php +++ b/htdocs/societe/class/api_contacts.class.php @@ -391,10 +391,8 @@ class Contacts extends DolibarrApi * * @return mixed * - * @throws 401 RestException Insufficient rights - * @throws 401 RestException Access not allowed for login - * @throws 404 RestException Category not found - * @throws 404 RestException Contact not found + * @throws RestException 401 Insufficient rights + * @throws RestException 404 Category or contact not found */ public function addCategory($id, $category_id) { @@ -433,10 +431,8 @@ class Contacts extends DolibarrApi * @param int $category_id Id of category * @return mixed * - * @throws 401 RestException Insufficient rights - * @throws 401 RestException Access not allowed for login - * @throws 404 RestException Category not found - * @throws 404 RestException Contact not found + * @throws RestException 401 Insufficient rights + * @throws RestException 404 Category or contact not found */ public function deleteCategory($id, $category_id) { diff --git a/htdocs/societe/class/api_thirdparties.class.php b/htdocs/societe/class/api_thirdparties.class.php index e055026910d..5f031137c1f 100644 --- a/htdocs/societe/class/api_thirdparties.class.php +++ b/htdocs/societe/class/api_thirdparties.class.php @@ -1388,11 +1388,11 @@ class Thirdparties extends DolibarrApi * @param array $request_data Request data * * @return SocieteAccount + * * @throws RestException 401 Unauthorized: User does not have permission to read thirdparties * @throws RestException 409 Conflict: A SocieteAccount entity (gateway) already exists for this company and site. * @throws RestException 422 Unprocessable Entity: You must pass the site attribute in your request data ! * @throws RestException 500 Internal Server Error: Error creating SocieteAccount account - * @status RestException 201 * * @url POST {id}/gateways */ @@ -1530,6 +1530,7 @@ class Thirdparties extends DolibarrApi * @param array $request_data Request data * * @return SocieteAccount + * * @throws RestException 401 Unauthorized: User does not have permission to read thirdparties * @throws RestException 404 Not Found: Specified thirdparty ID does not belongs to an existing thirdparty * @throws RestException 409 Conflict: Another SocieteAccount entity already exists for this thirdparty with this site key. diff --git a/htdocs/ticket/class/api_tickets.class.php b/htdocs/ticket/class/api_tickets.class.php index 707fe403c6c..ba82f0ba1f0 100644 --- a/htdocs/ticket/class/api_tickets.class.php +++ b/htdocs/ticket/class/api_tickets.class.php @@ -68,9 +68,9 @@ class Tickets extends DolibarrApi * @param int $id ID of ticket * @return array|mixed Data without useless information * - * @throws 401 - * @throws 403 - * @throws 404 + * @throws RestException 401 + * @throws RestException 403 + * @throws RestException 404 */ public function get($id) { @@ -87,9 +87,9 @@ class Tickets extends DolibarrApi * * @url GET track_id/{track_id} * - * @throws 401 - * @throws 403 - * @throws 404 + * @throws RestException 401 + * @throws RestException 403 + * @throws RestException 404 */ public function getByTrackId($track_id) { @@ -106,9 +106,9 @@ class Tickets extends DolibarrApi * * @url GET ref/{ref} * - * @throws 401 - * @throws 403 - * @throws 404 + * @throws RestException 401 + * @throws RestException 403 + * @throws RestException 404 */ public function getByRef($ref) { diff --git a/htdocs/user/class/api_users.class.php b/htdocs/user/class/api_users.class.php index fa139e2c69f..373a8b55f0e 100644 --- a/htdocs/user/class/api_users.class.php +++ b/htdocs/user/class/api_users.class.php @@ -171,9 +171,8 @@ class Users extends DolibarrApi * * @return array|mixed Data without useless information * - * @throws 401 RestException Insufficient rights - * @throws 404 RestException User not found - * @throws 404 RestException User group not found + * @throws RestException 401 Insufficient rights + * @throws RestException 404 User or group not found */ public function getInfo() { @@ -508,7 +507,7 @@ class Users extends DolibarrApi * Clean sensible object datas * * @param object $object Object to clean - * @return array Array of cleaned object properties + * @return array Array of cleaned object properties */ protected function _cleanObjectDatas($object) {