From b18f9cd50e2bae25190e516903fcd0d90e7482dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wo=C5=BAniak?= Date: Sun, 10 Jan 2021 15:59:26 +0100 Subject: [PATCH] Checkpoint: adding docs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcin Woźniak --- .../plannaplan/controllers/ExchangeController.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/restservice/src/main/java/com/plannaplan/controllers/ExchangeController.java b/restservice/src/main/java/com/plannaplan/controllers/ExchangeController.java index 9470b3c..87436d3 100644 --- a/restservice/src/main/java/com/plannaplan/controllers/ExchangeController.java +++ b/restservice/src/main/java/com/plannaplan/controllers/ExchangeController.java @@ -30,7 +30,11 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import io.swagger.annotations.Api; +import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import io.swagger.annotations.Example; +import io.swagger.annotations.ExampleProperty; @RestController @CrossOrigin @@ -48,8 +52,11 @@ public class ExchangeController extends TokenBasedController{ private ExchangeService exchangeService; @PostMapping("/exchange") - @ApiOperation(value = "Return all courses") - public ResponseEntity createExchange(@RequestBody Map exchangeRequest) + @ApiOperation(value = "Creates exchange offer.") + public ResponseEntity createExchange( + @ApiParam( value = "Json object that contains assignment to trade and desired group") + @RequestBody + Map exchangeRequest) throws UserNotFoundException { final User asker = this.getCurrentUser()