From e30df4f6d00f7d1932978e3e3d2cdfdd3ece6381 Mon Sep 17 00:00:00 2001 From: Swaraj Pal Date: Wed, 22 Dec 2021 22:53:33 +0530 Subject: [PATCH 1/2] SonarSmell: Remove ApiResponses wrapper Relates #381 --- .../server/sonar/infrastructure/primary/SonarResource.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/tech/jhipster/lite/generator/server/sonar/infrastructure/primary/SonarResource.java b/src/main/java/tech/jhipster/lite/generator/server/sonar/infrastructure/primary/SonarResource.java index bc2e73fe4bd..1b989339cfd 100644 --- a/src/main/java/tech/jhipster/lite/generator/server/sonar/infrastructure/primary/SonarResource.java +++ b/src/main/java/tech/jhipster/lite/generator/server/sonar/infrastructure/primary/SonarResource.java @@ -24,7 +24,7 @@ public SonarResource(SonarApplicationService sonarApplicationService) { } @Operation(summary = "Add Sonar configuration to inspect code quality") - @ApiResponses({ @ApiResponse(responseCode = "500", description = "An error occurred while adding Sonar configuration") }) + @ApiResponse(responseCode = "500", description = "An error occurred while adding Sonar configuration") @PostMapping public void addSonar(@RequestBody ProjectDTO projectDTO) { Project project = ProjectDTO.toProject(projectDTO); From 8b705d9127d52169e5b4c4dfaabdefe640fbbf07 Mon Sep 17 00:00:00 2001 From: Swaraj Pal Date: Wed, 22 Dec 2021 22:56:22 +0530 Subject: [PATCH 2/2] Remove unwanted imports --- .../server/sonar/infrastructure/primary/SonarResource.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/tech/jhipster/lite/generator/server/sonar/infrastructure/primary/SonarResource.java b/src/main/java/tech/jhipster/lite/generator/server/sonar/infrastructure/primary/SonarResource.java index 1b989339cfd..b01b169eaad 100644 --- a/src/main/java/tech/jhipster/lite/generator/server/sonar/infrastructure/primary/SonarResource.java +++ b/src/main/java/tech/jhipster/lite/generator/server/sonar/infrastructure/primary/SonarResource.java @@ -2,7 +2,6 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.responses.ApiResponse; -import io.swagger.v3.oas.annotations.responses.ApiResponses; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody;