fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ptuom...@apache.org
Subject [fineract] branch develop updated: Fix Swagger UI
Date Sat, 15 Aug 2020 02:04:36 GMT
This is an automated email from the ASF dual-hosted git repository.

ptuomola pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git


The following commit(s) were added to refs/heads/develop by this push:
     new 92c6b38  Fix Swagger UI
92c6b38 is described below

commit 92c6b380897ab0b7266b90e23c2a731bc0003df6
Author: Petri Tuomola <petri@tuomola.org>
AuthorDate: Fri Aug 14 10:55:47 2020 +0300

    Fix Swagger UI
---
 .../accounting/accrual/api/AccrualAccountingApiResource.java         | 5 +++--
 .../accounting/journalentry/api/JournalEntriesApiResource.java       | 3 +--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/accrual/api/AccrualAccountingApiResource.java
b/fineract-provider/src/main/java/org/apache/fineract/accounting/accrual/api/AccrualAccountingApiResource.java
index 906a59f..36fed53 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/accounting/accrual/api/AccrualAccountingApiResource.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/accrual/api/AccrualAccountingApiResource.java
@@ -20,7 +20,9 @@ package org.apache.fineract.accounting.accrual.api;
 
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.media.Content;
 import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.parameters.RequestBody;
 import io.swagger.v3.oas.annotations.responses.ApiResponse;
 import io.swagger.v3.oas.annotations.responses.ApiResponses;
 import io.swagger.v3.oas.annotations.tags.Tag;
@@ -59,8 +61,7 @@ public class AccrualAccountingApiResource {
     @Consumes({ MediaType.APPLICATION_JSON })
     @Produces({ MediaType.APPLICATION_JSON })
     @Operation(summary = "Executes Periodic Accrual Accounting", method = "POST", description
= "Mandatory Fields\n" + "\n" + "tillDate\n")
-    @Parameter(required = true, schema = @Schema(implementation = AccrualAccountingApiResourceSwagger.PostRunaccrualsRequest.class,
description = "Request Body\n"
-            + "\n" + "Field Descriptions: \n" + "tillDate: \n" + "which specifies periodic
accruals should happen till the given Date"))
+    @RequestBody(required = true, content = @Content(schema = @Schema(implementation = AccrualAccountingApiResourceSwagger.PostRunaccrualsRequest.class)))
     @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK") })
     public String executePeriodicAccrualAccounting(@Parameter(hidden = true) final String
jsonRequestBody) {
 
diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/api/JournalEntriesApiResource.java
b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/api/JournalEntriesApiResource.java
index dd6e84d..4b79071 100644
--- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/api/JournalEntriesApiResource.java
+++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/api/JournalEntriesApiResource.java
@@ -22,7 +22,6 @@ import com.sun.jersey.core.header.FormDataContentDisposition;
 import com.sun.jersey.multipart.FormDataParam;
 import io.swagger.v3.oas.annotations.Operation;
 import io.swagger.v3.oas.annotations.Parameter;
-import io.swagger.v3.oas.annotations.Parameters;
 import io.swagger.v3.oas.annotations.media.ArraySchema;
 import io.swagger.v3.oas.annotations.media.Content;
 import io.swagger.v3.oas.annotations.media.Schema;
@@ -194,7 +193,7 @@ public class JournalEntriesApiResource {
             + "\n" + "Mandatory Fields\n" + "officeId, transactionDate\n\n" + "\ncredits-
glAccountId, amount, comments\n\n "
             + "\ndebits-  glAccountId, amount, comments\n\n " + "\n" + "Optional Fields\n"
             + "paymentTypeId, accountNumber, checkNumber, routingCode, receiptNumber, bankNumber")
-    @Parameters({ @Parameter(content = @Content(schema = @Schema(implementation = JournalEntryCommand.class)))
})
+    @RequestBody(content = @Content(schema = @Schema(implementation = JournalEntryCommand.class)))
     @ApiResponses({
             @ApiResponse(responseCode = "200", description = "", content = @Content(schema
= @Schema(implementation = JournalEntriesApiResourceSwagger.PostJournalEntriesResponse.class)))
})
     public String createGLJournalEntry(@Parameter(hidden = true) final String jsonRequestBody,


Mime
View raw message