From d3cd615e13df9295ad43ec570d5405a7b32fe942 Mon Sep 17 00:00:00 2001 From: Jannik Pulfer Date: Wed, 23 Oct 2024 08:03:13 +0200 Subject: [PATCH] Update swagger annotations of get current quarter and fix usage of wrong implementation class for get current quarters --- .../java/ch/puzzle/okr/controller/QuarterController.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/src/main/java/ch/puzzle/okr/controller/QuarterController.java b/backend/src/main/java/ch/puzzle/okr/controller/QuarterController.java index 8f19714dfe..1cc1383dbc 100644 --- a/backend/src/main/java/ch/puzzle/okr/controller/QuarterController.java +++ b/backend/src/main/java/ch/puzzle/okr/controller/QuarterController.java @@ -28,15 +28,15 @@ public QuarterController(QuarterBusinessService quarterBusinessService) { @Operation(summary = "Get quarters", description = "Get a List of quarters depending on current date") @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Returned a List of quarters", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = TeamDto.class)) }) }) + @Content(mediaType = "application/json", schema = @Schema(implementation = Quarter.class)) }) }) @GetMapping("") public ResponseEntity> getCurrentQuarters() { return ResponseEntity.status(HttpStatus.OK).body(this.quarterBusinessService.getQuarters()); } - @Operation(summary = "Get quarters", description = "Get a List of quarters depending on current date") - @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Returned a List of quarters", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = TeamDto.class)) }) }) + @Operation(summary = "Get current quarter", description = "Get the current quarter depending on current date") + @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Returned the current quarter", content = { + @Content(mediaType = "application/json", schema = @Schema(implementation = Quarter.class)) }) }) @GetMapping("/current") public ResponseEntity getCurrentQuarter() { return ResponseEntity.status(HttpStatus.OK).body(this.quarterBusinessService.getCurrentQuarter());