adamsaghy commented on code in PR #4434:
URL: https://github.com/apache/fineract/pull/4434#discussion_r1987675468


##########
fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/api/ProvisioningEntriesApiResource.java:
##########
@@ -137,41 +113,51 @@ public String 
modifyProvisioningEntry(@PathParam("entryId") @Parameter(descripti
     @Produces({ MediaType.APPLICATION_JSON })
     @Operation(summary = "Retrieves a Provisioning Entry", description = 
"Returns the details of a generated Provisioning Entry.")
     @ApiResponse(responseCode = "200", description = "OK", content = 
@Content(schema = @Schema(implementation = ProvisioningEntryData.class)))
-    public String retrieveProvisioningEntry(@PathParam("entryId") 
@Parameter(description = "entryId") final Long entryId,
-            @Context final UriInfo uriInfo) {
+    public ProvisioningEntryData 
retrieveProvisioningEntry(@PathParam("entryId") @Parameter(description = 
"entryId") final Long entryId) {
         platformSecurityContext.authenticatedUser();
-        ProvisioningEntryData data = 
this.provisioningEntriesReadPlatformService.retrieveProvisioningEntryData(entryId);
-        final ApiRequestJsonSerializationSettings settings = 
this.apiRequestParameterHelper.process(uriInfo.getQueryParameters());
-        return this.toApiJsonSerializer.serialize(settings, data, 
PROVISIONING_ENTRY_PARAMETERS);
+        return 
provisioningEntriesReadPlatformService.retrieveProvisioningEntryData(entryId);
     }
 
     @GET
     @Path("entries")
     @Consumes({ MediaType.APPLICATION_JSON })
     @Produces({ MediaType.APPLICATION_JSON })
     @ApiResponse(responseCode = "200", description = "OK", content = 
@Content(schema = @Schema(implementation = 
LoanProductProvisioningEntryData.class)))
-    public String retrieveProviioningEntries(@QueryParam("entryId") final Long 
entryId, @QueryParam("offset") final Integer offset,
-            @QueryParam("limit") final Integer limit, @QueryParam("officeId") 
final Long officeId,
-            @QueryParam("productId") final Long productId, 
@QueryParam("categoryId") final Long categoryId,
-            @Context final UriInfo uriInfo) {
-        this.platformSecurityContext.authenticatedUser();
-        SearchParameters params = 
SearchParameters.builder().limit(limit).offset(offset).provisioningEntryId(entryId).officeId(officeId)
-                .productId(productId).categoryId(categoryId).build();
-        Page<LoanProductProvisioningEntryData> entries = 
this.provisioningEntriesReadPlatformService.retrieveProvisioningEntries(params);
-        final ApiRequestJsonSerializationSettings settings = 
this.apiRequestParameterHelper.process(uriInfo.getQueryParameters());
-        return this.entriesApiJsonSerializer.serialize(settings, entries, 
PROVISIONING_ENTRY_PARAMETERS);
+    public Page<LoanProductProvisioningEntryData> 
retrieveProviioningEntries(@QueryParam("entryId") final Long entryId,
+            @QueryParam("offset") final Integer offset, @QueryParam("limit") 
final Integer limit,
+            @QueryParam("officeId") final Long officeId, 
@QueryParam("productId") final Long productId,
+            @QueryParam("categoryId") final Long categoryId) {
+        platformSecurityContext.authenticatedUser();
+        final SearchParameters params = 
SearchParameters.builder().limit(limit).offset(offset).provisioningEntryId(entryId)
+                
.officeId(officeId).productId(productId).categoryId(categoryId).build();
+
+        return 
provisioningEntriesReadPlatformService.retrieveProvisioningEntries(params);
     }
 
     @GET
     @Consumes({ MediaType.APPLICATION_JSON })
     @Produces({ MediaType.APPLICATION_JSON })
     @Operation(summary = "List all Provisioning Entries")
     @ApiResponse(responseCode = "200", description = "OK", content = 
@Content(array = @ArraySchema(schema = @Schema(implementation = 
ProvisioningEntryData.class))))

Review Comment:
   You might wanna remove the swagger annotation here as it is not matching 
with the "real" response:
   `List<ProvisioningEntryData >` vs `Page<ProvisioningEntryData >`



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