Cocoa-Puffs commented on code in PR #4828:
URL: https://github.com/apache/fineract/pull/4828#discussion_r2210416990


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResource.java:
##########
@@ -872,6 +876,58 @@ public String createLoanDelinquencyAction(
         return createLoanDelinquencyAction(null, 
ExternalIdFactory.produce(loanExternalId), apiRequestBodyAsJson);
     }
 
+    @PUT
+    @Path("{loanId}/approved-amount")
+    @Consumes(MediaType.APPLICATION_JSON)
+    @Produces(MediaType.APPLICATION_JSON)
+    @Operation(summary = "Modifies the approved amount of the loan", 
description = "")
+    @RequestBody(required = true, content = @Content(schema = 
@Schema(implementation = 
LoansApiResourceSwagger.PutLoansApprovedAmountRequest.class)))
+    @ApiResponses({

Review Comment:
   If I return a `CommandProcessingResult` and remove the @ApiResponses 
annotation as well, then during the fineract client would deserialize the 
response from this endpoint into a `CommandProcessingResult` instance. I would 
rather keep the annotation on the PUT methods.



##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResource.java:
##########
@@ -872,6 +876,58 @@ public String createLoanDelinquencyAction(
         return createLoanDelinquencyAction(null, 
ExternalIdFactory.produce(loanExternalId), apiRequestBodyAsJson);
     }
 
+    @PUT
+    @Path("{loanId}/approved-amount")
+    @Consumes(MediaType.APPLICATION_JSON)
+    @Produces(MediaType.APPLICATION_JSON)
+    @Operation(summary = "Modifies the approved amount of the loan", 
description = "")
+    @RequestBody(required = true, content = @Content(schema = 
@Schema(implementation = 
LoansApiResourceSwagger.PutLoansApprovedAmountRequest.class)))
+    @ApiResponses({

Review Comment:
   If I return a `CommandProcessingResult` and remove the @ApiResponses 
annotation as well, then the fineract client would deserialize the response 
from this endpoint into a `CommandProcessingResult` instance. I would rather 
keep the annotation on the PUT methods.



-- 
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