vidakovic commented on code in PR #5613:
URL: https://github.com/apache/fineract/pull/5613#discussion_r2927208672


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/api/InterestRateChartSlabsApiResource.java:
##########
@@ -35,118 +29,92 @@
 import jakarta.ws.rs.Path;
 import jakarta.ws.rs.PathParam;
 import jakarta.ws.rs.Produces;
-import jakarta.ws.rs.core.Context;
 import jakarta.ws.rs.core.MediaType;
-import jakarta.ws.rs.core.UriInfo;
 import java.util.List;
+import java.util.function.Supplier;
 import lombok.RequiredArgsConstructor;
-import org.apache.fineract.commands.domain.CommandWrapper;
-import org.apache.fineract.commands.service.CommandWrapperBuilder;
-import 
org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService;
-import org.apache.fineract.infrastructure.core.api.ApiRequestParameterHelper;
-import org.apache.fineract.infrastructure.core.data.CommandProcessingResult;
-import 
org.apache.fineract.infrastructure.core.serialization.ApiRequestJsonSerializationSettings;
-import 
org.apache.fineract.infrastructure.core.serialization.DefaultToApiJsonSerializer;
-import 
org.apache.fineract.infrastructure.security.service.PlatformSecurityContext;
+import org.apache.fineract.command.core.CommandPipeline;
+import 
org.apache.fineract.portfolio.interestratechart.command.InterestRateChartSlabsCreateCommand;
+import 
org.apache.fineract.portfolio.interestratechart.command.InterestRateChartSlabsDeleteCommand;
+import 
org.apache.fineract.portfolio.interestratechart.command.InterestRateChartSlabsUpdateCommand;
 import 
org.apache.fineract.portfolio.interestratechart.data.InterestRateChartSlabData;
-import 
org.apache.fineract.portfolio.interestratechart.data.InterestRateChartStabRequest;
-import 
org.apache.fineract.portfolio.interestratechart.service.InterestRateChartSlabReadPlatformService;
+import 
org.apache.fineract.portfolio.interestratechart.data.InterestRateChartSlabsCreateRequest;
+import 
org.apache.fineract.portfolio.interestratechart.data.InterestRateChartSlabsCreateResponse;
+import 
org.apache.fineract.portfolio.interestratechart.data.InterestRateChartSlabsDeleteRequest;
+import 
org.apache.fineract.portfolio.interestratechart.data.InterestRateChartSlabsDeleteResponse;
+import 
org.apache.fineract.portfolio.interestratechart.data.InterestRateChartSlabsUpdateRequest;
+import 
org.apache.fineract.portfolio.interestratechart.data.InterestRateChartSlabsUpdateResponse;
+import 
org.apache.fineract.portfolio.interestratechart.service.InterestRateChartSlabsReadService;
 import org.springframework.stereotype.Component;
 
 @Path("/v1/interestratecharts/{chartId}/chartslabs")
 @Component
+@Consumes({ MediaType.APPLICATION_JSON })
+@Produces({ MediaType.APPLICATION_JSON })
 @Tag(name = "Interest Rate Slab (A.K.A interest bands)", description = "The 
slabs a.k.a interest bands are associated with Interest Rate Chart. These bands 
allow to define different interest rates for different deposit term periods.")
 @RequiredArgsConstructor
 public class InterestRateChartSlabsApiResource {
 
-    private final InterestRateChartSlabReadPlatformService 
interestRateChartSlabReadPlatformService;
-    private final PlatformSecurityContext context;
-    private final DefaultToApiJsonSerializer<InterestRateChartSlabData> 
toApiJsonSerializer;
-    private final PortfolioCommandSourceWritePlatformService 
commandsSourceWritePlatformService;
-    private final ApiRequestParameterHelper apiRequestParameterHelper;
+    private final InterestRateChartSlabsReadService 
interestRateChartSlabsReadService;
+    private final CommandPipeline commandPipeline;
 
     @GET
     @Path("template")
-    @Consumes({ MediaType.APPLICATION_JSON })
-    @Produces({ MediaType.APPLICATION_JSON })
     public InterestRateChartSlabData template(@PathParam("chartId") 
@Parameter(description = "chartId") final Long chartId) {

Review Comment:
   Duplicate effort here, as mentioned before: only need the JAX-RS annotations 
here to describe the parameters. Swagger will infer the proper context. It's 
own annotations are only necessary if additional context/information is 
necessary.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to