From a5f1dc1227f4141803be87321e0788fda354fd67 Mon Sep 17 00:00:00 2001 From: Henrique Paes Date: Fri, 27 Sep 2024 09:57:05 -0400 Subject: [PATCH] FINERACT-1221 Fix Client SDK Broken Methods FINERACT-1221 Fix Client SDK Broken Methods --- .../fineract/client/test/FineractClientTechnicalTest.java | 4 +--- .../portfolio/delinquency/api/DelinquencyApiResource.java | 2 -- .../dataqueries/api/EntityDatatableChecksApiResource.java | 2 +- .../reportmailingjob/api/ReportMailingJobApiResource.java | 1 - .../fineract/portfolio/client/api/ClientsApiResource.java | 2 -- .../src/main/resources/static/legacy-docs/apiLive.htm | 6 ------ 6 files changed, 2 insertions(+), 15 deletions(-) diff --git a/fineract-client/src/test/java/org/apache/fineract/client/test/FineractClientTechnicalTest.java b/fineract-client/src/test/java/org/apache/fineract/client/test/FineractClientTechnicalTest.java index f45b3712f47..5e63c3a0e17 100644 --- a/fineract-client/src/test/java/org/apache/fineract/client/test/FineractClientTechnicalTest.java +++ b/fineract-client/src/test/java/org/apache/fineract/client/test/FineractClientTechnicalTest.java @@ -22,7 +22,6 @@ import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import org.apache.fineract.client.util.FineractClient; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; /** @@ -34,10 +33,9 @@ public class FineractClientTechnicalTest { @Test - @Disabled("remove Ignore once https://issues.apache.org/jira/browse/FINERACT-1221 is fixed") void testInvalidOperations() { FineractClient.Builder builder = FineractClient.builder().baseURL("http://test/").tenant("default").basicAuth("mifos", "password"); - builder.getRetrofitBuilder().validateEagerly(true); // see FINERACT-1221 + builder.getRetrofitBuilder().validateEagerly(true); builder.build(); } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/api/DelinquencyApiResource.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/api/DelinquencyApiResource.java index eb62b1bba3b..ba5da5ca643 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/api/DelinquencyApiResource.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/api/DelinquencyApiResource.java @@ -136,7 +136,6 @@ public String updateDelinquencyRange( @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Update Delinquency Range based on the Id", description = "") - @RequestBody(required = true, content = @Content(schema = @Schema(implementation = DelinquencyApiResourceSwagger.PostDelinquencyRangeRequest.class))) @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = DelinquencyApiResourceSwagger.DeleteDelinquencyRangeResponse.class))) }) public String deleteDelinquencyRange( @@ -219,7 +218,6 @@ public String updateDelinquencyBucket( @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Delete Delinquency Bucket based on the Id", description = "") - @RequestBody(required = true, content = @Content(schema = @Schema(implementation = DelinquencyApiResourceSwagger.PostDelinquencyBucketRequest.class))) @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = DelinquencyApiResourceSwagger.DeleteDelinquencyBucketResponse.class))) }) public String deleteDelinquencyBucket( diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/EntityDatatableChecksApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/EntityDatatableChecksApiResource.java index 649a94d5a93..a51bad1dbe9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/EntityDatatableChecksApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/EntityDatatableChecksApiResource.java @@ -125,7 +125,7 @@ public String createEntityDatatableCheck(@Parameter(hidden = true) final String @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = EntityDatatableChecksApiResourceSwagger.DeleteEntityDatatableChecksTemplateResponse.class))) }) public String deleteDatatable( @PathParam("entityDatatableCheckId") @Parameter(description = "entityDatatableCheckId") final long entityDatatableCheckId, - final String apiRequestBodyAsJson) { + @Parameter(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() .deleteEntityDatatableChecks(entityDatatableCheckId, apiRequestBodyAsJson).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/api/ReportMailingJobApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/api/ReportMailingJobApiResource.java index 3f183e2b16e..69da0e6fdf7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/api/ReportMailingJobApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/api/ReportMailingJobApiResource.java @@ -111,7 +111,6 @@ public String updateReportMailingJob(@PathParam("entityId") @Parameter(descripti @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Delete a Report Mailing Job", description = "") - @RequestBody(required = true, content = @Content(schema = @Schema(implementation = ReportMailingJobApiResourceSwagger.DeleteReportMailingJobsRequest.class))) @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ReportMailingJobApiResourceSwagger.DeleteReportMailingJobsResponse.class))) }) public String deleteReportMailingJob(@PathParam("entityId") @Parameter(description = "entityId") final Long entityId, diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientsApiResource.java index a16416f6efb..dab2cffbc9b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientsApiResource.java @@ -213,7 +213,6 @@ public String update(@Parameter(description = "clientId") @PathParam("clientId") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Delete a Client", description = "If a client is in Pending state, you are allowed to Delete it. The delete is a 'hard delete' and cannot be recovered from. Once clients become active or have loans or savings associated with them, you cannot delete the client but you may Close the client if they have left the program.") - @RequestBody(required = true, content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.DeleteClientsClientIdRequest.class))) @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.DeleteClientsClientIdResponse.class))) }) public String delete(@PathParam("clientId") @Parameter(description = "clientId") final Long clientId) { @@ -412,7 +411,6 @@ public String applyCommand(@PathParam("externalId") @Parameter(description = "ex @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Delete a Client", description = "If a client is in Pending state, you are allowed to Delete it. The delete is a 'hard delete' and cannot be recovered from. Once clients become active or have loans or savings associated with them, you cannot delete the client but you may Close the client if they have left the program.") - @RequestBody(required = true, content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.DeleteClientsClientIdRequest.class))) @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.DeleteClientsClientIdResponse.class))) }) public String delete(@PathParam("externalId") @Parameter(description = "externalId") final String externalId) { diff --git a/fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm b/fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm index ae475f2e808..a63beadd1f6 100644 --- a/fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm +++ b/fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm @@ -6489,9 +6489,6 @@

Delete a Client

DELETE clients/3 Content-Type: application/json -Request Body: -{ -} { @@ -38958,9 +38955,6 @@

Delete a Report Mailing Job

DELETE reportmailingjobs/1 Content-Type: application/json -Request Body: -{ -} {