From 82ebd3dba9da17a0028ec2a8900110e1d99b11d4 Mon Sep 17 00:00:00 2001 From: Ludy Date: Fri, 15 Nov 2024 10:25:17 +0100 Subject: [PATCH] Add: missing swagger Tag (#2238) --- .../controller/api/misc/ReplaceAndInvertColorController.java | 2 ++ .../SPDF/controller/api/security/WatermarkController.java | 5 ++--- .../software/SPDF/controller/web/SignatureController.java | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/stirling/software/SPDF/controller/api/misc/ReplaceAndInvertColorController.java b/src/main/java/stirling/software/SPDF/controller/api/misc/ReplaceAndInvertColorController.java index c7296a1b..65085b1d 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/misc/ReplaceAndInvertColorController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/misc/ReplaceAndInvertColorController.java @@ -13,12 +13,14 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import stirling.software.SPDF.model.api.misc.ReplaceAndInvertColorRequest; import stirling.software.SPDF.service.misc.ReplaceAndInvertColorService; @RestController @RequestMapping("/api/v1/misc") +@Tag(name = "Misc", description = "Miscellaneous APIs") public class ReplaceAndInvertColorController { private ReplaceAndInvertColorService replaceAndInvertColorService; diff --git a/src/main/java/stirling/software/SPDF/controller/api/security/WatermarkController.java b/src/main/java/stirling/software/SPDF/controller/api/security/WatermarkController.java index 7bf9bbb7..a885fcdb 100644 --- a/src/main/java/stirling/software/SPDF/controller/api/security/WatermarkController.java +++ b/src/main/java/stirling/software/SPDF/controller/api/security/WatermarkController.java @@ -188,8 +188,7 @@ public class WatermarkController { float pageWidth = page.getMediaBox().getWidth(); float pageHeight = page.getMediaBox().getHeight(); - - //Calculating the new width and height depending on the angle. + // Calculating the new width and height depending on the angle. float radians = (float) Math.toRadians(rotation); float newWatermarkWidth = (float) @@ -200,7 +199,7 @@ public class WatermarkController { (Math.abs(watermarkWidth * Math.sin(radians)) + Math.abs(watermarkHeight * Math.cos(radians))); - //Calculating the number of rows and columns. + // Calculating the number of rows and columns. int watermarkRows = (int) (pageHeight / newWatermarkHeight + 1); int watermarkCols = (int) (pageWidth / newWatermarkWidth + 1); diff --git a/src/main/java/stirling/software/SPDF/controller/web/SignatureController.java b/src/main/java/stirling/software/SPDF/controller/web/SignatureController.java index eba4e1c4..eb375663 100644 --- a/src/main/java/stirling/software/SPDF/controller/web/SignatureController.java +++ b/src/main/java/stirling/software/SPDF/controller/web/SignatureController.java @@ -15,7 +15,7 @@ import stirling.software.SPDF.controller.api.pipeline.UserServiceInterface; import stirling.software.SPDF.service.SignatureService; @Controller -@RequestMapping("/api/v1/general/") +@RequestMapping("/api/v1/general") public class SignatureController { @Autowired private SignatureService signatureService;