Improved documentation and removed useless constraint

Details:
- Improved UserManager and GroupManager REST API docs
- removed content-type constraint on group admin DELETE
This commit is contained in:
Biagio Peccerillo 2024-12-10 11:41:34 +01:00
parent 3f45dce6f7
commit 2b54a98760
2 changed files with 14 additions and 14 deletions

View File

@ -206,8 +206,8 @@ public class GroupManager {
/**
* Add an administrator to a group
*
* @param id group id
* @param userId user id
* @param id group name
* @param userId user name
*/
@StatusCodes({
@ResponseCode ( code = 204, condition = "Success."),
@ -253,10 +253,10 @@ public class GroupManager {
}
/**
* Remove an administrator from a group
* Remove an administrator from a group. The removed admin remains in the group as a <em>normal</em> user.
*
* @param id group id
* @param userId user id
* @param id group name
* @param userId user name
*/
@StatusCodes({
@ResponseCode ( code = 204, condition = "Success."),
@ -266,9 +266,8 @@ public class GroupManager {
@ResourceMethodSignature(output = void.class, pathParams = { @PathParam("id")}, formParams = { @FormParam("userId") })
@DELETE
@Path("{id}/admins/{userId}")
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
public void removeAdmin(@PathParam("id") String groupId, @PathParam("userId") String userId){
InnerMethodName.set("removeAdmin");
JackrabbitSession session = null;
@ -302,7 +301,7 @@ public class GroupManager {
/**
* Get the list of administrators of a group
*
* @param groupId group id
* @param groupId group name
* @return list of administrators
*/
@StatusCodes({
@ -339,8 +338,8 @@ public class GroupManager {
* Add a user to a group <br>
* <strong>Only users with <code>Infrastructure-Manager</code> or <code>VRE-Manager</code> role allowed</strong>
*
* @param id group id
* @param userId user id
* @param id group name
* @param userId user name
* @return true if the user has been added to the group
* @responseExample text/plain true
*/
@ -391,8 +390,8 @@ public class GroupManager {
* Remove a user from a group <br>
* <strong>Only users with <code>Infrastructure-Manager</code> or <code>VRE-Manager</code> role allowed</strong>
*
* @param groupId group id
* @param userId user id
* @param groupId group name
* @param userId user name
* @return true if the user has been removed from the group
*/
@StatusCodes({
@ -437,7 +436,7 @@ public class GroupManager {
* Get the list of users of a group <br>
* <strong>Only users with <code>Infrastructure-Manager</code> or <code>VRE-Manager</code> role allowed</strong>
*
* @param groupId group id
* @param groupId group name
* @return list of users
*/
@StatusCodes({

View File

@ -130,7 +130,8 @@ public class UserManager {
*
* @param user user name
* @param password user password
* @return user id
* @return user name
* @responseExample name.surname
*/
@DocumentationExample(" ...\n\nuser=nome.utente&password=passw0rd")
@POST