From ce0d63d7f972a2251bf84325087e01b1542633ea Mon Sep 17 00:00:00 2001 From: Filip Izydorczyk Date: Fri, 18 Dec 2020 15:52:05 +0100 Subject: [PATCH] Added docs --- .../java/com/plannaplan/controllers/GroupController.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/restservice/src/main/java/com/plannaplan/controllers/GroupController.java b/restservice/src/main/java/com/plannaplan/controllers/GroupController.java index 3424c95..bdadac4 100755 --- a/restservice/src/main/java/com/plannaplan/controllers/GroupController.java +++ b/restservice/src/main/java/com/plannaplan/controllers/GroupController.java @@ -62,8 +62,10 @@ public class GroupController { @PreAuthorize("hasRole('ROLE_DEANERY')") @PutMapping("/{id}/capacity") - public ResponseEntity updateCapacity(@PathVariable(name = "id") Long id, - @RequestParam(name = "newcapacity") int newcapacity) { + @ApiOperation(value = "Change capacity of given group. You need to provide DEANERY token to be ale to change capacity") + public ResponseEntity updateCapacity( + @PathVariable(name = "id") @ApiParam(value = "id of group to change capacity") Long id, + @RequestParam(name = "newcapacity") @ApiParam(value = "capacity to be set") int newcapacity) { final Groups group = this.groupService.getGroupById(id).get(); if (group == null) { return new ResponseEntity<>("Given group doens't exist", HttpStatus.NOT_FOUND);