From e70e8e9367819cc6442081e6ee2055c6d46402c1 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sat, 22 Aug 2020 04:09:34 +0000 Subject: [PATCH 1/9] Update dependency com.diffplug.spotless:spotless-plugin-gradle to v5.1.2 --- fineract-provider/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fineract-provider/build.gradle b/fineract-provider/build.gradle index a19cdab21..bf7cfd5ea 100644 --- a/fineract-provider/build.gradle +++ b/fineract-provider/build.gradle @@ -54,7 +54,7 @@ buildscript { classpath "gradle.plugin.com.github.andygoossens:gradle-modernizer-plugin:1.3.0" classpath "gradle.plugin.com.gorylenko.gradle-git-properties:gradle-git-properties:2.2.3" classpath "net.ltgt.gradle:gradle-errorprone-plugin:1.2.1" - classpath "com.diffplug.spotless:spotless-plugin-gradle:5.1.1" + classpath "com.diffplug.spotless:spotless-plugin-gradle:5.1.2" classpath "io.swagger.core.v3:swagger-gradle-plugin:2.1.4" classpath "gradle.plugin.org.hidetake:gradle-swagger-generator-plugin:2.18.2" } From b98b7893ebefb99dc947b12e45b92a9ca32a693d Mon Sep 17 00:00:00 2001 From: Petri Tuomola Date: Fri, 21 Aug 2020 07:19:57 +0300 Subject: [PATCH 2/9] Add generated files to gitignore --- .gitignore | 2 ++ .travis.yml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index eceda15ac..f84a22d9f 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,5 @@ bin/ fineract-provider/src/main/resources/application.properties .lock fineract-provider/out/ +fineract-provider/config/swagger/config.json +fineract-provider/config/swagger/fineract-input.yaml diff --git a/.travis.yml b/.travis.yml index 892274d2f..cd3a90100 100644 --- a/.travis.yml +++ b/.travis.yml @@ -74,6 +74,6 @@ script: # and Docker test does not run if integration test fails, which makes PR failure easier to understand. # @see https://docs.travis-ci.com/user/job-lifecycle/#customizing-the-build-phase # NOTE: Sleep after docker-compose increased to 60 seconds as often Travis would fail to get Docker up in 30 seconds - - ./gradlew --console=plain -PautomatedBuild=true -q licenseMain licenseTest licenseIntegrationTest check && ./gradlew --console=plain -PautomatedBuild=true integrationTest --fail-fast && sudo service mysql stop && docker-compose build && docker-compose up -d && sleep 60s && http --verify=no --timeout 240 --check-status get https://localhost:8443/fineract-provider/actuator/health && (( $(http --verify=no --timeout 30 --check-status --body get https://localhost:8443/fineract-provider/actuator/info | wc --chars) > 100 )) && ./gradlew generateSwaggerCode && cd build/swagger-code-fineract && mvn test + - ./gradlew --console=plain -PautomatedBuild=true licenseMain licenseTest licenseIntegrationTest check && ./gradlew --console=plain -PautomatedBuild=true integrationTest --fail-fast && sudo service mysql stop && docker-compose build && docker-compose up -d && sleep 60s && http --verify=no --timeout 240 --check-status get https://localhost:8443/fineract-provider/actuator/health && (( $(http --verify=no --timeout 30 --check-status --body get https://localhost:8443/fineract-provider/actuator/info | wc --chars) > 100 )) && ./gradlew generateSwaggerCode && cd build/swagger-code-fineract && mvn test # We stop the mysql system service when running the Docker test to avoid port 3306 conflicts (unless we run the mysql in docker-compose on another port; req. FINERACT-773) # The fany /actuator/info test makes sure that has more than 100 characters of JSON to test that the git.properties worked (see FINERACT-983) From 3f0b2ae8c40fb021e9d3e9e28085035c73e76b09 Mon Sep 17 00:00:00 2001 From: Grandolf49 Date: Sat, 22 Aug 2020 22:47:35 +0530 Subject: [PATCH 3/9] FINERACT-1105 Valid Spec File generated FINERACT-1105 Added description to response 200 FINERACT-1105 Valid Spec File generated FINERACT-1105 Valid Open API Spec File generated FINERACT-1105 Added description to response 200 FINERACT-1105 Valid Spec File generated --- .../closure/api/GLClosuresApiResource.java | 10 +++---- .../FinancialActivityAccountsApiResource.java | 8 ++--- .../glaccount/api/GLAccountsApiResource.java | 12 ++++---- .../api/JournalEntriesApiResource.java | 8 ++--- .../api/ProvisioningEntriesApiResource.java | 10 +++---- .../rule/api/AccountingRuleApiResource.java | 12 ++++---- .../commands/api/AuditsApiResource.java | 6 ++-- .../api/MakercheckersApiResource.java | 8 ++--- .../api/AccountNumberFormatsApiResource.java | 12 ++++---- .../cache/api/CacheApiResource.java | 4 +-- .../sms/api/SmsCampaignApiResource.java | 14 ++++----- .../codes/api/CodeValuesApiResource.java | 13 ++++---- .../codes/api/CodesApiResource.java | 10 +++---- ...ernalServicesConfigurationApiResource.java | 4 +-- .../api/GlobalConfigurationApiResource.java | 4 +-- .../api/DatatablesApiResource.java | 26 ++++++++-------- .../api/EntityDatatableChecksApiResource.java | 8 ++--- .../dataqueries/api/ReportsApiResource.java | 12 ++++---- .../api/RunreportsApiResource.java | 2 +- .../api/DocumentManagementApiResource.java | 6 ++-- .../hooks/api/HookApiResource.java | 12 ++++---- .../jobs/api/SchedulerApiResource.java | 2 +- .../jobs/api/SchedulerJobApiResource.java | 8 ++--- .../api/ReportMailingJobApiResource.java | 12 ++++---- ...ReportMailingJobRunHistoryApiResource.java | 2 +- .../api/AuthenticationApiResource.java | 2 +- .../security/api/UserDetailsApiResource.java | 2 +- .../survey/api/LikelihoodApiResource.java | 5 ++-- .../survey/api/SurveyApiResource.java | 6 ++-- .../holiday/api/HolidaysApiResource.java | 12 ++++---- .../monetary/api/CurrenciesApiResource.java | 4 +-- .../office/api/OfficesApiResource.java | 10 +++---- .../api/ProvisioningCriteriaApiResource.java | 10 +++---- .../staff/api/StaffApiResource.java | 8 ++--- .../teller/api/TellerApiResource.java | 30 +++++++++---------- .../api/WorkingDaysApiResource.java | 6 ++-- .../accounts/api/AccountsApiResource.java | 6 ++-- .../calendar/api/CalendarsApiResource.java | 3 +- .../client/api/ClientChargesApiResource.java | 7 +++-- .../api/ClientFamilyMembersApiResources.java | 10 +++++-- .../api/ClientIdentifiersApiResource.java | 3 +- .../api/CollateralsApiResource.java | 3 +- .../InterestRateChartSlabsApiResource.java | 2 +- .../guarantor/api/GuarantorsApiResource.java | 7 +++-- .../search/api/SearchApiResource.java | 6 ++-- .../api/ShareDividendApiResource.java | 3 +- .../spm/api/LookupTableApiResource.java | 4 +-- .../spm/api/ScorecardApiResource.java | 2 +- .../fineract/spm/api/SpmApiResource.java | 4 +-- .../template/api/TemplatesApiResource.java | 12 ++++---- .../api/PasswordPreferencesApiResource.java | 6 ++-- .../api/PermissionsApiResource.java | 4 +-- .../api/RolesApiResource.java | 16 +++++----- .../api/UsersApiResource.java | 12 ++++---- 54 files changed, 222 insertions(+), 208 deletions(-) diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/closure/api/GLClosuresApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/closure/api/GLClosuresApiResource.java index 3d13cb441..df3fea82a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/closure/api/GLClosuresApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/closure/api/GLClosuresApiResource.java @@ -99,7 +99,7 @@ public class GLClosuresApiResource { @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "List Accounting closures", description = "Example Requests:\n" + "\n" + "glclosures") @ApiResponses({ - @ApiResponse(responseCode = "200", content = @Content(array = @ArraySchema(schema = @Schema(implementation = GLClosuresApiResourceSwagger.GetGlClosureResponse.class, description = "")))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = GLClosuresApiResourceSwagger.GetGlClosureResponse.class)))) }) public String retrieveAllClosures(@Context final UriInfo uriInfo, @QueryParam("officeId") @Parameter(name = "officeId") final Long officeId) { @@ -117,7 +117,7 @@ public class GLClosuresApiResource { @Operation(summary = "Retrieve an Accounting Closure", description = "Example Requests:\n" + "\n" + "glclosures/1\n" + "\n" + "\n" + "/glclosures/1?fields=officeName,closingDate") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = GLClosuresApiResourceSwagger.GetGlClosureResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = GLClosuresApiResourceSwagger.GetGlClosureResponse.class))) }) public String retreiveClosure(@PathParam("glClosureId") @Parameter(description = "glClosureId") final Long glClosureId, @Context final UriInfo uriInfo) { @@ -140,7 +140,7 @@ public class GLClosuresApiResource { @Operation(summary = "Create an Accounting Closure", description = "Mandatory Fields\n" + "officeId,closingDate") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = GLClosuresApiResourceSwagger.PostGlClosuresRequest.class, description = "Request Body"))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = GLClosuresApiResourceSwagger.PostGlClosuresResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = GLClosuresApiResourceSwagger.PostGlClosuresResponse.class))) }) public String createGLClosure(@Parameter(hidden = true) final String jsonRequestBody) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createGLClosure().withJson(jsonRequestBody).build(); @@ -157,7 +157,7 @@ public class GLClosuresApiResource { @Operation(summary = "Update an Accounting closure", description = "Once an accounting closure is created, only the comments associated with it may be edited") @RequestBody(content = @Content(schema = @Schema(implementation = GLClosuresApiResourceSwagger.PutGlClosuresRequest.class, required = true))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = GLClosuresApiResourceSwagger.PutGlClosuresResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = GLClosuresApiResourceSwagger.PutGlClosuresResponse.class))) }) public String updateGLClosure(@PathParam("glClosureId") @Parameter(description = "glClosureId") final Long glClosureId, @Parameter(hidden = true) final String jsonRequestBody) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateGLClosure(glClosureId).withJson(jsonRequestBody).build(); @@ -173,7 +173,7 @@ public class GLClosuresApiResource { @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Delete an accounting closure", description = "Note: Only the latest accounting closure associated with a branch may be deleted.") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = GLClosuresApiResourceSwagger.DeleteGlClosuresResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = GLClosuresApiResourceSwagger.DeleteGlClosuresResponse.class))) }) public String deleteGLClosure(@PathParam("glClosureId") @Parameter(description = "glclosureId") final Long glClosureId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteGLClosure(glClosureId).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/financialactivityaccount/api/FinancialActivityAccountsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/financialactivityaccount/api/FinancialActivityAccountsApiResource.java index 5aa7cd6ea..d5d66adc2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/financialactivityaccount/api/FinancialActivityAccountsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/financialactivityaccount/api/FinancialActivityAccountsApiResource.java @@ -102,7 +102,7 @@ public class FinancialActivityAccountsApiResource { @Operation(summary = "List Financial Activities to Accounts Mappings", description = "Example Requests:\n" + "\n" + "financialactivityaccounts") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(array = @ArraySchema(schema = @Schema(implementation = FinancialActivityAccountsApiResourceSwagger.GetFinancialActivityAccountsResponse.class)))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = FinancialActivityAccountsApiResourceSwagger.GetFinancialActivityAccountsResponse.class)))) }) public String retrieveAll(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(FinancialActivityAccountsConstants.resourceNameForPermission); @@ -120,7 +120,7 @@ public class FinancialActivityAccountsApiResource { @Operation(summary = "Retrieve a Financial Activity to Account Mapping\n", description = "Example Requests:\n" + "\n" + "financialactivityaccounts/1") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = FinancialActivityAccountsApiResourceSwagger.GetFinancialActivityAccountsResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = FinancialActivityAccountsApiResourceSwagger.GetFinancialActivityAccountsResponse.class))) }) public String retreive(@PathParam("mappingId") @Parameter(description = "mappingId") final Long mappingId, @Context final UriInfo uriInfo) { @@ -144,7 +144,7 @@ public class FinancialActivityAccountsApiResource { + "financialActivityId, glAccountId") @RequestBody(content = @Content(schema = @Schema(implementation = FinancialActivityAccountsApiResourceSwagger.PostFinancialActivityAccountsRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = FinancialActivityAccountsApiResourceSwagger.PostFinancialActivityAccountsResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = FinancialActivityAccountsApiResourceSwagger.PostFinancialActivityAccountsResponse.class))) }) public String createGLAccount(@Parameter(hidden = true) final String jsonRequestBody) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createOfficeToGLAccountMapping().withJson(jsonRequestBody) @@ -162,7 +162,7 @@ public class FinancialActivityAccountsApiResource { @Operation(summary = "Update a Financial Activity to Account Mapping", description = "the API updates the Ledger account linked to a Financial Activity \n") @RequestBody(content = @Content(schema = @Schema(implementation = FinancialActivityAccountsApiResourceSwagger.PostFinancialActivityAccountsRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = FinancialActivityAccountsApiResourceSwagger.PutFinancialActivityAccountsResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = FinancialActivityAccountsApiResourceSwagger.PutFinancialActivityAccountsResponse.class))) }) public String updateGLAccount(@PathParam("mappingId") @Parameter(description = "mappingId") final Long mappingId, @Parameter(hidden = true) final String jsonRequestBody) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/api/GLAccountsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/api/GLAccountsApiResource.java index 00504471a..17e935416 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/api/GLAccountsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/glaccount/api/GLAccountsApiResource.java @@ -125,7 +125,7 @@ public class GLAccountsApiResource { + "glaccounts/template?type=1\n" + "\n" + "type is optional and integer value from 1 to 5.\n" + "\n" + "1.Assets \n" + "2.Liabilities \n" + "3.Equity \n" + "4.Income \n" + "5.Expenses") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = GLAccountsApiResourceSwagger.GetGLAccountsTemplateResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = GLAccountsApiResourceSwagger.GetGLAccountsTemplateResponse.class))) }) public String retrieveNewAccountDetails(@Context final UriInfo uriInfo, @QueryParam("type") @Parameter(description = "type") final Integer type) { @@ -146,7 +146,7 @@ public class GLAccountsApiResource { + "Example Requests:\n" + "\n" + "glaccounts\n" + "\n" + "\n" + "glaccounts?type=1&manualEntriesAllowed=true&usage=1&disabled=false\n" + "\n" + "glaccounts?fetchRunningBalance=true") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(array = @ArraySchema(schema = @Schema(implementation = GLAccountsApiResourceSwagger.GetGLAccountsResponse.class)))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = GLAccountsApiResourceSwagger.GetGLAccountsResponse.class)))) }) public String retrieveAllAccounts(@Context final UriInfo uriInfo, @QueryParam("type") @Parameter(description = "type") final Integer type, @QueryParam("searchParam") @Parameter(description = "searchParam") final String searchParam, @@ -172,7 +172,7 @@ public class GLAccountsApiResource { + "\n" + "glaccounts/1\n" + "\n" + "\n" + "glaccounts/1?template=true\n" + "\n" + "\n" + "glaccounts/1?fields=name,glCode\n" + "\n" + "\n" + "glaccounts/1?fetchRunningBalance=true") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = GLAccountsApiResourceSwagger.GetGLAccountsResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = GLAccountsApiResourceSwagger.GetGLAccountsResponse.class))) }) public String retreiveAccount(@PathParam("glAccountId") @Parameter(description = "glAccountId") final Long glAccountId, @Context final UriInfo uriInfo, @QueryParam("fetchRunningBalance") @Parameter(description = "fetchRunningBalance") final boolean runningBalance) { @@ -197,7 +197,7 @@ public class GLAccountsApiResource { + "Mandatory Fields: \n" + "name, glCode, type, usage and manualEntriesAllowed") @RequestBody(content = @Content(schema = @Schema(implementation = GLAccountsApiResourceSwagger.PostGLAccountsRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = GLAccountsApiResourceSwagger.PostGLAccountsResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = GLAccountsApiResourceSwagger.PostGLAccountsResponse.class))) }) public String createGLAccount(@Parameter(hidden = true) final String jsonRequestBody) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createGLAccount().withJson(jsonRequestBody).build(); @@ -216,7 +216,7 @@ public class GLAccountsApiResource { + "\n") @RequestBody(content = @Content(schema = @Schema(implementation = GLAccountsApiResourceSwagger.PutGLAccountsRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = GLAccountsApiResourceSwagger.PutGLAccountsResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = GLAccountsApiResourceSwagger.PutGLAccountsResponse.class))) }) public String updateGLAccount(@PathParam("glAccountId") @Parameter(description = "glAccountId") final Long glAccountId, @Parameter(hidden = true) final String jsonRequestBody) { @@ -234,7 +234,7 @@ public class GLAccountsApiResource { @Operation(tags = { "General Ledger Account" }, summary = "Delete an accounting closure", description = "Note: Only the latest accounting closure associated with a branch may be deleted.") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = GLAccountsApiResourceSwagger.DeleteGLAccountsRequest.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = GLAccountsApiResourceSwagger.DeleteGLAccountsRequest.class))) }) public String deleteGLAccount(@PathParam("glAccountId") @Parameter(description = "glAccountId") final Long glAccountId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteGLAccount(glAccountId).build(); 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 4b790715f..92cf160dc 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 @@ -118,7 +118,7 @@ public class JournalEntriesApiResource { + "\n" + "journalentries?orderBy=transactionId&sortOrder=DESC\n" + "\n" + "journalentries?runningBalance=true\n" + "\n" + "journalentries?transactionDetails=true\n" + "\n" + "journalentries?loanId=12\n" + "\n" + "journalentries?savingsId=24") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(array = @ArraySchema(schema = @Schema(implementation = JournalEntryData.class)))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = JournalEntryData.class)))) }) public String retrieveAll(@Context final UriInfo uriInfo, @QueryParam("officeId") @Parameter(description = "officeId") final Long officeId, @QueryParam("glAccountId") @Parameter(description = "glAccountId") final Long glAccountId, @@ -168,7 +168,7 @@ public class JournalEntriesApiResource { + "journalentries/1?fields=officeName,glAccountId,entryType,amount\n" + "\n" + "journalentries/1?runningBalance=true\n" + "\n" + "journalentries/1?transactionDetails=true") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = JournalEntryData.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = JournalEntryData.class))) }) public String retreiveJournalEntryById( @PathParam("journalEntryId") @Parameter(description = "journalEntryId") final Long journalEntryId, @Context final UriInfo uriInfo, @@ -195,7 +195,7 @@ public class JournalEntriesApiResource { + "paymentTypeId, accountNumber, checkNumber, routingCode, receiptNumber, bankNumber") @RequestBody(content = @Content(schema = @Schema(implementation = JournalEntryCommand.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = JournalEntriesApiResourceSwagger.PostJournalEntriesResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = JournalEntriesApiResourceSwagger.PostJournalEntriesResponse.class))) }) public String createGLJournalEntry(@Parameter(hidden = true) final String jsonRequestBody, @QueryParam("command") @Parameter(description = "command") final String commandParam) { @@ -223,7 +223,7 @@ public class JournalEntriesApiResource { + "Mandatory Fields\n" + "officeId") @RequestBody(content = @Content(schema = @Schema(implementation = JournalEntriesApiResourceSwagger.PostJournalEntriesTransactionIdRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = JournalEntriesApiResourceSwagger.PostJournalEntriesTransactionIdResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = JournalEntriesApiResourceSwagger.PostJournalEntriesTransactionIdResponse.class))) }) public String createReversalJournalEntry(@Parameter(hidden = true) final String jsonRequestBody, @PathParam("transactionId") @Parameter(description = "transactionId") final String transactionId, @QueryParam("command") @Parameter(description = "command") final String commandParam) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/api/ProvisioningEntriesApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/api/ProvisioningEntriesApiResource.java index 3ee7f4734..ec0f229f0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/api/ProvisioningEntriesApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/api/ProvisioningEntriesApiResource.java @@ -99,7 +99,7 @@ public class ProvisioningEntriesApiResource { + "Mandatory Fields\n" + "date\n" + "dateFormat\n" + "locale\n" + "Optional Fields\n" + "createjournalentries") @RequestBody(content = @Content(schema = @Schema(implementation = ProvisioningEntriesApiResourceSwagger.PostProvisioningEntriesRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = ProvisioningEntriesApiResourceSwagger.PostProvisioningEntriesResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ProvisioningEntriesApiResourceSwagger.PostProvisioningEntriesResponse.class))) }) public String createProvisioningEntries(@Parameter(hidden = true) final String apiRequestBodyAsJson) { CommandWrapper commandWrapper = null; this.platformSecurityContext.authenticatedUser(); @@ -115,7 +115,7 @@ public class ProvisioningEntriesApiResource { @Operation(summary = "Recreates Provisioning Entry", description = "Recreates Provisioning Entry | createjournalentry.") @RequestBody(content = @Content(schema = @Schema(implementation = ProvisioningEntriesApiResourceSwagger.PutProvisioningEntriesRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = ProvisioningEntriesApiResourceSwagger.PutProvisioningEntriesResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ProvisioningEntriesApiResourceSwagger.PutProvisioningEntriesResponse.class))) }) public String modifyProvisioningEntry(@PathParam("entryId") @Parameter(description = "entryId") final Long entryId, @QueryParam("command") @Parameter(description = "command=createjournalentry\ncommand=recreateprovisioningentry") final String commandParam, @Parameter(hidden = true) final String apiRequestBodyAsJson) { @@ -141,7 +141,7 @@ public class ProvisioningEntriesApiResource { @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Retrieves a Provisioning Entry", description = "Returns the details of a generated Provisioning Entry.") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = ProvisioningEntryData.class))) }) + @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) { platformSecurityContext.authenticatedUser(); @@ -155,7 +155,7 @@ public class ProvisioningEntriesApiResource { @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = LoanProductProvisioningEntryData.class))) }) + @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, @@ -172,7 +172,7 @@ public class ProvisioningEntriesApiResource { @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "List all Provisioning Entries") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(array = @ArraySchema(schema = @Schema(implementation = ProvisioningEntryData.class)))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = ProvisioningEntryData.class)))) }) public String retrieveAllProvisioningEntries(@QueryParam("offset") @Parameter(description = "offset") final Integer offset, @QueryParam("limit") @Parameter(description = "limit") final Integer limit, @Context final UriInfo uriInfo) { platformSecurityContext.authenticatedUser(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/rule/api/AccountingRuleApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/rule/api/AccountingRuleApiResource.java index 23424b4c9..027dde635 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/rule/api/AccountingRuleApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/rule/api/AccountingRuleApiResource.java @@ -122,7 +122,7 @@ public class AccountingRuleApiResource { @Operation(summary = "Retrieve Accounting Rule Details Template", description = "This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n" + "\n" + "Field Defaults\n" + "Allowed Value Lists\n" + "Example Request:\n" + "\n" + "accountingrules/template") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = AccountingRuleApiResourceSwagger.GetAccountRulesTemplateResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = AccountingRuleApiResourceSwagger.GetAccountRulesTemplateResponse.class))) }) public String retrieveTemplate(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermission); @@ -140,7 +140,7 @@ public class AccountingRuleApiResource { @Operation(summary = "Retrieve Accounting Rules", description = "Returns the list of defined accounting rules.\n" + "\n" + "Example Requests:\n" + "\n" + "accountingrules") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(array = @ArraySchema(schema = @Schema(implementation = AccountingRuleApiResourceSwagger.GetAccountRulesResponse.class)))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = AccountingRuleApiResourceSwagger.GetAccountRulesResponse.class)))) }) public String retrieveAllAccountingRules(@Context final UriInfo uriInfo) { final AppUser currentUser = this.context.authenticatedUser(); @@ -172,7 +172,7 @@ public class AccountingRuleApiResource { @Operation(summary = "Retrieve a Accounting rule", description = "Returns the details of a defined Accounting rule.\n" + "\n" + "Example Requests:\n" + "\n" + "accountingrules/1") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = AccountingRuleData.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = AccountingRuleData.class))) }) public String retreiveAccountingRule( @PathParam("accountingRuleId") @Parameter(description = "accountingRuleId") final Long accountingRuleId, @Context final UriInfo uriInfo) { @@ -196,7 +196,7 @@ public class AccountingRuleApiResource { + "description") @RequestBody(content = @Content(schema = @Schema(implementation = AccountingRuleApiResourceSwagger.PostAccountingRulesRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = AccountingRuleApiResourceSwagger.PostAccountingRulesResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = AccountingRuleApiResourceSwagger.PostAccountingRulesResponse.class))) }) public String createAccountingRule(@Parameter(hidden = true) final String jsonRequestBody) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createAccountingRule().withJson(jsonRequestBody).build(); @@ -213,7 +213,7 @@ public class AccountingRuleApiResource { @Operation(summary = "Update a Accounting Rule", description = "Updates the details of a Accounting rule.") @RequestBody(content = @Content(schema = @Schema(implementation = AccountingRuleApiResourceSwagger.PutAccountingRulesRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = AccountingRuleApiResourceSwagger.PutAccountingRulesResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = AccountingRuleApiResourceSwagger.PutAccountingRulesResponse.class))) }) public String updateAccountingRule( @PathParam("accountingRuleId") @Parameter(description = "accountingRuleId") final Long accountingRuleId, @Parameter(hidden = true) final String jsonRequestBody) { @@ -231,7 +231,7 @@ public class AccountingRuleApiResource { @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Delete a Accounting Rule", description = "Deletes a Accounting rule.") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = AccountingRuleApiResourceSwagger.DeleteAccountingRulesResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = AccountingRuleApiResourceSwagger.DeleteAccountingRulesResponse.class))) }) public String deleteAccountingRule( @PathParam("accountingRuleId") @Parameter(description = "accountingRuleId") final Long accountingRuleId) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/commands/api/AuditsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/commands/api/AuditsApiResource.java index bf1d89ca4..a0d7170ba 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/commands/api/AuditsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/commands/api/AuditsApiResource.java @@ -94,7 +94,7 @@ public class AuditsApiResource { + "audits?makerDateTimeFrom=2013-03-25 08:00:00&makerDateTimeTo=2013-04-04 18:00:00\n" + "\n" + "audits?officeId=1\n" + "\n" + "audits?officeId=1&includeJson=true") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(array = @ArraySchema(schema = @Schema(implementation = MakercheckersApiResourceSwagger.GetMakerCheckerResponse.class)))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = MakercheckersApiResourceSwagger.GetMakerCheckerResponse.class)))) }) public String retrieveAuditEntries(@Context final UriInfo uriInfo, @QueryParam("actionName") @Parameter(description = "actionName") final String actionName, @QueryParam("entityName") @Parameter(description = "entityName") final String entityName, @@ -143,7 +143,7 @@ public class AuditsApiResource { @Operation(summary = "Retrieve an Audit Entry", description = "Example Requests:\n" + "\n" + "audits/20\n" + "audits/20?fields=madeOnDate,maker,processingResult") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = MakercheckersApiResourceSwagger.GetMakerCheckerResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = MakercheckersApiResourceSwagger.GetMakerCheckerResponse.class))) }) public String retrieveAuditEntry(@PathParam("auditId") @Parameter(description = "auditId") final Long auditId, @Context final UriInfo uriInfo) { @@ -162,7 +162,7 @@ public class AuditsApiResource { @Operation(summary = "Audit Search Template", description = "This is a convenience resource. It can be useful when building an Audit Search UI. \"appUsers\" are data scoped to the office/branch the requestor is associated with.\n" + "\n" + "Example Requests:\n" + "\n" + "audits/searchtemplate\n" + "audits/searchtemplate?fields=actionNames") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = MakercheckersApiResourceSwagger.GetMakerCheckersSearchTemplateResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = MakercheckersApiResourceSwagger.GetMakerCheckersSearchTemplateResponse.class))) }) public String retrieveAuditSearchTemplate(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); diff --git a/fineract-provider/src/main/java/org/apache/fineract/commands/api/MakercheckersApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/commands/api/MakercheckersApiResource.java index 4ceec1443..4d310482d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/commands/api/MakercheckersApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/commands/api/MakercheckersApiResource.java @@ -93,7 +93,7 @@ public class MakercheckersApiResource { + "\n" + "makercheckers?makerDateTimeFrom=2013-03-25 08:00:00&makerDateTimeTo=2013-04-04 18:00:00\n" + "\n" + "makercheckers?officeId=1\n" + "\n" + "makercheckers?officeId=1&includeJson=true") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(array = @ArraySchema(schema = @Schema(implementation = MakercheckersApiResourceSwagger.GetMakerCheckerResponse.class)))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = MakercheckersApiResourceSwagger.GetMakerCheckerResponse.class)))) }) public String retrieveCommands(@Context final UriInfo uriInfo, @QueryParam("actionName") @Parameter(description = "actionName") final String actionName, @QueryParam("entityName") @Parameter(description = "entityName") final String entityName, @@ -125,7 +125,7 @@ public class MakercheckersApiResource { @Operation(summary = "Maker Checker Search Template", description = "This is a convenience resource. It can be useful when building a Checker Inbox UI. \"appUsers\" are data scoped to the office/branch the requestor is associated with. \"actionNames\" and \"entityNames\" returned are those that the requestor has Checker approval permissions for.\n" + "\n" + "Example Requests:\n" + "\n" + "makercheckers/searchtemplate\n" + "makercheckers/searchtemplate?fields=entityNames") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = MakercheckersApiResourceSwagger.GetMakerCheckersSearchTemplateResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = MakercheckersApiResourceSwagger.GetMakerCheckersSearchTemplateResponse.class))) }) public String retrieveAuditSearchTemplate(@Context final UriInfo uriInfo) { final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters()); @@ -143,7 +143,7 @@ public class MakercheckersApiResource { @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Approve Maker Checker Entry | Reject Maker Checker Entry") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = MakercheckersApiResourceSwagger.PostMakerCheckersResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = MakercheckersApiResourceSwagger.PostMakerCheckersResponse.class))) }) public String approveMakerCheckerEntry(@PathParam("auditId") @Parameter(description = "auditId") final Long auditId, @QueryParam("command") @Parameter(description = "command") final String commandParam) { @@ -169,7 +169,7 @@ public class MakercheckersApiResource { @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Delete Maker Checker Entry") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = MakercheckersApiResourceSwagger.PostMakerCheckersResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = MakercheckersApiResourceSwagger.PostMakerCheckersResponse.class))) }) public String deleteMakerCheckerEntry(@PathParam("auditId") @Parameter(description = "auditId") final Long auditId) { final Long id = this.writePlatformService.deleteEntry(auditId); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/api/AccountNumberFormatsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/api/AccountNumberFormatsApiResource.java index 73f8bf16a..ceda11fc2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/api/AccountNumberFormatsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/api/AccountNumberFormatsApiResource.java @@ -94,7 +94,7 @@ public class AccountNumberFormatsApiResource { @Operation(summary = "Retrieve Account number format Template", description = "This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n" + "\n" + "Field Defaults\n" + "Allowed Value Lists\n" + "\n" + "Example Request:\n" + "\n" + "accountnumberformats/template") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = AccountNumberFormatsApiResourceSwagger.GetAccountNumberFormatsResponseTemplate.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = AccountNumberFormatsApiResourceSwagger.GetAccountNumberFormatsResponseTemplate.class))) }) public String retrieveTemplate(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(AccountNumberFormatConstants.ENTITY_NAME); @@ -112,7 +112,7 @@ public class AccountNumberFormatsApiResource { @Operation(summary = "List Account number formats", description = "Example Requests:\n" + "\n" + "accountnumberformats\n" + "\n" + "\n" + "accountnumberformats?fields=accountType,prefixType") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(array = @ArraySchema(schema = @Schema(implementation = AccountNumberFormatsApiResourceSwagger.GetAccountNumberFormatsIdResponse.class)))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = AccountNumberFormatsApiResourceSwagger.GetAccountNumberFormatsIdResponse.class)))) }) public String retrieveAll(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(AccountNumberFormatConstants.ENTITY_NAME); @@ -131,7 +131,7 @@ public class AccountNumberFormatsApiResource { @Operation(summary = "Retrieve an Account number format", description = "Example Requests:\n" + "\n" + "accountnumberformats/1\n" + "\n" + "\n" + "accountnumberformats/1?template=true\n" + "\n" + "\n" + "accountnumberformats/1?fields=accountType,prefixType") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = AccountNumberFormatsApiResourceSwagger.GetAccountNumberFormatsIdResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = AccountNumberFormatsApiResourceSwagger.GetAccountNumberFormatsIdResponse.class))) }) public String retrieveOne(@Context final UriInfo uriInfo, @PathParam("accountNumberFormatId") @Parameter(description = "accountNumberFormatId") final Long accountNumberFormatId) { @@ -157,7 +157,7 @@ public class AccountNumberFormatsApiResource { + "Mandatory Fields for Account number formats\n" + "accountType") @RequestBody(content = @Content(schema = @Schema(implementation = AccountNumberFormatsApiResourceSwagger.PostAccountNumberFormatsRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = AccountNumberFormatsApiResourceSwagger.PostAccountNumberFormatsResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = AccountNumberFormatsApiResourceSwagger.PostAccountNumberFormatsResponse.class))) }) public String create(@Parameter(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // @@ -177,7 +177,7 @@ public class AccountNumberFormatsApiResource { @Operation(summary = "Update an Account number format") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = AccountNumberFormatsApiResourceSwagger.PutAccountNumberFormatsRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = AccountNumberFormatsApiResourceSwagger.PutAccountNumberFormatsResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = AccountNumberFormatsApiResourceSwagger.PutAccountNumberFormatsResponse.class))) }) public String update( @PathParam("accountNumberFormatId") @Parameter(description = "accountNumberFormatId") final Long accountNumberFormatId, @Parameter(hidden = true) final String apiRequestBodyAsJson) { @@ -198,7 +198,7 @@ public class AccountNumberFormatsApiResource { @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Delete an Account number format", description = "Note: Account numbers created while this format was active would remain unchanged.") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = AccountNumberFormatsApiResourceSwagger.DeleteAccountNumberFormatsResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = AccountNumberFormatsApiResourceSwagger.DeleteAccountNumberFormatsResponse.class))) }) public String delete( @PathParam("accountNumberFormatId") @Parameter(description = "accountNumberFormatId") final Long accountNumberFormatId) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/cache/api/CacheApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/cache/api/CacheApiResource.java index 02ff94de5..045df534f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/cache/api/CacheApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/cache/api/CacheApiResource.java @@ -89,7 +89,7 @@ public class CacheApiResource { @Operation(summary = "Retrieve Cache Types", description = "Returns the list of caches.\n" + "\n" + "Example Requests:\n" + "\n" + "caches") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(array = @ArraySchema(schema = @Schema(implementation = CacheApiResourceSwagger.GetCachesResponse.class)))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = CacheApiResourceSwagger.GetCachesResponse.class)))) }) public String retrieveAll(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -104,7 +104,7 @@ public class CacheApiResource { @Operation(summary = "Switch Cache", description = "Switches the cache to chosen one.") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = CacheApiResourceSwagger.PutCachesRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = CacheApiResourceSwagger.PutCachesResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CacheApiResourceSwagger.PutCachesResponse.class))) }) public String switchCache(@Parameter(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateCache().withJson(apiRequestBodyAsJson).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/api/SmsCampaignApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/api/SmsCampaignApiResource.java index 257580587..11c2b7bf9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/api/SmsCampaignApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/api/SmsCampaignApiResource.java @@ -101,7 +101,7 @@ public class SmsCampaignApiResource { @Path("template") @Operation(summary = "Retrieve a SMS Campaign", description = "Example Requests:\n" + "\n" + "smscampaigns/1\n" + "\n" + "\n" + "smscampaigns/1?template=true\n" + "\n" + "\n" + "smscampaigns/template") - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = SmsCampaignData.class))) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SmsCampaignData.class))) public String template(@Context final UriInfo uriInfo) { this.platformSecurityContext.authenticatedUser().validateHasReadPermission(SmsCampaignConstants.RESOURCE_NAME); final SmsCampaignData smsCampaignData = this.smsCampaignReadPlatformService.retrieveTemplate(CampaignType.SMS.name()); @@ -116,7 +116,7 @@ public class SmsCampaignApiResource { + "campaignName, campaignType, triggerType, providerId, runReportId, message\n" + "\n" + "Mandatory Fields for Cash based on selected report id\n" + "paramValue in json format") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = CommandWrapper.class))) - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = CommandProcessingResult.class))) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CommandProcessingResult.class))) public String createCampaign(@Parameter(hidden = true) final String apiRequestBodyAsJson) { this.platformSecurityContext.authenticatedUser(); final CommandWrapper commandRequest = new CommandWrapperBuilder().createSmsCampaign().withJson(apiRequestBodyAsJson).build(); @@ -128,7 +128,7 @@ public class SmsCampaignApiResource { @Path("{resourceId}") @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Retrieve a SMS Campaign", description = "Example Requests:\n" + "\n" + "smscampaigns/1\n") - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = SmsCampaignData.class))) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SmsCampaignData.class))) public String retrieveCampaign(@PathParam("resourceId") final Long resourceId, @Context final UriInfo uriInfo) { this.platformSecurityContext.authenticatedUser().validateHasReadPermission(SmsCampaignConstants.RESOURCE_NAME); SmsCampaignData smsCampaignData = this.smsCampaignReadPlatformService.retrieveOne(resourceId); @@ -140,7 +140,7 @@ public class SmsCampaignApiResource { @GET @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "List SMS Campaigns", description = "Example Requests:\n" + "\n" + "smscampaigns") - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = SmsCampaignData.class))) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SmsCampaignData.class))) public String retrieveAllEmails(@QueryParam("sqlSearch") final String sqlSearch, @QueryParam("offset") final Integer offset, @QueryParam("limit") final Integer limit, @QueryParam("orderBy") final String orderBy, @QueryParam("sortOrder") final String sortOrder, @Context final UriInfo uriInfo) { @@ -157,7 +157,7 @@ public class SmsCampaignApiResource { @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Update a Campaign") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = CommandWrapper.class))) - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = CommandProcessingResult.class))) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CommandProcessingResult.class))) public String updateCampaign(@PathParam("campaignId") final Long campaignId, @Parameter(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateSmsCampaign(campaignId).withJson(apiRequestBodyAsJson) @@ -171,7 +171,7 @@ public class SmsCampaignApiResource { @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "SMS Campaign", description = "Activates | Deactivates | Reactivates") - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = CommandProcessingResult.class))) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CommandProcessingResult.class))) public String handleCommands(@PathParam("campaignId") final Long campaignId, @QueryParam("command") final String commandParam, @Parameter(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapperBuilder builder = new CommandWrapperBuilder().withJson(apiRequestBodyAsJson); @@ -209,7 +209,7 @@ public class SmsCampaignApiResource { @DELETE @Path("{campaignId}") @Operation(summary = "Delete a SMS Campaign", description = "Note: Only closed SMS Campaigns can be deleted") - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = CommandProcessingResult.class))) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CommandProcessingResult.class))) public String delete(@PathParam("campaignId") final Long campaignId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteSmsCampaign(campaignId).build(); final CommandProcessingResult result = this.commandsSourceWritePlatformService.logCommandSource(commandRequest); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/api/CodeValuesApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/api/CodeValuesApiResource.java index 2120174ae..c16feb13d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/api/CodeValuesApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/api/CodeValuesApiResource.java @@ -96,7 +96,7 @@ public class CodeValuesApiResource { @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "List Code Values", description = "Returns the list of Code Values for a given Code\n" + "\n" - + "Example Requests:\n" + "\n" + "codes/1/codevalues") + + "Example Requests:\n" + "\n" + "codes/1/codevalues", parameters = @Parameter(name = "codeId", description = "co")) @ApiResponses({ @ApiResponse(responseCode = "200", description = "A List of code values for a given code", content = @Content(array = @ArraySchema(schema = @Schema(implementation = CodeValuesApiResourceSwagger.GetCodeValuesDataResponse.class)))) }) public String retrieveAllCodeValues(@Context final UriInfo uriInfo, @@ -117,9 +117,10 @@ public class CodeValuesApiResource { @Operation(summary = "Retrieve a Code description", description = "Returns the details of a Code Value\n" + "\n" + "Example Requests:\n" + "\n" + "codes/1/codevalues/1") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = CodeValuesApiResourceSwagger.GetCodeValuesDataResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CodeValuesApiResourceSwagger.GetCodeValuesDataResponse.class))) }) public String retrieveCodeValue(@Context final UriInfo uriInfo, - @PathParam("codeValueId") @Parameter(description = "codeValueId") final Long codeValueId) { + @PathParam("codeValueId") @Parameter(description = "codeValueId") final Long codeValueId, + @PathParam("codeId") @Parameter(description = "codeId") final Long codeId) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -135,7 +136,7 @@ public class CodeValuesApiResource { @Operation(summary = "Create a Code description", description = "") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = CodeValuesApiResourceSwagger.PostCodeValuesDataRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = CodeValuesApiResourceSwagger.PostCodeValueDataResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CodeValuesApiResourceSwagger.PostCodeValueDataResponse.class))) }) public String createCodeValue(@PathParam("codeId") @Parameter(description = "codeId") final Long codeId, @Parameter(hidden = true) final String apiRequestBodyAsJson) { @@ -154,7 +155,7 @@ public class CodeValuesApiResource { @Operation(summary = "Update a Code description", description = "Updates the details of a code description.") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = CodeValuesApiResourceSwagger.PutCodeValuesDataRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = CodeValuesApiResourceSwagger.PutCodeValueDataResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CodeValuesApiResourceSwagger.PutCodeValueDataResponse.class))) }) public String updateCodeValue(@PathParam("codeId") @Parameter(description = "codeId") final Long codeId, @PathParam("codeValueId") @Parameter(description = "codeValueId") final Long codeValueId, @Parameter(hidden = true) final String apiRequestBodyAsJson) { @@ -173,7 +174,7 @@ public class CodeValuesApiResource { @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Delete a Code description", description = "Deletes a code description") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = CodeValuesApiResourceSwagger.DeleteCodeValueDataResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CodeValuesApiResourceSwagger.DeleteCodeValueDataResponse.class))) }) public String deleteCodeValue(@PathParam("codeId") @Parameter(description = "codeId") final Long codeId, @PathParam("codeValueId") @Parameter(description = "codeValueId") final Long codeValueId) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/api/CodesApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/api/CodesApiResource.java index eb27587ea..811542bb1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/api/CodesApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/api/CodesApiResource.java @@ -92,7 +92,7 @@ public class CodesApiResource { @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Retrieve Codes", description = "Returns the list of codes.\n" + "\n" + "Example Requests:\n" + "\n" + "codes") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(array = @ArraySchema(schema = @Schema(implementation = CodesApiResourceSwagger.GetCodesResponse.class)))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = CodesApiResourceSwagger.GetCodesResponse.class)))) }) public String retrieveCodes(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -109,7 +109,7 @@ public class CodesApiResource { @Operation(summary = "Create a Code", description = "Creates a code. Codes created through api are always 'user defined' and so system defined is marked as false.") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = CodesApiResourceSwagger.PostCodesRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = CodesApiResourceSwagger.PostCodesResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CodesApiResourceSwagger.PostCodesResponse.class))) }) public String createCode(@Parameter(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createCode().withJson(apiRequestBodyAsJson).build(); @@ -126,7 +126,7 @@ public class CodesApiResource { @Operation(summary = "Retrieve a Code", description = "Returns the details of a Code.\n" + "\n" + "Example Requests:\n" + "\n" + "codes/1") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = CodesApiResourceSwagger.GetCodesResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CodesApiResourceSwagger.GetCodesResponse.class))) }) public String retrieveCode(@PathParam("codeId") @Parameter(description = "codeId") final Long codeId, @Context final UriInfo uriInfo) { final CodeData code = this.readPlatformService.retrieveCode(codeId); @@ -142,7 +142,7 @@ public class CodesApiResource { @Operation(summary = "Update a Code", description = "Updates the details of a code if it is not system defined.") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = CodesApiResourceSwagger.PutCodesRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = CodesApiResourceSwagger.PutCodesResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CodesApiResourceSwagger.PutCodesResponse.class))) }) public String updateCode(@PathParam("codeId") @Parameter(description = "codeId") final Long codeId, @Parameter(hidden = true) final String apiRequestBodyAsJson) { @@ -159,7 +159,7 @@ public class CodesApiResource { @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Delete a Code", description = "Deletes a code if it is not system defined.") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = CodesApiResourceSwagger.DeleteCodesResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CodesApiResourceSwagger.DeleteCodesResponse.class))) }) public String deleteCode(@PathParam("codeId") @Parameter(description = "codeId") final Long codeId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteCode(codeId).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/ExternalServicesConfigurationApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/ExternalServicesConfigurationApiResource.java index a27a6aa1d..0f171b02e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/ExternalServicesConfigurationApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/ExternalServicesConfigurationApiResource.java @@ -87,7 +87,7 @@ public class ExternalServicesConfigurationApiResource { @Operation(summary = "Retrieve External Services Configuration", description = "Returns a external Service configurations based on the Service Name.\n" + "\n" + "Service Names supported are S3 and SMTP.\n" + "\n" + "Example Requests:\n" + "\n" + "externalservice/SMTP") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = ExternalServicesPropertiesData.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ExternalServicesPropertiesData.class))) }) public String retrieveOne(@PathParam("servicename") @Parameter(description = "servicename") final String serviceName, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(ExternalServiceConfigurationApiConstant.EXTERNAL_SERVICE_RESOURCE_NAME); @@ -105,7 +105,7 @@ public class ExternalServicesConfigurationApiResource { @Operation(summary = "Update External Service", description = "Updates the external Service Configuration for a Service Name.\n" + "\n" + "Example: \n" + "\n" + "externalservice/S3") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = ExternalServicesConfigurationApiResourceSwagger.PutExternalServiceRequest.class))) - @ApiResponses({ @ApiResponse(responseCode = "200", description = "") }) + @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK") }) public String updateExternalServiceProperties( @PathParam("servicename") @Parameter(description = "servicename") final String serviceName, @Parameter(hidden = true) final String apiRequestBodyAsJson) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/GlobalConfigurationApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/GlobalConfigurationApiResource.java index 00d7be8ae..f2d27987a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/GlobalConfigurationApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/GlobalConfigurationApiResource.java @@ -122,7 +122,7 @@ public class GlobalConfigurationApiResource { @Operation(summary = "Retrieve Global Configuration", description = "Returns a global enable/disable configurations.\n" + "\n" + "Example Requests:\n" + "\n" + "configurations/1") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = GlobalConfigurationApiResourceSwagger.GetGlobalConfigurationsResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = GlobalConfigurationApiResourceSwagger.GetGlobalConfigurationsResponse.class))) }) public String retrieveOne(@PathParam("configId") @Parameter(description = "configId") final Long configId, @Context final UriInfo uriInfo) { @@ -141,7 +141,7 @@ public class GlobalConfigurationApiResource { @Operation(summary = "Update Global Configuration", description = "Updates an enable/disable global configuration item.") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = GlobalConfigurationApiResourceSwagger.PutGlobalConfigurationsRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = GlobalConfigurationApiResourceSwagger.PutGlobalConfigurationsResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = GlobalConfigurationApiResourceSwagger.PutGlobalConfigurationsResponse.class))) }) public String updateConfiguration(@PathParam("configId") @Parameter(description = "configId") final Long configId, @Parameter(hidden = true) final String apiRequestBodyAsJson) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/DatatablesApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/DatatablesApiResource.java index c5759d9c3..dca344d44 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/DatatablesApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/DatatablesApiResource.java @@ -91,7 +91,7 @@ public class DatatablesApiResource { + "\n" + "ARGUMENTS\n" + "\n" + "apptable - optional" + "\n" + "The Apache Fineract core application table.\n" + "\n" + "Example Requests:\n" + "\n" + "datatables?apptable=m_client\n" + "\n" + "\n" + "datatables") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(array = @ArraySchema(schema = @Schema(implementation = DatatablesApiResourceSwagger.GetDataTablesResponse.class)))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = DatatablesApiResourceSwagger.GetDataTablesResponse.class)))) }) public String getDatatables(@QueryParam("apptable") @Parameter(description = "apptable") final String apptable, @Context final UriInfo uriInfo) { @@ -123,7 +123,7 @@ public class DatatablesApiResource { + "Length of the text field. Mandatory if type String is used, otherwise an error is returned.") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = DatatablesApiResourceSwagger.PostDataTablesRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = DatatablesApiResourceSwagger.PostDataTablesResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = DatatablesApiResourceSwagger.PostDataTablesResponse.class))) }) public String createDatatable(@Parameter(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createDBDatatable(apiRequestBodyAsJson).build(); @@ -139,7 +139,7 @@ public class DatatablesApiResource { @Operation(summary = "Update Data Table", description = "Modifies fields of a data table. If the apptableName parameter is passed, data table is deregistered and registered with the new application table.") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = DatatablesApiResourceSwagger.PutDataTablesRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = DatatablesApiResourceSwagger.PutDataTablesResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = DatatablesApiResourceSwagger.PutDataTablesResponse.class))) }) public String updateDatatable(@PathParam("datatableName") @Parameter(description = "datatableName") final String datatableName, @Parameter(hidden = true) final String apiRequestBodyAsJson) { @@ -155,7 +155,7 @@ public class DatatablesApiResource { @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Delete Data Table", description = "Deletes a data table and deregisters it from the Apache Fineract Core application table.") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = DatatablesApiResourceSwagger.DeleteDataTablesResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = DatatablesApiResourceSwagger.DeleteDataTablesResponse.class))) }) public String deleteDatatable(@PathParam("datatableName") @Parameter(description = "datatableName") final String datatableName, @Parameter(hidden = true) final String apiRequestBodyAsJson) { @@ -172,7 +172,7 @@ public class DatatablesApiResource { @Operation(summary = "Register Data Table", description = "Registers a data table with the Apache Fineract Core application table. This allows the data table to be maintained through the API. In case the datatable is a PPI (survey table), a parameter category should be pass along with the request. The API currently support one category (200)") @RequestBody(content = @Content(schema = @Schema(implementation = DatatablesApiResourceSwagger.PostDataTablesRegisterDatatableAppTable.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = DatatablesApiResourceSwagger.PutDataTablesResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = DatatablesApiResourceSwagger.PutDataTablesResponse.class))) }) public String registerDatatable(@PathParam("datatable") @Parameter(description = "datatable") final String datatable, @PathParam("apptable") @Parameter(description = "apptable") final String apptable, @Parameter(hidden = true) final String apiRequestBodyAsJson) { @@ -191,7 +191,7 @@ public class DatatablesApiResource { @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Deregister Data Table", description = "Deregisters a data table. It will no longer be available through the API.") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = DatatablesApiResourceSwagger.PutDataTablesResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = DatatablesApiResourceSwagger.PutDataTablesResponse.class))) }) public String deregisterDatatable(@PathParam("datatable") @Parameter(description = "datatable") final String datatable) { this.readWriteNonCoreDataService.deregisterDatatable(datatable); @@ -207,7 +207,7 @@ public class DatatablesApiResource { @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Retrieve Data Table Details", description = "Lists a registered data table details and the Apache Fineract Core application table they are registered to.") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = DatatablesApiResourceSwagger.GetDataTablesResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = DatatablesApiResourceSwagger.GetDataTablesResponse.class))) }) public String getDatatable(@PathParam("datatable") @Parameter(description = "datatable") final String datatable, @Context final UriInfo uriInfo) { @@ -229,7 +229,7 @@ public class DatatablesApiResource { + "datatables/extra_family_details/1?order=`Date of Birth` desc\n" + "\n" + "\n" + "datatables/extra_client_details/1?genericResultSet=true") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = DatatablesApiResourceSwagger.GetDataTablesAppTableIdResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = DatatablesApiResourceSwagger.GetDataTablesAppTableIdResponse.class))) }) public String getDatatable(@PathParam("datatable") @Parameter(description = "datatable") final String datatable, @PathParam("apptableId") @Parameter(description = "apptableId") final Long apptableId, @QueryParam("order") @Parameter(description = "order") final String order, @Context final UriInfo uriInfo) { @@ -285,7 +285,7 @@ public class DatatablesApiResource { + "Note that the default datatable UI functionality converts any field name containing spaces to underscores when using the API. This means the field name \"Business Description\" is considered the same as \"Business_Description\". So you shouldn't have both \"versions\" in any data table.") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = DatatablesApiResourceSwagger.PostDataTablesAppTableIdRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = DatatablesApiResourceSwagger.PostDataTablesAppTableIdResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = DatatablesApiResourceSwagger.PostDataTablesAppTableIdResponse.class))) }) public String createDatatableEntry(@PathParam("datatable") @Parameter(description = "datatable") final String datatable, @PathParam("apptableId") @Parameter(description = "apptableId") final Long apptableId, @Parameter(hidden = true) final String apiRequestBodyAsJson) { @@ -307,7 +307,7 @@ public class DatatablesApiResource { @Operation(summary = "Update Entry in Data Table (One to One)", description = "Updates the row (if it exists) of the data table.") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = DatatablesApiResourceSwagger.PutDataTablesAppTableIdRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = DatatablesApiResourceSwagger.PutDataTablesAppTableIdResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = DatatablesApiResourceSwagger.PutDataTablesAppTableIdResponse.class))) }) public String updateDatatableEntryOnetoOne(@PathParam("datatable") @Parameter(description = "datatable") final String datatable, @PathParam("apptableId") @Parameter(description = "apptableId") final Long apptableId, @Parameter(hidden = true) final String apiRequestBodyAsJson) { @@ -329,7 +329,7 @@ public class DatatablesApiResource { @Operation(summary = "Update Entry in Data Table (One to Many)", description = "Updates the row (if it exists) of the data table.") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = DatatablesApiResourceSwagger.PutDataTablesAppTableIdDatatableIdRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = DatatablesApiResourceSwagger.PutDataTablesAppTableIdDatatableIdResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = DatatablesApiResourceSwagger.PutDataTablesAppTableIdDatatableIdResponse.class))) }) public String updateDatatableEntryOneToMany(@PathParam("datatable") @Parameter(description = "datatable") final String datatable, @PathParam("apptableId") @Parameter(description = "apptableId") final Long apptableId, @PathParam("datatableId") @Parameter(description = "datatableId") final Long datatableId, @@ -352,7 +352,7 @@ public class DatatablesApiResource { @Operation(summary = "Delete Entry(s) in Data Table", description = "Deletes the entry (if it exists) for data tables that are one-to-one with the application table. \n" + "Deletes the entries (if they exist) for data tables that are one-to-many with the application table.") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = DatatablesApiResourceSwagger.DeleteDataTablesDatatableAppTableIdResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = DatatablesApiResourceSwagger.DeleteDataTablesDatatableAppTableIdResponse.class))) }) public String deleteDatatableEntries(@PathParam("datatable") @Parameter(description = "datatable") final String datatable, @PathParam("apptableId") @Parameter(description = "apptableId") final Long apptableId) { @@ -372,7 +372,7 @@ public class DatatablesApiResource { @Operation(summary = "Delete Entry in Datatable (One to Many)", description = "Deletes the entry (if it exists) for data tables that are one to many with the application table.\n" + "\n") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = DatatablesApiResourceSwagger.DeleteDataTablesDatatableAppTableIdDatatableIdResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = DatatablesApiResourceSwagger.DeleteDataTablesDatatableAppTableIdDatatableIdResponse.class))) }) public String deleteDatatableEntries( @PathParam("datatable") @Parameter(description = "datatable", example = "{}") final String datatable, @PathParam("apptableId") @Parameter(description = "apptableId") final Long apptableId, 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 4a8d61faf..0c973fd45 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 @@ -90,7 +90,7 @@ public class EntityDatatableChecksApiResource { + "offset Integer optional, defaults to 0 Indicates the result from which pagination startslimit Integer optional, defaults to 200 Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1\n" + "Example Request:\n" + "\n" + "entityDatatableChecks?offset=0&limit=15") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(array = @ArraySchema(schema = @Schema(implementation = EntityDatatableChecksApiResourceSwagger.GetEntityDatatableChecksResponse.class)))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = EntityDatatableChecksApiResourceSwagger.GetEntityDatatableChecksResponse.class)))) }) public String retrieveAll(@Context final UriInfo uriInfo, @QueryParam("status") @Parameter(description = "status") final Long status, @QueryParam("entity") @Parameter(description = "entity") final String entity, @QueryParam("productId") @Parameter(description = "productId") final Long productId, @@ -111,7 +111,7 @@ public class EntityDatatableChecksApiResource { @Operation(summary = "Retrieve Entity-Datatable Checks Template", description = "This is a convenience resource useful for building maintenance user interface screens for Entity-Datatable Checks applications. The template data returned consists of:\n" + "\n" + "Allowed description Lists\n" + "Example Request:\n" + "\n" + "entityDatatableChecks/template") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = EntityDatatableChecksApiResourceSwagger.GetEntityDatatableChecksTemplateResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = EntityDatatableChecksApiResourceSwagger.GetEntityDatatableChecksTemplateResponse.class))) }) public String getTemplate(@Context final UriInfo uriInfo) { final EntityDataTableChecksTemplateData result = this.readEntityDatatableChecksService.retrieveTemplate(); @@ -127,7 +127,7 @@ public class EntityDatatableChecksApiResource { + "Non-Mandatory Fields : \n" + "productId") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = EntityDatatableChecksApiResourceSwagger.PostEntityDatatableChecksTemplateRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = EntityDatatableChecksApiResourceSwagger.PostEntityDatatableChecksTemplateResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = EntityDatatableChecksApiResourceSwagger.PostEntityDatatableChecksTemplateResponse.class))) }) public String createEntityDatatableCheck(@Parameter(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createEntityDatatableChecks(apiRequestBodyAsJson).build(); @@ -141,7 +141,7 @@ public class EntityDatatableChecksApiResource { @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Delete Entity-Datatable Checks", description = "Deletes an existing Entity-Datatable Check") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = EntityDatatableChecksApiResourceSwagger.DeleteEntityDatatableChecksTemplateResponse.class))) }) + @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) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/ReportsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/ReportsApiResource.java index 034443421..990aef8ea 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/ReportsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/ReportsApiResource.java @@ -89,7 +89,7 @@ public class ReportsApiResource { @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "List Reports", description = "Lists all reports and their parameters.\n" + "\n" + "Example Request:\n" + "\n" + "reports") - @ApiResponse(responseCode = "200", description = "", content = @Content(array = @ArraySchema(schema = @Schema(implementation = ReportsApiResourceSwagger.GetReportsResponse.class)))) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = ReportsApiResourceSwagger.GetReportsResponse.class)))) public String retrieveReportList(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -107,7 +107,7 @@ public class ReportsApiResource { @Operation(summary = "Retrieve a Report\n", description = "Example Requests:\n" + "\n" + "reports/1\n" + "\n" + "\n" + "reports/1?template=true") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = ReportsApiResourceSwagger.GetReportsResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ReportsApiResourceSwagger.GetReportsResponse.class))) }) public String retrieveReport(@PathParam("id") @Parameter(description = "id") final Long id, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -129,7 +129,7 @@ public class ReportsApiResource { @Operation(summary = "Retrieve Report Template", description = "This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n" + "\n" + "Field Defaults\n" + "Allowed description Lists\n" + "\n" + "Example Request : \n" + "\n" + "reports/template") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = ReportsApiResourceSwagger.GetReportsTemplateResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ReportsApiResourceSwagger.GetReportsTemplateResponse.class))) }) public String retrieveOfficeTemplate(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -147,7 +147,7 @@ public class ReportsApiResource { @Operation(summary = "Create a Report", description = "") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = ReportsApiResourceSwagger.PostRepostRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = ReportsApiResourceSwagger.PostReportsResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ReportsApiResourceSwagger.PostReportsResponse.class))) }) public String createReport(@Parameter(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createReport().withJson(apiRequestBodyAsJson).build(); @@ -164,7 +164,7 @@ public class ReportsApiResource { @Operation(summary = "Update a Report", description = "Only the useReport description can be updated for core reports.") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = ReportsApiResourceSwagger.PutReportRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = ReportsApiResourceSwagger.PutReportResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ReportsApiResourceSwagger.PutReportResponse.class))) }) public String updateReport(@PathParam("id") @Parameter(description = "id") final Long id, @Parameter(hidden = true) final String apiRequestBodyAsJson) { @@ -181,7 +181,7 @@ public class ReportsApiResource { @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Delete a Report", description = "Only non-core reports can be deleted.") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = ReportsApiResourceSwagger.DeleteReportsResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ReportsApiResourceSwagger.DeleteReportsResponse.class))) }) public String deleteReport(@PathParam("id") @Parameter(description = "id") final Long id) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteReport(id).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/RunreportsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/RunreportsApiResource.java index ee05b1bb7..cf1123290 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/RunreportsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/RunreportsApiResource.java @@ -105,7 +105,7 @@ public class RunreportsApiResource { + "\n" + "\n" + "runreports/Expected%20Payments%20By%20Date%20-%20Formatted?R_endDate=2013-04-30&R_loanOfficerId=-1&R_officeId=1&R_startDate=2013-04-16&output-type=PDF&R_officeId=1") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = RunreportsApiResourceSwagger.GetReportNameResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = RunreportsApiResourceSwagger.GetReportNameResponse.class))) }) public Response runReport(@PathParam("reportName") @Parameter(description = "reportName") final String reportName, @Context final UriInfo uriInfo, @DefaultValue("false") @QueryParam("isSelfServiceUserReport") @Parameter(description = "isSelfServiceUserReport") final boolean isSelfServiceUserReport) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/DocumentManagementApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/DocumentManagementApiResource.java index e4c794a76..a64319d5e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/DocumentManagementApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/DocumentManagementApiResource.java @@ -99,7 +99,7 @@ public class DocumentManagementApiResource { @Operation(summary = "List documents", description = "Example Requests:\n" + "\n" + "clients/1/documents\n" + "\n" + "client_identifiers/1/documents\n" + "\n" + "loans/1/documents?fields=name,description") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(array = @ArraySchema(schema = @Schema(implementation = DocumentManagementApiResourceSwagger.GetEntityTypeEntityIdDocumentsResponse.class)))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = DocumentManagementApiResourceSwagger.GetEntityTypeEntityIdDocumentsResponse.class)))) }) public String retreiveAllDocuments(@Context final UriInfo uriInfo, @PathParam("entityType") @Parameter(description = "entityType") final String entityType, @PathParam("entityId") @Parameter(description = "entityId") final Long entityId) { @@ -199,7 +199,7 @@ public class DocumentManagementApiResource { @Operation(summary = "Retrieve a Document", description = "Example Requests:\n" + "\n" + "clients/1/documents/1\n" + "\n" + "\n" + "loans/1/documents/1\n" + "\n" + "\n" + "client_identifiers/1/documents/1?fields=name,description") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = DocumentManagementApiResourceSwagger.GetEntityTypeEntityIdDocumentsResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = DocumentManagementApiResourceSwagger.GetEntityTypeEntityIdDocumentsResponse.class))) }) public String getDocument(@PathParam("entityType") @Parameter(description = "entityType") final String entityType, @PathParam("entityId") @Parameter(description = "entityId") final Long entityId, @PathParam("documentId") @Parameter(description = "documentId") final Long documentId, @Context final UriInfo uriInfo) { @@ -239,7 +239,7 @@ public class DocumentManagementApiResource { @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Remove a Document", description = "") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = DocumentManagementApiResourceSwagger.DeleteEntityTypeEntityIdDocumentsResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = DocumentManagementApiResourceSwagger.DeleteEntityTypeEntityIdDocumentsResponse.class))) }) public String deleteDocument(@PathParam("entityType") @Parameter(description = "entityType") final String entityType, @PathParam("entityId") @Parameter(description = "entityId") final Long entityId, @PathParam("documentId") @Parameter(description = "documentId") final Long documentId) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/api/HookApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/api/HookApiResource.java index 3be95524e..236d852cb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/api/HookApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/api/HookApiResource.java @@ -84,7 +84,7 @@ public class HookApiResource { @GET @Operation(summary = "Retrieve Hooks", description = "Returns the list of hooks.\n" + "\n" + "Example Requests:\n" + "\n" + "hooks") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(array = @ArraySchema(schema = @Schema(implementation = HookApiResourceSwagger.GetHookResponse.class)))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = HookApiResourceSwagger.GetHookResponse.class)))) }) public String retrieveHooks(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(HOOK_RESOURCE_NAME); @@ -100,7 +100,7 @@ public class HookApiResource { @Operation(summary = "Retrieve a Hook", description = "Returns the details of a Hook.\n" + "\n" + "Example Requests:\n" + "\n" + "hooks/1") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = HookApiResourceSwagger.GetHookResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = HookApiResourceSwagger.GetHookResponse.class))) }) public String retrieveHook(@PathParam("hookId") @Parameter(description = "hookId") final Long hookId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(HOOK_RESOURCE_NAME); @@ -121,7 +121,7 @@ public class HookApiResource { @Operation(summary = "Retrieve Hooks Template", description = "This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n" + "\n" + "Field Defaults\n" + "Allowed description Lists\n" + "Example Request:\n" + "\n" + "hooks/template") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = HookApiResourceSwagger.GetHookTemplateResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = HookApiResourceSwagger.GetHookTemplateResponse.class))) }) public String template(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(HOOK_RESOURCE_NAME); @@ -141,7 +141,7 @@ public class HookApiResource { + "\n" + "templateId - Optional. The UGD template ID associated with the same entity (client or loan).") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = HookApiResourceSwagger.PostHookRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = HookApiResourceSwagger.PostHookResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = HookApiResourceSwagger.PostHookResponse.class))) }) public String createHook(@Parameter(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createHook().withJson(apiRequestBodyAsJson).build(); @@ -156,7 +156,7 @@ public class HookApiResource { @Operation(summary = "Update a Hook", description = "Updates the details of a hook.") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = HookApiResourceSwagger.PutHookRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = HookApiResourceSwagger.PutHookResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = HookApiResourceSwagger.PutHookResponse.class))) }) public String updateHook(@PathParam("hookId") @Parameter(description = "hookId") final Long hookId, @Parameter(hidden = true) final String apiRequestBodyAsJson) { @@ -171,7 +171,7 @@ public class HookApiResource { @Path("{hookId}") @Operation(summary = "Delete a Hook", description = "Deletes a hook.") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = HookApiResourceSwagger.DeleteHookResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = HookApiResourceSwagger.DeleteHookResponse.class))) }) public String deleteHook(@PathParam("hookId") @Parameter(description = "hookId") final Long hookId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteHook(hookId).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerApiResource.java index af877d5ca..5739829f4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerApiResource.java @@ -73,7 +73,7 @@ public class SchedulerApiResource { @Operation(summary = "Retrieve Scheduler Status", description = "Returns the scheduler status.\n" + "\n" + "Example Requests:\n" + "\n" + "scheduler") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = SchedulerApiResourceSwagger.GetSchedulerResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SchedulerApiResourceSwagger.GetSchedulerResponse.class))) }) public String retrieveStatus(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(SchedulerJobApiConstants.SCHEDULER_RESOURCE_NAME); final boolean isSchedulerRunning = this.jobRegisterService.isSchedulerRunning(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerJobApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerJobApiResource.java index 3967c8f57..af2d2c433 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerJobApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerJobApiResource.java @@ -94,7 +94,7 @@ public class SchedulerJobApiResource { @Operation(summary = "Retrieve Scheduler Jobs", description = "Returns the list of jobs.\n" + "\n" + "Example Requests:\n" + "\n" + "jobs") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(array = @ArraySchema(schema = @Schema(implementation = SchedulerJobApiResourceSwagger.GetJobsResponse.class)))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = SchedulerJobApiResourceSwagger.GetJobsResponse.class)))) }) public String retrieveAll(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(SchedulerJobApiConstants.SCHEDULER_RESOURCE_NAME); final List jobDetailDatas = this.schedulerJobRunnerReadService.findAllJobDeatils(); @@ -106,7 +106,7 @@ public class SchedulerJobApiResource { @Path("{" + SchedulerJobApiConstants.JOB_ID + "}") @Operation(summary = "Retrieve a Job", description = "Returns the details of a Job.\n" + "\n" + "Example Requests:\n" + "\n" + "jobs/5") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = SchedulerJobApiResourceSwagger.GetJobsResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SchedulerJobApiResourceSwagger.GetJobsResponse.class))) }) public String retrieveOne(@PathParam(SchedulerJobApiConstants.JOB_ID) @Parameter(description = "jobId") final Long jobId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(SchedulerJobApiConstants.SCHEDULER_RESOURCE_NAME); @@ -119,7 +119,7 @@ public class SchedulerJobApiResource { @Path("{" + SchedulerJobApiConstants.JOB_ID + "}/" + SchedulerJobApiConstants.JOB_RUN_HISTORY) @Operation(summary = "Retrieve Job Run History", description = "Example Requests:\n" + "\n" + "jobs/5/runhistory?offset=0&limit=200") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = SchedulerJobApiResourceSwagger.GetJobsJobIDJobRunHistoryResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SchedulerJobApiResourceSwagger.GetJobsJobIDJobRunHistoryResponse.class))) }) public String retrieveHistory(@Context final UriInfo uriInfo, @PathParam(SchedulerJobApiConstants.JOB_ID) @Parameter(description = "jobId") final Long jobId, @QueryParam("offset") @Parameter(description = "offset") final Integer offset, @@ -161,7 +161,7 @@ public class SchedulerJobApiResource { @Path("{" + SchedulerJobApiConstants.JOB_ID + "}") @Operation(summary = "Update a Job", description = "Updates the details of a job.") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = SchedulerJobApiResourceSwagger.PutJobsJobIDRequest.class))) - @ApiResponses({ @ApiResponse(responseCode = "200", description = "") }) + @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK") }) public String updateJobDetail(@PathParam(SchedulerJobApiConstants.JOB_ID) @Parameter(description = "jobId") final Long jobId, @Parameter(hidden = true) final String jsonRequestBody) { 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 577f47fbe..820ca2589 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 @@ -89,7 +89,7 @@ public class ReportMailingJobApiResource { + "\n" + "Optional Fields: " + "description, stretchyReportParamMap") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = ReportMailingJobApiResourceSwagger.PostReportMailingJobsRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = ReportMailingJobApiResourceSwagger.PostReportMailingJobsResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ReportMailingJobApiResourceSwagger.PostReportMailingJobsResponse.class))) }) public String createReportMailingJob(@Parameter(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandWrapper = new CommandWrapperBuilder() .createReportMailingJob(ReportMailingJobConstants.REPORT_MAILING_JOB_ENTITY_NAME).withJson(apiRequestBodyAsJson).build(); @@ -106,7 +106,7 @@ public class ReportMailingJobApiResource { @Operation(summary = "Update a Report Mailing Job\n", description = "") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = ReportMailingJobApiResourceSwagger.PutReportMailingJobsRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = ReportMailingJobApiResourceSwagger.PutReportMailingJobsResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ReportMailingJobApiResourceSwagger.PutReportMailingJobsResponse.class))) }) public String updateReportMailingJob(@PathParam("entityId") @Parameter(description = "entityId") final Long entityId, @Parameter(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandWrapper = new CommandWrapperBuilder() @@ -125,7 +125,7 @@ public class ReportMailingJobApiResource { @Operation(summary = "Delete a Report Mailing Job", description = "") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = ReportMailingJobApiResourceSwagger.DeleteReportMailingJobsRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = ReportMailingJobApiResourceSwagger.DeleteReportMailingJobsResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ReportMailingJobApiResourceSwagger.DeleteReportMailingJobsResponse.class))) }) public String deleteReportMailingJob(@PathParam("entityId") @Parameter(description = "entityId") final Long entityId, @Parameter(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandWrapper = new CommandWrapperBuilder() @@ -144,7 +144,7 @@ public class ReportMailingJobApiResource { @Operation(summary = "Retrieve a Report Mailing Job", description = "Example Requests:\n" + "\n" + "reportmailingjobs/1\n" + "\n" + "\n" + "reportmailingjobs/1?template=true") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = ReportMailingJobApiResourceSwagger.GetReportMailingJobsResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ReportMailingJobApiResourceSwagger.GetReportMailingJobsResponse.class))) }) public String retrieveReportMailingJob(@PathParam("entityId") @Parameter(description = "entityId") final Long entityId, @Context final UriInfo uriInfo) { this.platformSecurityContext.authenticatedUser() @@ -170,7 +170,7 @@ public class ReportMailingJobApiResource { @Operation(summary = "Retrieve Report Mailing Job Details Template", description = "This is a convenience resource. It can be useful when building maintenance user interface screens for report mailing job applications. The template data returned consists of any or all of:\n" + "\n" + "Field Defaults\n" + "Allowed description Lists\n" + "Example Request:\n" + "\n" + "reportmailingjobs/template") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = ReportMailingJobApiResourceSwagger.GetReportMailingJobsTemplate.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ReportMailingJobApiResourceSwagger.GetReportMailingJobsTemplate.class))) }) public String retrieveReportMailingJobTemplate(@Context final UriInfo uriInfo) { this.platformSecurityContext.authenticatedUser() .validateHasReadPermission(ReportMailingJobConstants.REPORT_MAILING_JOB_ENTITY_NAME); @@ -188,7 +188,7 @@ public class ReportMailingJobApiResource { @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "List Report Mailing Jobs", description = "Example Requests:\n" + "\n" + "reportmailingjobs") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(array = @ArraySchema(schema = @Schema(implementation = ReportMailingJobApiResourceSwagger.GetReportMailingJobsResponse.class)))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = ReportMailingJobApiResourceSwagger.GetReportMailingJobsResponse.class)))) }) public String retrieveAllReportMailingJobs(@Context final UriInfo uriInfo, @QueryParam("offset") @Parameter(description = "offset") final Integer offset, @QueryParam("limit") @Parameter(description = "limit") final Integer limit, diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/api/ReportMailingJobRunHistoryApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/api/ReportMailingJobRunHistoryApiResource.java index 9d9cb5b37..122ad2345 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/api/ReportMailingJobRunHistoryApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/api/ReportMailingJobRunHistoryApiResource.java @@ -73,7 +73,7 @@ public class ReportMailingJobRunHistoryApiResource { @Operation(summary = "List Report Mailing Job History", description = "The list capability of report mailing job history can support pagination and sorting.\n" + "\n" + "Example Requests:\n" + "\n" + "reportmailingjobrunhistory/1") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = ReportMailingJobRunHistoryData.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ReportMailingJobRunHistoryData.class))) }) public String retrieveAllByReportMailingJobId(@Context final UriInfo uriInfo, @QueryParam("reportMailingJobId") @Parameter(description = "reportMailingJobId") final Long reportMailingJobId, @QueryParam("offset") @Parameter(description = "offset") final Integer offset, diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/api/AuthenticationApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/api/AuthenticationApiResource.java index 977f44206..ce4ff6ea7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/api/AuthenticationApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/api/AuthenticationApiResource.java @@ -88,7 +88,7 @@ public class AuthenticationApiResource { @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Verify authentication", description = "Authenticates the credentials provided and returns the set roles and permissions allowed.") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = AuthenticationApiResourceSwagger.PostAuthenticationResponse.class))), + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = AuthenticationApiResourceSwagger.PostAuthenticationResponse.class))), @ApiResponse(responseCode = "400", description = "Unauthenticated. Please login") }) public String authenticate(final String apiRequestBodyAsJson) { // TODO FINERACT-819: sort out Jersey so JSON conversion does not have diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/api/UserDetailsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/api/UserDetailsApiResource.java index d6b7c97c6..05ce28b45 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/api/UserDetailsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/api/UserDetailsApiResource.java @@ -82,7 +82,7 @@ public class UserDetailsApiResource { @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Fetch authenticated user details\n", description = "checks the Authentication and returns the set roles and permissions allowed.") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = UserDetailsApiResourceSwagger.GetUserDetailsResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = UserDetailsApiResourceSwagger.GetUserDetailsResponse.class))) }) public String fetchAuthenticatedUserData( @QueryParam("access_token") @Parameter(description = "access_token") final String accessToken) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/LikelihoodApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/LikelihoodApiResource.java index 9f6dc577c..bc463cbd6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/LikelihoodApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/LikelihoodApiResource.java @@ -81,7 +81,7 @@ public class LikelihoodApiResource { @Path("{ppiName}/{likelihoodId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieve(@PathParam("likelihoodId") final Long likelihoodId) { + public String retrieve(@PathParam("likelihoodId") final Long likelihoodId, @PathParam("ppiName") final String ppiName) { this.context.authenticatedUser().validateHasReadPermission(PovertyLineApiConstants.POVERTY_LINE_RESOURCE_NAME); @@ -94,7 +94,8 @@ public class LikelihoodApiResource { @Path("{ppiName}/{likelihoodId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String update(@PathParam("likelihoodId") final Long likelihoodId, final String apiRequestBodyAsJson) { + public String update(@PathParam("likelihoodId") final Long likelihoodId, final String apiRequestBodyAsJson, + @PathParam("ppiName") final String ppiName) { this.context.authenticatedUser().validateHasReadPermission(PovertyLineApiConstants.POVERTY_LINE_RESOURCE_NAME); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/SurveyApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/SurveyApiResource.java index 573352705..da8e40b46 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/SurveyApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/SurveyApiResource.java @@ -87,7 +87,7 @@ public class SurveyApiResource { @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Retrieve surveys", description = "Retrieve surveys. This allows to retrieve the list of survey tables registered .") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(array = @ArraySchema(schema = @Schema(implementation = SurveyApiResourceSwagger.GetSurveyResponse.class)))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = SurveyApiResourceSwagger.GetSurveyResponse.class)))) }) public String retrieveSurveys() { this.context.authenticatedUser().validateHasReadPermission(SurveyApiConstants.SURVEY_RESOURCE_NAME); @@ -102,7 +102,7 @@ public class SurveyApiResource { @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Retrieve survey", description = "Lists a registered survey table details and the Apache Fineract Core application table they are registered to.") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = SurveyApiResourceSwagger.GetSurveyResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SurveyApiResourceSwagger.GetSurveyResponse.class))) }) public String retrieveSurvey(@PathParam("surveyName") @Parameter(description = "surveyName") final String surveyName) { this.context.authenticatedUser().validateHasReadPermission(SurveyApiConstants.SURVEY_RESOURCE_NAME); @@ -122,7 +122,7 @@ public class SurveyApiResource { + "Refer Link for sample Body: [ https://demo.fineract.dev/fineract-provider/api-docs/apiLive.htm#survey_create ] ") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = SurveyApiResourceSwagger.PostSurveySurveyNameApptableIdRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = SurveyApiResourceSwagger.PostSurveySurveyNameApptableIdResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SurveyApiResourceSwagger.PostSurveySurveyNameApptableIdResponse.class))) }) public String createDatatableEntry(@PathParam("surveyName") @Parameter(description = "surveyName") final String datatable, @PathParam("apptableId") @Parameter(description = "apptableId") final Long apptableId, final String apiRequestBodyAsJson) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/api/HolidaysApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/api/HolidaysApiResource.java index 8bf6cd67c..4a28dc072 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/api/HolidaysApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/api/HolidaysApiResource.java @@ -96,7 +96,7 @@ public class HolidaysApiResource { + "name, description, fromDate, toDate, repaymentsRescheduledTo, offices") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = HolidaysApiResourceSwagger.PostHolidaysRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = HolidaysApiResourceSwagger.PostHolidaysResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = HolidaysApiResourceSwagger.PostHolidaysResponse.class))) }) public String createNewHoliday(@Parameter(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createHoliday().withJson(apiRequestBodyAsJson).build(); @@ -114,7 +114,7 @@ public class HolidaysApiResource { + "\n" + "Only the active holidays are considered for rescheduling the loan repayment.") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = HolidaysApiResourceSwagger.PostHolidaysHolidayIdRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = HolidaysApiResourceSwagger.PostHolidaysHolidayIdResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = HolidaysApiResourceSwagger.PostHolidaysHolidayIdResponse.class))) }) public String handleCommands(@PathParam("holidayId") @Parameter(description = "holidayId") final Long holidayId, @QueryParam("command") @Parameter(description = "command") final String commandParam, @Parameter(hidden = true) final String apiRequestBodyAsJson) { @@ -145,7 +145,7 @@ public class HolidaysApiResource { @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Retrieve a Holiday", description = "Example Requests:\n" + "\n" + "holidays/1") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = HolidaysApiResourceSwagger.GetHolidaysResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = HolidaysApiResourceSwagger.GetHolidaysResponse.class))) }) public String retrieveOne(@PathParam("holidayId") @Parameter(description = "holidayId") final Long holidayId, @Context final UriInfo uriInfo) { @@ -165,7 +165,7 @@ public class HolidaysApiResource { @Operation(summary = "Update a Holiday", description = "If a holiday is in pending state (created and not activated) then all fields are allowed to modify. Once holidays become active only name and descriptions are allowed to modify.") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = HolidaysApiResourceSwagger.PutHolidaysHolidayIdRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = HolidaysApiResourceSwagger.PutHolidaysHolidayIdResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = HolidaysApiResourceSwagger.PutHolidaysHolidayIdResponse.class))) }) public String update(@PathParam("holidayId") @Parameter(description = "holidayId") final Long holidayId, @Parameter(hidden = true) final String jsonRequestBody) { @@ -182,7 +182,7 @@ public class HolidaysApiResource { @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Delete a Holiday", description = "This API allows to delete a holiday. This is a soft delete the deleted holiday status is marked as deleted.") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = HolidaysApiResourceSwagger.DeleteHolidaysHolidayIdResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = HolidaysApiResourceSwagger.DeleteHolidaysHolidayIdResponse.class))) }) public String delete(@PathParam("holidayId") @Parameter(description = "holidayId") final Long holidayId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteHoliday(holidayId).build(); final CommandProcessingResult result = this.commandsSourceWritePlatformService.logCommandSource(commandRequest); @@ -198,7 +198,7 @@ public class HolidaysApiResource { @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "List Holidays", description = "Example Requests:\n" + "\n" + "holidays?officeId=1") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(array = @ArraySchema(schema = @Schema(implementation = HolidaysApiResourceSwagger.GetHolidaysResponse.class)))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = HolidaysApiResourceSwagger.GetHolidaysResponse.class)))) }) public String retrieveAllHolidays(@Context final UriInfo uriInfo, @QueryParam("officeId") @Parameter(description = "officeId") final Long officeId, @QueryParam("fromDate") @Parameter(description = "fromDate") final DateParam fromDateParam, diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/monetary/api/CurrenciesApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/monetary/api/CurrenciesApiResource.java index 2294ba220..3a178b8f3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/monetary/api/CurrenciesApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/monetary/api/CurrenciesApiResource.java @@ -86,7 +86,7 @@ public class CurrenciesApiResource { @Operation(summary = "Retrieve Currency Configuration", description = "Returns the list of currencies permitted for use AND the list of currencies not selected (but available for selection).\n" + "\n" + "Example Requests:\n" + "\n" + "currencies\n" + "\n" + "\n" + "currencies?fields=selectedCurrencyOptions") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = CurrenciesApiResourceSwagger.GetCurrenciesResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CurrenciesApiResourceSwagger.GetCurrenciesResponse.class))) }) public String retrieveCurrencies(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -103,7 +103,7 @@ public class CurrenciesApiResource { @Operation(summary = "Update Currency Configuration", description = "Updates the list of currencies permitted for use.") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = CurrenciesApiResourceSwagger.PutCurrenciesRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = CurrenciesApiResourceSwagger.PutCurrenciesResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CurrenciesApiResourceSwagger.PutCurrenciesResponse.class))) }) public String updateCurrencies(@Parameter(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/api/OfficesApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/api/OfficesApiResource.java index dbbb3965f..0ecc5bb1f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/api/OfficesApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/api/OfficesApiResource.java @@ -108,7 +108,7 @@ public class OfficesApiResource { @Operation(summary = "List Offices", description = "Example Requests:\n" + "\n" + "offices\n" + "\n" + "\n" + "offices?fields=id,name,openingDate") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(array = @ArraySchema(schema = @Schema(implementation = OfficesApiResourceSwagger.GetOfficesResponse.class)))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = OfficesApiResourceSwagger.GetOfficesResponse.class)))) }) public String retrieveOffices(@Context final UriInfo uriInfo, @DefaultValue("false") @QueryParam("includeAllOffices") @Parameter(description = "includeAllOffices") final boolean onlyManualEntries, @QueryParam("orderBy") @Parameter(description = "orderBy") final String orderBy, @@ -131,7 +131,7 @@ public class OfficesApiResource { @Operation(summary = "Retrieve Office Details Template", description = "This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n" + "\n" + "Field Defaults\n" + "Allowed description Lists\n" + "Example Request:\n" + "\n" + "offices/template") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = OfficesApiResourceSwagger.GetOfficesTemplateResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = OfficesApiResourceSwagger.GetOfficesTemplateResponse.class))) }) public String retrieveOfficeTemplate(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -151,7 +151,7 @@ public class OfficesApiResource { @Operation(summary = "Create an Office", description = "Mandatory Fields\n" + "name, openingDate, parentId") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = OfficesApiResourceSwagger.PostOfficesRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = OfficesApiResourceSwagger.PostOfficesResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = OfficesApiResourceSwagger.PostOfficesResponse.class))) }) public String createOffice(@Parameter(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // @@ -171,7 +171,7 @@ public class OfficesApiResource { @Operation(summary = "Retrieve an Office", description = "Example Requests:\n" + "\n" + "offices/1\n" + "\n" + "\n" + "offices/1?template=true\n" + "\n" + "\n" + "offices/1?fields=id,name,parentName") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = OfficesApiResourceSwagger.GetOfficesResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = OfficesApiResourceSwagger.GetOfficesResponse.class))) }) public String retreiveOffice(@PathParam("officeId") @Parameter(description = "officeId") final Long officeId, @Context final UriInfo uriInfo) { @@ -195,7 +195,7 @@ public class OfficesApiResource { @Operation(summary = "Update Office", description = "") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = OfficesApiResourceSwagger.PutOfficesOfficeIdRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = OfficesApiResourceSwagger.PutOfficesOfficeIdResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = OfficesApiResourceSwagger.PutOfficesOfficeIdResponse.class))) }) public String updateOffice(@PathParam("officeId") @Parameter(description = "officeId") final Long officeId, @Parameter(hidden = true) final String apiRequestBodyAsJson) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/api/ProvisioningCriteriaApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/api/ProvisioningCriteriaApiResource.java index 762831c25..ea21f8a9b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/api/ProvisioningCriteriaApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/api/ProvisioningCriteriaApiResource.java @@ -112,7 +112,7 @@ public class ProvisioningCriteriaApiResource { @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Retrieves a Provisioning Criteria", description = "Retrieves a Provisioning Criteria") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = ProvisioningCriteriaApiResourceSwagger.GetProvisioningCriteriaCriteriaIdResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ProvisioningCriteriaApiResourceSwagger.GetProvisioningCriteriaCriteriaIdResponse.class))) }) public String retrieveProvisioningCriteria(@PathParam("criteriaId") @Parameter(description = "criteriaId") final Long criteriaId, @Context final UriInfo uriInfo) { platformSecurityContext.authenticatedUser(); @@ -129,7 +129,7 @@ public class ProvisioningCriteriaApiResource { @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Retrieves all created Provisioning Criterias", description = "Retrieves all created Provisioning Criterias") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(array = @ArraySchema(schema = @Schema(implementation = ProvisioningCriteriaApiResourceSwagger.GetProvisioningCriteriaResponse.class)))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = ProvisioningCriteriaApiResourceSwagger.GetProvisioningCriteriaResponse.class)))) }) public String retrieveAllProvisioningCriterias(@Context final UriInfo uriInfo) { platformSecurityContext.authenticatedUser(); Collection data = this.provisioningCriteriaReadPlatformService.retrieveAllProvisioningCriterias(); @@ -144,7 +144,7 @@ public class ProvisioningCriteriaApiResource { + "Mandatory Fields: \n" + "criteriaName\n" + "provisioningcriteria\n" + "\n" + "Optional Fields: \n" + "loanProducts") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = ProvisioningCriteriaApiResourceSwagger.PostProvisioningCriteriaRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = ProvisioningCriteriaApiResourceSwagger.PostProvisioningCriteriaResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ProvisioningCriteriaApiResourceSwagger.PostProvisioningCriteriaResponse.class))) }) public String createProvisioningCriteria(@Parameter(hidden = true) final String apiRequestBodyAsJson) { CommandWrapper commandWrapper = null; this.platformSecurityContext.authenticatedUser(); @@ -161,7 +161,7 @@ public class ProvisioningCriteriaApiResource { + "Optional Fields\n" + "criteriaName, loanProducts, provisioningcriteria") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = ProvisioningCriteriaApiResourceSwagger.PutProvisioningCriteriaRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = ProvisioningCriteriaApiResourceSwagger.PutProvisioningCriteriaResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ProvisioningCriteriaApiResourceSwagger.PutProvisioningCriteriaResponse.class))) }) public String updateProvisioningCriteria(@PathParam("criteriaId") @Parameter(description = "criteriaId") final Long criteriaId, @Parameter(hidden = true) final String apiRequestBodyAsJson) { this.platformSecurityContext.authenticatedUser(); @@ -177,7 +177,7 @@ public class ProvisioningCriteriaApiResource { @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Deletes Provisioning Criteria", description = "Deletes Provisioning Criteria") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = ProvisioningCriteriaApiResourceSwagger.DeleteProvisioningCriteriaResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ProvisioningCriteriaApiResourceSwagger.DeleteProvisioningCriteriaResponse.class))) }) public String deleteProvisioningCriteria(@PathParam("criteriaId") @Parameter(description = "criteriaId") final Long criteriaId) { this.platformSecurityContext.authenticatedUser(); final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteProvisioningCriteria(criteriaId).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/api/StaffApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/api/StaffApiResource.java index 3cf873217..dc1f190d3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/api/StaffApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/api/StaffApiResource.java @@ -115,7 +115,7 @@ public class StaffApiResource { + "and for status=ALL, it Returns both ACTIVE and INACTIVE Staff.\n" + "\n" + "Example Requests:\n" + "\n" + "staff?status=active") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(array = @ArraySchema(schema = @Schema(implementation = StaffApiResourceSwagger.GetStaffResponse.class)))), + @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = StaffApiResourceSwagger.GetStaffResponse.class)))), @ApiResponse(responseCode = "200", description = "GET https://DomainName/api/v1/staff?status={ACTIVE|INACTIVE|ALL}", content = @Content(schema = @Schema(implementation = StaffApiResourceSwagger.GetStaffResponse.class))) }) public String retrieveStaff(@Context final UriInfo uriInfo, @QueryParam("sqlSearch") @Parameter(description = "sqlSearch") final String sqlSearch, @@ -144,7 +144,7 @@ public class StaffApiResource { + "officeId, firstname, lastname\n" + "\n" + "Optional Fields: \n" + "isLoanOfficer, isActive") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = StaffApiResourceSwagger.PostStaffRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = StaffApiResourceSwagger.PostStaffResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = StaffApiResourceSwagger.PostStaffResponse.class))) }) public String createStaff(@Parameter(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createStaff().withJson(apiRequestBodyAsJson).build(); @@ -161,7 +161,7 @@ public class StaffApiResource { @Operation(summary = "Retrieve a Staff Member", description = "Returns the details of a Staff Member.\n" + "\n" + "Example Requests:\n" + "\n" + "staff/1") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = StaffApiResourceSwagger.GetStaffResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = StaffApiResourceSwagger.GetStaffResponse.class))) }) public String retreiveStaff(@PathParam("staffId") @Parameter(description = "staffId") final Long staffId, @Context final UriInfo uriInfo) { @@ -184,7 +184,7 @@ public class StaffApiResource { @Operation(summary = "Update a Staff Member", description = "Updates the details of a staff member.") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = StaffApiResourceSwagger.PutStaffRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = StaffApiResourceSwagger.PutStaffResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = StaffApiResourceSwagger.PutStaffResponse.class))) }) public String updateStaff(@PathParam("staffId") @Parameter(description = "staffId") final Long staffId, @Parameter(hidden = true) final String apiRequestBodyAsJson) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/api/TellerApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/api/TellerApiResource.java index ff22bac5a..6edc86167 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/api/TellerApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/api/TellerApiResource.java @@ -89,7 +89,7 @@ public class TellerApiResource { @Produces(MediaType.APPLICATION_JSON) @Operation(summary = "List all tellers", description = "Retrieves list tellers") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(array = @ArraySchema(schema = @Schema(implementation = TellerApiResourceSwagger.GetTellersResponse.class)))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = TellerApiResourceSwagger.GetTellersResponse.class)))) }) public String getTellerData(@QueryParam("officeId") @Parameter(description = "officeId") final Long officeId) { final Collection foundTellers = this.readPlatformService.getTellers(officeId); @@ -102,7 +102,7 @@ public class TellerApiResource { @Produces(MediaType.APPLICATION_JSON) @Operation(summary = "Retrieve tellers", description = "") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.GetTellersResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.GetTellersResponse.class))) }) public String findTeller(@PathParam("tellerId") @Parameter(description = "tellerId") final Long tellerId) { final TellerData teller = this.readPlatformService.findTeller(tellerId); @@ -116,7 +116,7 @@ public class TellerApiResource { + "Optional Fields\n" + "End Date") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PostTellersRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PostTellersResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PostTellersResponse.class))) }) public String createTeller(@Parameter(hidden = true) final String tellerData) { final CommandWrapper request = new CommandWrapperBuilder().createTeller().withJson(tellerData).build(); @@ -132,7 +132,7 @@ public class TellerApiResource { @Operation(summary = "Update teller", description = "") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PutTellersRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PutTellersResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PutTellersResponse.class))) }) public String updateTeller(@PathParam("tellerId") @Parameter(description = "tellerId") final Long tellerId, @Parameter(hidden = true) final String tellerData) { final CommandWrapper request = new CommandWrapperBuilder().updateTeller(tellerId).withJson(tellerData).build(); @@ -160,7 +160,7 @@ public class TellerApiResource { @Produces(MediaType.APPLICATION_JSON) @Operation(summary = "List Cashiers", description = "") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.GetTellersTellerIdCashiersResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.GetTellersTellerIdCashiersResponse.class))) }) public String getCashierData(@PathParam("tellerId") @Parameter(description = "tellerId") final Long tellerId, @QueryParam("fromdate") @Parameter(description = "fromdate") final String fromDateStr, @QueryParam("todate") @Parameter(description = "todate") final String toDateStr) { @@ -188,7 +188,7 @@ public class TellerApiResource { @Produces(MediaType.APPLICATION_JSON) @Operation(summary = "Retrieve a cashier", description = "") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.GetTellersTellerIdCashiersCashierIdResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.GetTellersTellerIdCashiersCashierIdResponse.class))) }) public String findCashierData(@PathParam("tellerId") @Parameter(description = "tellerId") final Long tellerId, @PathParam("cashierId") @Parameter(description = "cashierId") final Long cashierId) { final CashierData cashier = this.readPlatformService.findCashier(cashierId); @@ -202,7 +202,7 @@ public class TellerApiResource { @Produces(MediaType.APPLICATION_JSON) @Operation(summary = "Find Cashiers", description = "") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.GetTellersTellerIdCashiersTemplateResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.GetTellersTellerIdCashiersTemplateResponse.class))) }) public String getCashierTemplate(@PathParam("tellerId") @Parameter(description = "tellerId") final Long tellerId) { final TellerData teller = this.readPlatformService.findTeller(tellerId); @@ -222,7 +222,7 @@ public class TellerApiResource { + "Description/Notes") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PostTellersTellerIdCashiersRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PostTellersTellerIdCashiersResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PostTellersTellerIdCashiersResponse.class))) }) public String createCashier(@PathParam("tellerId") @Parameter(description = "tellerId") final Long tellerId, @Parameter(hidden = true) final String cashierData) { final CommandWrapper request = new CommandWrapperBuilder().allocateTeller(tellerId).withJson(cashierData).build(); @@ -239,7 +239,7 @@ public class TellerApiResource { @Operation(summary = "Update Cashier", description = "") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PutTellersTellerIdCashiersCashierIdRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PutTellersTellerIdCashiersCashierIdResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PutTellersTellerIdCashiersCashierIdResponse.class))) }) public String updateCashier(@PathParam("tellerId") @Parameter(description = "tellerId") final Long tellerId, @PathParam("cashierId") @Parameter(description = "cashierId") final Long cashierId, @Parameter(hidden = true) final String cashierDate) { @@ -257,7 +257,7 @@ public class TellerApiResource { @Produces(MediaType.APPLICATION_JSON) @Operation(summary = "Delete Cashier", description = "") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.DeleteTellersTellerIdCashiersCashierIdResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.DeleteTellersTellerIdCashiersCashierIdResponse.class))) }) public String deleteCashier(@PathParam("tellerId") @Parameter(description = "tellerId") final Long tellerId, @PathParam("cashierId") @Parameter(description = "cashierId") final Long cashierId) { final CommandWrapper request = new CommandWrapperBuilder().deleteAllocationTeller(tellerId, cashierId).build(); @@ -274,7 +274,7 @@ public class TellerApiResource { @Operation(summary = "Allocate Cash To Cashier", description = "Mandatory Fields: \n" + "Date, Amount, Currency, Notes/Comments") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PostTellersTellerIdCashiersCashierIdAllocateRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PostTellersTellerIdCashiersCashierIdAllocateResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PostTellersTellerIdCashiersCashierIdAllocateResponse.class))) }) public String allocateCashToCashier(@PathParam("tellerId") @Parameter(description = "tellerId") final Long tellerId, @PathParam("cashierId") @Parameter(description = "cashierId") final Long cashierId, @Parameter(hidden = true) final String cashierTxnData) { @@ -294,7 +294,7 @@ public class TellerApiResource { @Operation(summary = "Settle Cash From Cashier", description = "Mandatory Fields\n" + "Date, Amount, Currency, Notes/Comments") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PostTellersTellerIdCashiersCashierIdSettleRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PostTellersTellerIdCashiersCashierIdSettleResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PostTellersTellerIdCashiersCashierIdSettleResponse.class))) }) public String settleCashFromCashier(@PathParam("tellerId") @Parameter(description = "tellerId") final Long tellerId, @PathParam("cashierId") @Parameter(description = "cashierId") final Long cashierId, @Parameter(hidden = true) final String cashierTxnData) { @@ -313,7 +313,7 @@ public class TellerApiResource { @Produces(MediaType.APPLICATION_JSON) @Operation(summary = "Retrieve Cashier Transaction", description = "") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(array = @ArraySchema(schema = @Schema(implementation = TellerApiResourceSwagger.GetTellersTellerIdCashiersCashiersIdTransactionsResponse.class)))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = TellerApiResourceSwagger.GetTellersTellerIdCashiersCashiersIdTransactionsResponse.class)))) }) public String getTransactionsForCashier(@PathParam("tellerId") @Parameter(description = "tellerId") final Long tellerId, @PathParam("cashierId") @Parameter(description = "cashierId") final Long cashierId, @QueryParam("currencyCode") @Parameter(description = "currencyCode") final String currencyCode, @@ -339,7 +339,7 @@ public class TellerApiResource { @Produces(MediaType.APPLICATION_JSON) @Operation(summary = "Transactions Wtih Summary For Cashier", description = "") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.GetTellersTellerIdCashiersCashiersIdSummaryAndTransactionsResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.GetTellersTellerIdCashiersCashiersIdSummaryAndTransactionsResponse.class))) }) public String getTransactionsWtihSummaryForCashier(@PathParam("tellerId") @Parameter(description = "tellerId") final Long tellerId, @PathParam("cashierId") @Parameter(description = "cashierId") final Long cashierId, @QueryParam("currencyCode") @Parameter(description = "currencyCode") final String currencyCode, @@ -367,7 +367,7 @@ public class TellerApiResource { @Produces(MediaType.APPLICATION_JSON) @Operation(summary = "Retrieve Cashier Transaction Template", description = "") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.GetTellersTellerIdCashiersCashiersIdTransactionsTemplateResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.GetTellersTellerIdCashiersCashiersIdTransactionsTemplateResponse.class))) }) public String getCashierTxnTemplate(@PathParam("tellerId") @Parameter(description = "tellerId") final Long tellerId, @PathParam("cashierId") @Parameter(description = "cashierId") final Long cashierId) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/api/WorkingDaysApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/api/WorkingDaysApiResource.java index 99cf2f7eb..05335882d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/api/WorkingDaysApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/api/WorkingDaysApiResource.java @@ -82,7 +82,7 @@ public class WorkingDaysApiResource { @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "List Working days", description = "Example Requests:\n" + "\n" + "workingdays") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(array = @ArraySchema(schema = @Schema(implementation = WorkingDaysApiResourceSwagger.GetWorkingDaysResponse.class)))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = WorkingDaysApiResourceSwagger.GetWorkingDaysResponse.class)))) }) public String retrieveAll(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(WorkingDaysApiConstants.WORKING_DAYS_RESOURCE_NAME); final WorkingDaysData workingDaysData = this.workingDaysReadPlatformService.retrieve(); @@ -98,7 +98,7 @@ public class WorkingDaysApiResource { + "recurrence,repaymentRescheduleType,extendTermForDailyRepayments,locale") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = WorkingDaysApiResourceSwagger.PutWorkingDaysRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = WorkingDaysApiResourceSwagger.PutWorkingDaysResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = WorkingDaysApiResourceSwagger.PutWorkingDaysResponse.class))) }) public String update(@Parameter(hidden = true) final String jsonRequestBody) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateWorkingDays().withJson(jsonRequestBody).build(); @@ -115,7 +115,7 @@ public class WorkingDaysApiResource { @Operation(summary = "Working Days Template", description = "This is a convenience resource. It can be useful when building maintenance user interface screens for working days.\n" + "\n" + "Example Request:\n" + "\n" + "workingdays/template") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = WorkingDaysApiResourceSwagger.GetWorkingDaysTemplateResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = WorkingDaysApiResourceSwagger.GetWorkingDaysTemplateResponse.class))) }) public String template(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(WorkingDaysApiConstants.WORKING_DAYS_RESOURCE_NAME); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/api/AccountsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/api/AccountsApiResource.java index 3bdeb995a..f66032f6c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/api/AccountsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/api/AccountsApiResource.java @@ -237,7 +237,8 @@ public class AccountsApiResource { @Path("downloadtemplate") @Produces("application/vnd.ms-excel") public Response getSharedAccountsTemplate(@QueryParam("officeId") final Long officeId, - @QueryParam("dateFormat") final String dateFormat) { + @QueryParam("dateFormat") final String dateFormat, + @PathParam("type") @Parameter(description = "type") final String accountType) { return bulkImportWorkbookPopulatorService.getTemplate(GlobalEntityType.SHARE_ACCOUNTS.toString(), officeId, null, dateFormat); } @@ -246,7 +247,8 @@ public class AccountsApiResource { @Consumes(MediaType.MULTIPART_FORM_DATA) public String postSharedAccountsTemplate(@FormDataParam("file") InputStream uploadedInputStream, @FormDataParam("file") FormDataContentDisposition fileDetail, @FormDataParam("locale") final String locale, - @FormDataParam("dateFormat") final String dateFormat) { + @FormDataParam("dateFormat") final String dateFormat, + @PathParam("type") @Parameter(description = "type") final String accountType) { final Long importDocumentId = this.bulkImportWorkbookService.importWorkbook(GlobalEntityType.SHARE_ACCOUNTS.toString(), uploadedInputStream, fileDetail, locale, dateFormat); return this.toApiJsonSerializer.serialize(importDocumentId); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/api/CalendarsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/api/CalendarsApiResource.java index 5f3ace4a8..adf6cbefb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/api/CalendarsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/api/CalendarsApiResource.java @@ -162,7 +162,8 @@ public class CalendarsApiResource { @Path("template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveNewCalendarDetails(@Context final UriInfo uriInfo) { + public String retrieveNewCalendarDetails(@Context final UriInfo uriInfo, @PathParam("entityType") final String entityType, + @PathParam("entityId") final Long entityId) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientChargesApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientChargesApiResource.java index 03b6a03ff..4a9e2e162 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientChargesApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientChargesApiResource.java @@ -132,7 +132,8 @@ public class ClientChargesApiResource { @Path("template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String retrieveTemplate(@Context final UriInfo uriInfo) { + public String retrieveTemplate(@Context final UriInfo uriInfo, + @PathParam("clientId") @Parameter(description = "clientId") final Long clientId) { this.context.authenticatedUser().validateHasReadPermission(ClientApiConstants.CLIENT_CHARGES_RESOURCE_NAME); @@ -151,7 +152,7 @@ public class ClientChargesApiResource { @Operation(summary = "Retrieve a Client Charge", description = "Example Requests:\n" + "clients/1/charges/1\n" + "\n" + "\n" + "clients/1/charges/1?fields=name,id") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = ClientChargesApiResourceSwagger.GetClientsClientIdChargesResponse.GetClientsChargesPageItems.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientChargesApiResourceSwagger.GetClientsClientIdChargesResponse.GetClientsChargesPageItems.class))) }) public String retrieveClientCharge(@PathParam("clientId") @Parameter(description = "clientId") final Long clientId, @PathParam("chargeId") @Parameter(description = "chargeId") final Long chargeId, @Context final UriInfo uriInfo) { @@ -183,7 +184,7 @@ public class ClientChargesApiResource { + "Mandatory Fields : \n" + "chargeId and dueDate \n" + "Optional Fields : \n" + "amount") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = ClientChargesApiResourceSwagger.PostClientsClientIdChargesRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = ClientChargesApiResourceSwagger.PostClientsClientIdChargesResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientChargesApiResourceSwagger.PostClientsClientIdChargesResponse.class))) }) public String applyClientCharge(@PathParam("clientId") @Parameter(description = "clientId") final Long clientId, @Parameter(hidden = true) final String apiRequestBodyAsJson) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientFamilyMembersApiResources.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientFamilyMembersApiResources.java index b3c897b33..046627d02 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientFamilyMembersApiResources.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientFamilyMembersApiResources.java @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.client.api; +import io.swagger.v3.oas.annotations.Parameter; import java.util.Arrays; import java.util.Collection; import java.util.HashSet; @@ -80,7 +81,8 @@ public class ClientFamilyMembersApiResources { @Path("/{familyMemberId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String getFamilyMember(@Context final UriInfo uriInfo, @PathParam("familyMemberId") final Long familyMemberId) { + public String getFamilyMember(@Context final UriInfo uriInfo, @PathParam("familyMemberId") final Long familyMemberId, + @PathParam("clientId") @Parameter(description = "clientId") final Long clientId) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -124,7 +126,8 @@ public class ClientFamilyMembersApiResources { @Path("/{familyMemberId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String updateClientFamilyMembers(@PathParam("familyMemberId") final long familyMemberId, final String apiRequestBodyAsJson) { + public String updateClientFamilyMembers(@PathParam("familyMemberId") final long familyMemberId, final String apiRequestBodyAsJson, + @PathParam("clientId") @Parameter(description = "clientId") final Long clientId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateFamilyMembers(familyMemberId).withJson(apiRequestBodyAsJson) .build(); @@ -150,7 +153,8 @@ public class ClientFamilyMembersApiResources { @Path("/{familyMemberId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String deleteClientFamilyMembers(@PathParam("familyMemberId") final long familyMemberId, final String apiRequestBodyAsJson) { + public String deleteClientFamilyMembers(@PathParam("familyMemberId") final long familyMemberId, final String apiRequestBodyAsJson, + @PathParam("clientId") @Parameter(description = "clientId") final Long clientId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteFamilyMembers(familyMemberId).withJson(apiRequestBodyAsJson) .build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientIdentifiersApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientIdentifiersApiResource.java index 6babb0c09..0838c4223 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientIdentifiersApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientIdentifiersApiResource.java @@ -124,7 +124,8 @@ public class ClientIdentifiersApiResource { + "\n" + " Field Defaults\n" + " Allowed description Lists\n" + "\n\nExample Request:\n" + "clients/1/identifiers/template") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientIdentifiersApiResourceSwagger.GetClientsClientIdIdentifiersTemplateResponse.class))) }) - public String newClientIdentifierDetails(@Context final UriInfo uriInfo) { + public String newClientIdentifierDetails(@Context final UriInfo uriInfo, + @PathParam("clientId") @Parameter(description = "clientId") final Long clientId) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/api/CollateralsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/api/CollateralsApiResource.java index c612dffc2..705b6e774 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/api/CollateralsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/api/CollateralsApiResource.java @@ -98,7 +98,8 @@ public class CollateralsApiResource { + "\n" + "Field Defaults\n" + "Allowed Value Lists\n" + "Example Request:\n" + "\n" + "loans/1/collaterals/template") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CollateralsApiResourceSwagger.GetLoansLoanIdCollateralsTemplateResponse.class))) }) - public String newCollateralTemplate(@Context final UriInfo uriInfo) { + public String newCollateralTemplate(@Context final UriInfo uriInfo, + @PathParam("loanId") @Parameter(description = "loanId") final Long loanId) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermission); this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermission); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/api/InterestRateChartSlabsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/api/InterestRateChartSlabsApiResource.java index ea1e0bd60..61046faec 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/api/InterestRateChartSlabsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/api/InterestRateChartSlabsApiResource.java @@ -101,7 +101,7 @@ public class InterestRateChartSlabsApiResource { @Path("template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String template(@Context final UriInfo uriInfo) { + public String template(@Context final UriInfo uriInfo, @PathParam("chartId") @Parameter(description = "chartId") final Long chartId) { InterestRateChartSlabData chartSlab = this.interestRateChartSlabReadPlatformService.retrieveTemplate(); final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters()); return this.toApiJsonSerializer.serialize(settings, chartSlab, INTERESTRATE_CHART_SLAB_RESPONSE_DATA_PARAMETERS); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/api/GuarantorsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/api/GuarantorsApiResource.java index 9cd33f1e9..ddd517449 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/api/GuarantorsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/api/GuarantorsApiResource.java @@ -120,7 +120,7 @@ public class GuarantorsApiResource { @Path("template") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - public String newGuarantorTemplate(@Context final UriInfo uriInfo) { + public String newGuarantorTemplate(@Context final UriInfo uriInfo, @PathParam("loanId") final Long loanId) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermission); final List guarantorTypeOptions = GuarantorEnumerations.guarantorType(GuarantorType.values()); @@ -231,7 +231,8 @@ public class GuarantorsApiResource { @GET @Path("downloadtemplate") @Produces("application/vnd.ms-excel") - public Response getGuarantorTemplate(@QueryParam("officeId") final Long officeId, @QueryParam("dateFormat") final String dateFormat) { + public Response getGuarantorTemplate(@QueryParam("officeId") final Long officeId, @QueryParam("dateFormat") final String dateFormat, + @PathParam("loanId") final Long loanId) { return bulkImportWorkbookPopulatorService.getTemplate(GlobalEntityType.GUARANTORS.toString(), officeId, null, dateFormat); } @@ -240,7 +241,7 @@ public class GuarantorsApiResource { @Consumes(MediaType.MULTIPART_FORM_DATA) public String postGuarantorTemplate(@FormDataParam("file") InputStream uploadedInputStream, @FormDataParam("file") FormDataContentDisposition fileDetail, @FormDataParam("locale") final String locale, - @FormDataParam("dateFormat") final String dateFormat) { + @FormDataParam("dateFormat") final String dateFormat, @PathParam("loanId") final Long loanId) { final Long importDocumentId = this.bulkImportWorkbookService.importWorkbook(GlobalEntityType.GUARANTORS.toString(), uploadedInputStream, fileDetail, locale, dateFormat); return this.apiJsonSerializerService.serialize(importDocumentId); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/search/api/SearchApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/search/api/SearchApiResource.java index c401ad5ee..4282ce808 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/search/api/SearchApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/search/api/SearchApiResource.java @@ -83,7 +83,7 @@ public class SearchApiResource { @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Retrive Adhoc Search query template", description = "Mandatory Fields\n" + "\n" + "search?query=000000001\n") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = SearchApiResourceSwagger.GetSearchResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SearchApiResourceSwagger.GetSearchResponse.class))) }) public String retrieveAdHocSearchQueryTemplate(@Context final UriInfo uriInfo) { final AdHocSearchQueryData templateData = this.searchReadPlatformService.retrieveAdHocQueryTemplate(); @@ -98,7 +98,7 @@ public class SearchApiResource { @Operation(summary = "Search Resources", description = "Example Requests:\n" + "\n" + "search?query=000000001\n" + "\n" + "\n" + "search?query=Petra&resource=clients,groups\n" + "\n" + "\n" + "search?query=Petra&resource=clients,groups&exactMatch=true") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = SearchApiResourceSwagger.GetSearchResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SearchApiResourceSwagger.GetSearchResponse.class))) }) public String searchData(@Context final UriInfo uriInfo, @QueryParam("query") @Parameter(description = "query") final String query, @QueryParam("resource") @Parameter(description = "resource") final String resource, @DefaultValue("false") @QueryParam("exactMatch") @Parameter(description = "exactMatch") Boolean exactMatch) { @@ -124,7 +124,7 @@ public class SearchApiResource { + "minOutstandingAmount and maxOutstandingAmount OR outstandingAmount") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = SearchApiResourceSwagger.PostAdhocQuerySearchRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = SearchApiResourceSwagger.PostAdhocQuerySearchResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SearchApiResourceSwagger.PostAdhocQuerySearchResponse.class))) }) public String advancedSearch(@Context final UriInfo uriInfo, final String json) { final AdHocQuerySearchConditions searchConditions = this.fromApiJsonDeserializer.retrieveSearchConditions(json); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/api/ShareDividendApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/api/ShareDividendApiResource.java index d3a6bd55a..b7abf0ca7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/api/ShareDividendApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/api/ShareDividendApiResource.java @@ -97,7 +97,8 @@ public class ShareDividendApiResource { @Produces({ MediaType.APPLICATION_JSON }) public String retrieveDividendDetails(@PathParam("dividendId") final Long dividendId, @QueryParam("offset") final Integer offset, @QueryParam("limit") final Integer limit, @QueryParam("orderBy") final String orderBy, - @QueryParam("sortOrder") final String sortOrder, @QueryParam("accountNo") final String accountNo) { + @QueryParam("sortOrder") final String sortOrder, @QueryParam("accountNo") final String accountNo, + @PathParam("productId") final Long productId) { this.platformSecurityContext.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); final SearchParameters searchParameters = SearchParameters.forPaginationAndAccountNumberSearch(offset, limit, orderBy, sortOrder, diff --git a/fineract-provider/src/main/java/org/apache/fineract/spm/api/LookupTableApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/spm/api/LookupTableApiResource.java index 42de2eb36..d3f9a99fd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/spm/api/LookupTableApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/spm/api/LookupTableApiResource.java @@ -74,7 +74,7 @@ public class LookupTableApiResource { @Transactional @Operation(summary = "List all Lookup Table entries", description = "List all Lookup Table entries for a survey.") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(array = @ArraySchema(schema = @Schema(implementation = LookupTableData.class)))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = LookupTableData.class)))) }) public List fetchLookupTables(@PathParam("surveyId") @Parameter(description = "Enter surveyId") final Long surveyId) { this.securityContext.authenticatedUser(); @@ -96,7 +96,7 @@ public class LookupTableApiResource { @Transactional @Operation(summary = "Retrieve a Lookup Table entry", description = "Retrieve a Lookup Table entry for a survey.") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = LookupTableData.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LookupTableData.class))) }) public LookupTableData findLookupTable(@PathParam("surveyId") @Parameter(description = "Enter surveyId") final Long surveyId, @PathParam("key") @Parameter(description = "Enter key") final String key) { this.securityContext.authenticatedUser(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/spm/api/ScorecardApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/spm/api/ScorecardApiResource.java index 3a93417d6..329d99ccc 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/spm/api/ScorecardApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/spm/api/ScorecardApiResource.java @@ -81,7 +81,7 @@ public class ScorecardApiResource { @Transactional @Operation(summary = "List all Scorecard entries", description = "List all Scorecard entries for a survey.") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Scorecard.class)))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = Scorecard.class)))) }) public List findBySurvey(@PathParam("surveyId") @Parameter(description = "Enter surveyId") final Long surveyId) { this.securityContext.authenticatedUser(); this.spmService.findById(surveyId); diff --git a/fineract-provider/src/main/java/org/apache/fineract/spm/api/SpmApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/spm/api/SpmApiResource.java index 254f94494..539ab3552 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/spm/api/SpmApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/spm/api/SpmApiResource.java @@ -72,7 +72,7 @@ public class SpmApiResource { @Transactional @Operation(summary = "List all Surveys", description = "") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(array = @ArraySchema(schema = @Schema(implementation = SurveyData.class)))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = SurveyData.class)))) }) public List fetchAllSurveys(@QueryParam("isActive") final Boolean isActive) { this.securityContext.authenticatedUser(); final List result = new ArrayList<>(); @@ -97,7 +97,7 @@ public class SpmApiResource { @Transactional @Operation(summary = "Retrieve a Survey", description = "") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = SurveyData.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SurveyData.class))) }) public SurveyData findSurvey(@PathParam("id") @Parameter(description = "Enter id") final Long id) { this.securityContext.authenticatedUser(); final Survey survey = this.spmService.findById(id); diff --git a/fineract-provider/src/main/java/org/apache/fineract/template/api/TemplatesApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/template/api/TemplatesApiResource.java index 92bb0c5e2..05b32dc04 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/template/api/TemplatesApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/template/api/TemplatesApiResource.java @@ -115,7 +115,7 @@ public class TemplatesApiResource { + "[Entity: Id]\n\n\n\n" + "\n\n" + "client: 0, loan: 1" + "\n\n" + "[Type: Id]\n\n\n\n" + "Document: 0, E-Mail (not yet): 1, SMS: 2") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = TemplatesApiResourcesSwagger.GetTemplatesResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TemplatesApiResourcesSwagger.GetTemplatesResponse.class))) }) public String retrieveAll(@DefaultValue("-1") @QueryParam("typeId") @Parameter(description = "typeId") final int typeId, @DefaultValue("-1") @QueryParam("entityId") @Parameter(description = "entityId") final int entityId, @Context final UriInfo uriInfo) { @@ -142,7 +142,7 @@ public class TemplatesApiResource { + "\n" + "ARGUMENTS\n" + "name String entity String type String text String optional mappers Mapper optional\n" + "Example Request:\n" + "\n" + "templates/template") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = TemplatesApiResourcesSwagger.GetTemplatesTemplateResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TemplatesApiResourcesSwagger.GetTemplatesTemplateResponse.class))) }) public String template(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermission); @@ -158,7 +158,7 @@ public class TemplatesApiResource { + "Example Requests:\n" + "\n" + "templates/1") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = TemplatesApiResourcesSwagger.PostTemplatesRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = TemplatesApiResourcesSwagger.PostTemplatesResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TemplatesApiResourcesSwagger.PostTemplatesResponse.class))) }) public String createTemplate(@Parameter(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createTemplate().withJson(apiRequestBodyAsJson).build(); @@ -171,7 +171,7 @@ public class TemplatesApiResource { @Path("{templateId}") @Operation(summary = "Retrieve a UGD", description = "Example Requests:\n" + "\n" + "templates/1") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = TemplatesApiResourcesSwagger.GetTemplatesTemplateIdResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TemplatesApiResourcesSwagger.GetTemplatesTemplateIdResponse.class))) }) public String retrieveOne(@PathParam("templateId") @Parameter(description = "templateId") final Long templateId, @Context final UriInfo uriInfo) { @@ -200,7 +200,7 @@ public class TemplatesApiResource { @Operation(summary = "Update a UGD", description = "") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = TemplatesApiResourcesSwagger.PutTemplatesTemplateIdRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = TemplatesApiResourcesSwagger.PutTemplatesTemplateIdResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TemplatesApiResourcesSwagger.PutTemplatesTemplateIdResponse.class))) }) public String saveTemplate(@PathParam("templateId") @Parameter(description = "templateId") final Long templateId, @Parameter(hidden = true) final String apiRequestBodyAsJson) { @@ -215,7 +215,7 @@ public class TemplatesApiResource { @Path("{templateId}") @Operation(summary = "Delete a UGD", description = "") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = TemplatesApiResourcesSwagger.DeleteTemplatesTemplateIdResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TemplatesApiResourcesSwagger.DeleteTemplatesTemplateIdResponse.class))) }) public String deleteTemplate(@PathParam("templateId") @Parameter(description = "templateId") final Long templateId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteTemplate(templateId).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/PasswordPreferencesApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/PasswordPreferencesApiResource.java index 5540be18d..10c656d47 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/PasswordPreferencesApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/PasswordPreferencesApiResource.java @@ -81,7 +81,7 @@ public class PasswordPreferencesApiResource { @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = PasswordPreferencesApiResourceSwagger.GetPasswordPreferencesTemplateResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = PasswordPreferencesApiResourceSwagger.GetPasswordPreferencesTemplateResponse.class))) }) public String retrieve(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(PasswordPreferencesApiConstants.ENTITY_NAME); @@ -99,7 +99,7 @@ public class PasswordPreferencesApiResource { @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Update password preferences", description = "") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = PasswordPreferencesApiResourceSwagger.PutPasswordPreferencesTemplateRequest.class))) - @ApiResponses({ @ApiResponse(responseCode = "200", description = "") }) + @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK") }) public String update(@Parameter(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // @@ -119,7 +119,7 @@ public class PasswordPreferencesApiResource { @Operation(summary = "List Application Password validation policies", description = "ARGUMENTS\n" + "Example Requests:\n" + "\n" + "passwordpreferences") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(array = @ArraySchema(schema = @Schema(implementation = PasswordPreferencesApiResourceSwagger.GetPasswordPreferencesTemplateResponse.class)))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = PasswordPreferencesApiResourceSwagger.GetPasswordPreferencesTemplateResponse.class)))) }) public String template(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(PasswordPreferencesApiConstants.ENTITY_NAME); diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/PermissionsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/PermissionsApiResource.java index e9913f437..c9d13d708 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/PermissionsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/PermissionsApiResource.java @@ -93,7 +93,7 @@ public class PermissionsApiResource { + "\n" + "Note: Each Apache Fineract transaction is associated with a permission.\n" + "\n" + "Example Requests:\n" + "\n" + "permissions\n" + "\n" + "\n" + "permissions?makerCheckerable=true\n" + "\n" + "\n" + "permissions?fields=grouping,code") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(array = @ArraySchema(schema = @Schema(implementation = PermissionsApiResourceSwagger.GetPermissionsResponse.class)))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = PermissionsApiResourceSwagger.GetPermissionsResponse.class)))) }) public String retrieveAllPermissions(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -116,7 +116,7 @@ public class PermissionsApiResource { @Operation(summary = "Enable/Disable Permissions for Maker Checker", description = "") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = PermissionsApiResourceSwagger.PutPermissionsRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = CommandProcessingResult.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CommandProcessingResult.class))) }) public String updatePermissionsDetails(@Parameter(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/RolesApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/RolesApiResource.java index f4b4c4e27..4103db707 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/RolesApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/RolesApiResource.java @@ -111,7 +111,7 @@ public class RolesApiResource { @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "List Roles", description = "Example Requests:\n" + "\n" + "roles\n" + "\n" + "\n" + "roles?fields=name") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(array = @ArraySchema(schema = @Schema(implementation = RolesApiResourceSwagger.GetRolesResponse.class)))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = RolesApiResourceSwagger.GetRolesResponse.class)))) }) public String retrieveAllRoles(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -128,7 +128,7 @@ public class RolesApiResource { @Operation(summary = "Create a New Role", description = "Mandatory Fields\n" + "name, description") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = RolesApiResourceSwagger.PostRolesRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = RolesApiResourceSwagger.PostRolesResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = RolesApiResourceSwagger.PostRolesResponse.class))) }) public String createRole(@Parameter(hidden = true) final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // @@ -147,7 +147,7 @@ public class RolesApiResource { @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Retrieve a Role", description = "Example Requests:\n" + "\n" + "roles/1\n" + "\n" + "\n" + "roles/1?fields=name") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = RolesApiResourceSwagger.GetRolesRoleIdResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = RolesApiResourceSwagger.GetRolesRoleIdResponse.class))) }) public String retrieveRole(@PathParam("roleId") @Parameter(description = "roleId") final Long roleId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions); @@ -176,7 +176,7 @@ public class RolesApiResource { + "https://DomainName/api/v1/roles/{roleId}?command=disable") @Parameters({ @Parameter(description = "No Request Body", name = "No Request Body") }) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = RolesApiResourceSwagger.PostRolesRoleIdResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = RolesApiResourceSwagger.PostRolesRoleIdResponse.class))) }) public String actionsOnRoles(@PathParam("roleId") @Parameter(description = "roleId") final Long roleId, @QueryParam("command") @Parameter(description = "command") final String commandParam, @Parameter(hidden = true) final String apiRequestBodyAsJson) { @@ -202,7 +202,7 @@ public class RolesApiResource { @Operation(summary = "Update a Role", description = "") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = RolesApiResourceSwagger.PutRolesRoleIdRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = RolesApiResourceSwagger.PutRolesRoleIdResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = RolesApiResourceSwagger.PutRolesRoleIdResponse.class))) }) public String updateRole(@PathParam("roleId") @Parameter(description = "roleId") final Long roleId, @Parameter(hidden = true) final String apiRequestBodyAsJson) { @@ -222,7 +222,7 @@ public class RolesApiResource { @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Retrieve a Role's Permissions", description = "Example Requests:\n" + "\n" + "roles/1/permissions") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = RolesApiResourceSwagger.GetRolesRoleIdPermissionsResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = RolesApiResourceSwagger.GetRolesRoleIdPermissionsResponse.class))) }) public String retrieveRolePermissions(@PathParam("roleId") @Parameter(description = "roleId") final Long roleId, @Context final UriInfo uriInfo) { @@ -243,7 +243,7 @@ public class RolesApiResource { @Operation(summary = "Update a Role's Permissions", description = "") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = RolesApiResourceSwagger.PutRolesRoleIdPermissionsRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = RolesApiResourceSwagger.PutRolesRoleIdPermissionsResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = RolesApiResourceSwagger.PutRolesRoleIdPermissionsResponse.class))) }) public String updateRolePermissions(@PathParam("roleId") @Parameter(description = "roleId") final Long roleId, @Parameter(hidden = true) final String apiRequestBodyAsJson) { @@ -269,7 +269,7 @@ public class RolesApiResource { @Produces({ MediaType.APPLICATION_JSON }) @Operation(summary = "Delete a Role", description = "Description : Delete the role in case role is not associated with any users.") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = RolesApiResourceSwagger.DeleteRolesRoleIdResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = RolesApiResourceSwagger.DeleteRolesRoleIdResponse.class))) }) public String deleteRole(@PathParam("roleId") @Parameter(description = "roleId") final Long roleId) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/UsersApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/UsersApiResource.java index c2f47a695..f58e1dda6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/UsersApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/UsersApiResource.java @@ -111,7 +111,7 @@ public class UsersApiResource { @Operation(summary = "Retrieve list of users", description = "Example Requests:\n" + "\n" + "users\n" + "\n" + "\n" + "users?fields=id,username,email,officeName") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(array = @ArraySchema(schema = @Schema(implementation = UsersApiResourceSwagger.GetUsersResponse.class)))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = UsersApiResourceSwagger.GetUsersResponse.class)))) }) @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) public String retrieveAll(@Context final UriInfo uriInfo) { @@ -129,7 +129,7 @@ public class UsersApiResource { @Operation(summary = "Retrieve a User", description = "Example Requests:\n" + "\n" + "users/1\n" + "\n" + "\n" + "users/1?template=true\n" + "\n" + "\n" + "users/1?fields=username,officeName") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = UsersApiResourceSwagger.GetUsersUserIdResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = UsersApiResourceSwagger.GetUsersUserIdResponse.class))) }) @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) public String retrieveOne(@PathParam("userId") @Parameter(description = "userId") final Long userId, @Context final UriInfo uriInfo) { @@ -152,7 +152,7 @@ public class UsersApiResource { @Operation(summary = "Retrieve User Details Template", description = "This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n" + "\n" + "Field Defaults\n" + "Allowed description Lists\n" + "Example Request:\n" + "\n" + "users/template") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = UsersApiResourceSwagger.GetUsersTemplateResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = UsersApiResourceSwagger.GetUsersTemplateResponse.class))) }) @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) public String template(@Context final UriInfo uriInfo) { @@ -172,7 +172,7 @@ public class UsersApiResource { + "Optional Fields: \n" + "staffId,passwordNeverExpires,isSelfServiceUser,clients") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = UsersApiResourceSwagger.PostUsersRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = UsersApiResourceSwagger.PostUsersResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = UsersApiResourceSwagger.PostUsersResponse.class))) }) @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) public String create(@Parameter(hidden = true) final String apiRequestBodyAsJson) { @@ -192,7 +192,7 @@ public class UsersApiResource { @Operation(summary = "Update a User", description = "When updating a password you must provide the repeatPassword parameter also.") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = UsersApiResourceSwagger.PutUsersUserIdRequest.class))) @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = UsersApiResourceSwagger.PutUsersUserIdResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = UsersApiResourceSwagger.PutUsersUserIdResponse.class))) }) @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) public String update(@PathParam("userId") @Parameter(description = "userId") final Long userId, @@ -212,7 +212,7 @@ public class UsersApiResource { @Path("{userId}") @Operation(summary = "Delete a User", description = "Removes the user and the associated roles and permissions.") @ApiResponses({ - @ApiResponse(responseCode = "200", description = "", content = @Content(schema = @Schema(implementation = UsersApiResourceSwagger.DeleteUsersUserIdResponse.class))) }) + @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = UsersApiResourceSwagger.DeleteUsersUserIdResponse.class))) }) @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) public String delete(@PathParam("userId") @Parameter(description = "userId") final Long userId) { From 574a00ae34a16403919d5db082d4d997cf721781 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 25 Aug 2020 17:12:43 +0000 Subject: [PATCH 4/9] Update dependency gradle to v6.6.1 --- fineract-provider/gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fineract-provider/gradle/wrapper/gradle-wrapper.properties b/fineract-provider/gradle/wrapper/gradle-wrapper.properties index 6c9a22477..12d38de6a 100644 --- a/fineract-provider/gradle/wrapper/gradle-wrapper.properties +++ b/fineract-provider/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From b217982ea08bc344b8d143b073c2364664c380ac Mon Sep 17 00:00:00 2001 From: Chinmay Kulkarni <30969403+Grandolf49@users.noreply.github.com> Date: Wed, 26 Aug 2020 15:41:20 +0530 Subject: [PATCH 5/9] FINERACT-1101 Added Mustache templates to Swagger Codegen --- .gitignore | 1 + docs/developers/swagger/client.md | 30 +- fineract-provider/build.gradle | 4 +- .../config/swagger/config.json.template | 1 + .../gradle-wrapper.properties.mustache | 6 + .../config/swagger/templates/pom.mustache | 355 ++++++++++++++++++ 6 files changed, 391 insertions(+), 6 deletions(-) create mode 100644 fineract-provider/config/swagger/templates/gradle-wrapper.properties.mustache create mode 100644 fineract-provider/config/swagger/templates/pom.mustache diff --git a/.gitignore b/.gitignore index f84a22d9f..a7cbdec2c 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ build *.iws *.DS_Store .idea +.vscode catalina.base_IS_UNDEFINED/ keystore.jks bin/ diff --git a/docs/developers/swagger/client.md b/docs/developers/swagger/client.md index c854340be..c5897e2be 100644 --- a/docs/developers/swagger/client.md +++ b/docs/developers/swagger/client.md @@ -7,20 +7,40 @@ Apache Fineract supports client code generation using [Swagger Codegen](https:// In root directory of the project: -- Run `./gradlew build` +- Run `./gradlew resolve` - Run `./gradlew generateSwaggerCode` The client code will be generated under `build/swagger-code-fineract` -## Build API Client: +## Build API Client - Run `cd build/swagger-code-fineract` - Run `./gradlew build` -## Customize Code Generator: +Alternatively, if you have Maven installed on your system, you can also do: + +- Run `cd build/swagger-code-fineract` +- Run `mvn clean package` + +## Customize Generated Code Swagger Codegen provides several options to customize the generated code. [Here](https://openapi-generator.tech/docs/generators/java/) are the options available for customization. -- Open `fineract-provider/config/swagger/config.json` +- Open the [config.json.template](https://github.com/apache/fineract/blob/develop/fineract-provider/config/swagger/config.json.template) file - Customize options -- Build the project again as mentioned in **Generate API Client Code** section \ No newline at end of file +- Build the project again as mentioned in **Generate API Client Code** section + +## Customize using Mustache Templates + +Swagger Codegen uses Mustache Templates for generating the client library. For additional customizations you can add/edit custom templates inside the `fineract-provider/config/swagger/templates` folder. + +Make sure you are following the supported templates. Otherwise, the generated code will not build correctly. + +- [Java Mustache Templates](https://github.com/swagger-api/swagger-codegen/tree/master/modules/swagger-codegen/src/main/resources/Java) +- [Retrofit2 Mustache Templates](https://github.com/swagger-api/swagger-codegen/tree/master/modules/swagger-codegen/src/main/resources/Java/libraries/retrofit2) + +If you need to add templates for a specific library, you need to follow the same directory structure as present in the links above. + +## Validate OpenAPI Spec File + +The `resolve` task in [build.gradle](https://github.com/apache/fineract/blob/develop/fineract-provider/build.gradle#L212) file will generate the OpenAPI Spec File for the project. To make sure Swagger Codegen generates a correct library, it is important for the OpenAPI Spec file to be valid. Use [Swagger OpenAPI Validator](https://validator.swagger.io/) to validate the spec file. \ No newline at end of file diff --git a/fineract-provider/build.gradle b/fineract-provider/build.gradle index bf7cfd5ea..ca10794a6 100644 --- a/fineract-provider/build.gradle +++ b/fineract-provider/build.gradle @@ -323,6 +323,7 @@ rat { '**/.gitignore', '**/.gitkeep', '**/*.iml', + '**/config/swagger/templates/**', // Notice files '**/NOTICE_RELEASE', '**/NOTICE_SOURCE', @@ -872,7 +873,7 @@ generateGitProperties.outputs.upToDateWhen { false } // This is for swagger code generation // https://github.com/int128/gradle-swagger-generator-plugin dependencies { - swaggerCodegen 'io.swagger.codegen.v3:swagger-codegen-cli:3.0.18' + swaggerCodegen 'io.swagger.codegen.v3:swagger-codegen-cli:3.0.21' } task prepareConfigJson(dependsOn: 'generateGitProperties') { @@ -892,6 +893,7 @@ swaggerSources { code { language = 'java' configFile = file('config/swagger/config.json') + templateDir = file('config/swagger/templates') } } } diff --git a/fineract-provider/config/swagger/config.json.template b/fineract-provider/config/swagger/config.json.template index 1b9f4cb7f..8506fa1be 100644 --- a/fineract-provider/config/swagger/config.json.template +++ b/fineract-provider/config/swagger/config.json.template @@ -5,6 +5,7 @@ "invokerPackage": "org.apache.fineract.client", "modelPackage": "org.apache.fineract.client.models", "apiPackage": "org.apache.fineract.client.services", + "artifactDescription": "A Java and Retrofit2 based client library for Apache Fineract Platform", "dateLibrary": "java8", "hideGenerationTimestamp": "true", "library": "retrofit2" diff --git a/fineract-provider/config/swagger/templates/gradle-wrapper.properties.mustache b/fineract-provider/config/swagger/templates/gradle-wrapper.properties.mustache new file mode 100644 index 000000000..d58f9040a --- /dev/null +++ b/fineract-provider/config/swagger/templates/gradle-wrapper.properties.mustache @@ -0,0 +1,6 @@ +#Tue May 17 23:08:05 CST 2016 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.6-bin.zip \ No newline at end of file diff --git a/fineract-provider/config/swagger/templates/pom.mustache b/fineract-provider/config/swagger/templates/pom.mustache new file mode 100644 index 000000000..cbfb94220 --- /dev/null +++ b/fineract-provider/config/swagger/templates/pom.mustache @@ -0,0 +1,355 @@ + + 4.0.0 + {{groupId}} + {{artifactId}} + jar + {{artifactId}} + {{artifactVersion}} + {{artifactUrl}} + {{artifactDescription}} + + {{scmConnection}} + {{scmDeveloperConnection}} + {{scmUrl}} + + + + + {{licenseName}} + {{licenseUrl}} + repo + + + + + + {{developerName}} + {{developerEmail}} + {{developerOrganization}} + {{developerOrganizationUrl}} + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0-M1 + + + enforce-maven + + enforce + + + + + 2.2.0 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.12 + + + + loggerPath + conf/log4j.properties + + + -Xms512m -Xmx1500m + methods + pertest + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + jar + test-jar + + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.10 + + + add_sources + generate-sources + + add-source + + + + + src/main/java + + + + + add_test_sources + generate-test-sources + + add-test-source + + + + + src/test/java + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.2.0 + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + attach-sources + + jar-no-fork + + + + + + + + + + sign-artifacts + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + sign-artifacts + verify + + sign + + + + + + + + + + + + io.swagger.core.v3 + swagger-annotations + ${swagger-core-version} + + + com.squareup.retrofit2 + converter-gson + ${retrofit-version} + + + com.squareup.retrofit2 + retrofit + ${retrofit-version} + + + com.squareup.retrofit2 + converter-scalars + ${retrofit-version} + + + org.apache.oltu.oauth2 + org.apache.oltu.oauth2.client + ${oltu-version} + + + io.gsonfire + gson-fire + ${gson-fire-version} + + {{#joda}} + + joda-time + joda-time + ${jodatime-version} + + {{/joda}} + {{#threetenbp}} + + org.threeten + threetenbp + ${threetenbp-version} + + {{/threetenbp}} + {{#useRxJava}} + + io.reactivex + rxjava + ${rxjava-version} + + + com.squareup.retrofit2 + adapter-rxjava + ${retrofit-version} + + {{/useRxJava}} + {{#useRxJava2}} + + io.reactivex.rxjava2 + rxjava + ${rxjava-version} + + + com.squareup.retrofit2 + adapter-rxjava2 + ${retrofit-version} + + {{/useRxJava2}} + + {{#usePlayWS}} + + + com.squareup.retrofit2 + converter-jackson + ${retrofit-version} + + + com.fasterxml.jackson.core + jackson-core + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-annotations + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-databind + ${jackson-version} + + + com.fasterxml.jackson.datatype + jackson-datatype-{{^java8}}joda{{/java8}}{{#java8}}jsr310{{/java8}} + ${jackson-version} + + {{#withXml}} + + + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + ${jackson-version} + + + {{/withXml}} + + com.typesafe.play + play-java-ws_2.11 + ${play-version} + + {{/usePlayWS}} + + {{#parcelableModel}} + + + com.google.android + android + 4.1.1.4 + provided + + {{/parcelableModel}} + + + + junit + junit + ${junit-version} + test + + + + UTF-8 + {{#java8}}1.8{{/java8}}{{^java8}}1.7{{/java8}} + ${java.version} + ${java.version} + 1.8.0 + 2.0.0 + {{#usePlayWS}} + {{#play24}} + 2.10.1 + 2.4.11 + {{/play24}} + {{#play25}} + 2.10.1 + 2.5.15 + {{/play25}} + {{/usePlayWS}} + 2.3.0 + {{#useRxJava}} + 1.3.0 + {{/useRxJava}} + {{#useRxJava2}} + 2.1.1 + {{/useRxJava2}} + {{#joda}} + 2.9.9 + {{/joda}} + {{#threetenbp}} + 1.3.5 + {{/threetenbp}} + 1.0.2 + 4.12 + + \ No newline at end of file From 09bd45988fdc641e1a3a35fd3ea94d3115bce4dc Mon Sep 17 00:00:00 2001 From: Chinmay Kulkarni <30969403+Grandolf49@users.noreply.github.com> Date: Thu, 27 Aug 2020 17:57:42 +0530 Subject: [PATCH 6/9] FINERACT-1133 Added Mustache templates --- .../config/swagger/templates/README.mustache | 109 +++ .../config/swagger/templates/api_doc.mustache | 81 ++ .../config/swagger/templates/pom.mustache | 708 +++++++++--------- 3 files changed, 544 insertions(+), 354 deletions(-) create mode 100644 fineract-provider/config/swagger/templates/README.mustache create mode 100644 fineract-provider/config/swagger/templates/api_doc.mustache diff --git a/fineract-provider/config/swagger/templates/README.mustache b/fineract-provider/config/swagger/templates/README.mustache new file mode 100644 index 000000000..1bd3f271d --- /dev/null +++ b/fineract-provider/config/swagger/templates/README.mustache @@ -0,0 +1,109 @@ +# Fineract Client + +This is a Java and Retrofit2 based client library for [Apache Fineract Platform](https://github.com/apache/fineract) version `{{appVersion}}`. This library is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen). + +{{#appDescription}}{{{appDescription}}}{{/appDescription}} + +{{#infoUrl}} + For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) +{{/infoUrl}} + + +## Add Dependency + +To add the library as dependency to your project, follow the steps below. + +### Maven + +Add this dependency to your project's POM: + +```xml + + {{{groupId}}} + {{{artifactId}}} + {{{artifactVersion}}} + compile + +``` + +### Gradle + +Add this dependency to your project's build file: + +```groovy +implementation "{{{groupId}}}:{{{artifactId}}}:{{{artifactVersion}}}" +``` + +## Build Project + +To build the API client library locally, you must have: +1. Java 1.8+ +2. Maven/Gradle + +To install the API client library to your local Maven repository, execute: + +```shell +mvn clean install +``` + +To build the JAR, execute: + +```shell +mvn clean package +``` + +## Getting Started + +Once you have added the library, you can use the following example **Java** code for authentication. + +```java +import com.google.gson.JsonObject; +import org.apache.fineract.client.models.PostAuthenticationResponse; +import org.apache.fineract.client.services.AuthenticationHttpBasicApi; +import retrofit2.Call; +import retrofit2.Callback; +import retrofit2.Response; + +public class Example { + + public static void main(String[] args) { + + // Using API Key Authorization "tenantid" + ApiClient defaultClient = new ApiClient("tenantid"); + defaultClient.setApiKey("default"); + + AuthenticationHttpBasicApi apiService = defaultClient.createService(AuthenticationHttpBasicApi.class); + + // Response body + JsonObject jsonObject = new JsonObject(); + jsonObject.addProperty("username", "mifos"); + jsonObject.addProperty("password", "password"); + + Call call = apiService.authenticate(jsonObject.toString()); + call.enqueue(new Callback() { + @Override + public void onResponse(Call call + , Response response) { + System.out.println(call.toString() + "\n" + response.toString()); + } + + @Override + public void onFailure(Call call, Throwable t) { + System.out.println(t.getMessage()); + } + }); + } +} + +``` + +For complete documentation, refer `docs/AuthenticationHttpBasicApi.md` + +## Recommendation + +It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. + +## Author + +{{#apiInfo}}{{#apis}}{{^hasMore}}{{infoEmail}} +{{/hasMore}}{{/apis}}{{/apiInfo}} \ No newline at end of file diff --git a/fineract-provider/config/swagger/templates/api_doc.mustache b/fineract-provider/config/swagger/templates/api_doc.mustache new file mode 100644 index 000000000..6b5008316 --- /dev/null +++ b/fineract-provider/config/swagger/templates/api_doc.mustache @@ -0,0 +1,81 @@ +# {{classname}}{{#description}} +{{description}}{{/description}} + +All URIs are relative to *{{basePath}}* + +Method | HTTP request | Description +------------- | ------------- | ------------- +{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} +{{/operation}}{{/operations}} + +{{#operations}} +{{#operation}} + +# **{{operationId}}** +> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) + +{{summary}}{{#notes}} + +{{notes}}{{/notes}} + +### Example +```java +{{#hasAuthMethods}} +ApiClient defaultClient = new ApiClient(); + +{{#authMethods}}{{#isBasic}} +// Uncomment this if you want to use HTTP basic authorization: "{{{name}}}" +//defaultClient = new ApiClient("{{{name}}}"); +//defaultClient.setCredentials("YOUR USERNAME", "YOUR PASSWORD");{{/isBasic}}{{#isApiKey}} + +// API Key Authorization: "{{{name}}}" +// USE THIS IF YOU ARE TESTING THE LIBRARY +defaultClient = new ApiClient("{{{name}}}"); +defaultClient.setApiKey("default"); + +// Uncomment this if you are using OAuth2 access token for authorization: "{{{name}}}" +//OAuth {{{name}}} = (OAuth) defaultClient.getAuthentication("{{{name}}}"); +//{{{name}}}.setAccessToken("YOUR ACCESS TOKEN");{{/isApiKey}} +{{/authMethods}} +{{/hasAuthMethods}} + +{{classname}} apiService = defaultClient.createService({{classname}}.class); + +// Initialize these parameters earlier. +Call<{{returnType}}> call = apiService.{{operationId}}({{#allParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); +call.enqueue(new Callback<{{returnType}}>() { + @Override + public void onResponse(Call<{{returnType}}> call, Response<{{returnType}}> response) { + System.out.println(call.toString() + "\n" + response.toString()); + } + + @Override + public void onFailure(Call<{{returnType}}> call, Throwable t) { + System.out.println(t.getMessage()); + } +}); + +``` + +### Parameters +{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#@last}} +Name | Type | Description | Notes +------------- | ------------- | ------------- | -------------{{/@last}}{{/allParams}} +{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}[**{{dataType}}**]({{baseType}}.md){{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{defaultValue}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^@last}}, {{/@last}}{{/values}}]{{/allowableValues}} +{{/allParams}} + +### Return type + +{{#returnType}}{{#returnTypeIsPrimitive}}**{{returnType}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{returnType}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}null (empty response body){{/returnType}} + +### Authorization + +{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{name}}](../README.md#{{name}}){{^@last}}, {{/@last}}{{/authMethods}} + +### HTTP request headers + + - **Content-Type**: {{#consumes}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} + - **Accept**: {{#produces}}{{{mediaType}}}{{#hasMore}}, {{/hasMore}}{{/produces}}{{^produces}}Not defined{{/produces}} + +{{/operation}} +{{/operations}} \ No newline at end of file diff --git a/fineract-provider/config/swagger/templates/pom.mustache b/fineract-provider/config/swagger/templates/pom.mustache index cbfb94220..1fb5f19e3 100644 --- a/fineract-provider/config/swagger/templates/pom.mustache +++ b/fineract-provider/config/swagger/templates/pom.mustache @@ -1,355 +1,355 @@ - - 4.0.0 - {{groupId}} - {{artifactId}} - jar - {{artifactId}} - {{artifactVersion}} - {{artifactUrl}} - {{artifactDescription}} - - {{scmConnection}} - {{scmDeveloperConnection}} - {{scmUrl}} - - - - - {{licenseName}} - {{licenseUrl}} - repo - - - - - - {{developerName}} - {{developerEmail}} - {{developerOrganization}} - {{developerOrganizationUrl}} - - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - 3.0.0-M1 - - - enforce-maven - - enforce - - - - - 2.2.0 - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.12 - - - - loggerPath - conf/log4j.properties - - - -Xms512m -Xmx1500m - methods - pertest - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory}/lib - - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 2.2 - - - - jar - test-jar - - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 1.10 - - - add_sources - generate-sources - - add-source - - - - - src/main/java - - - - - add_test_sources - generate-test-sources - - add-test-source - - - - - src/test/java - - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.2.0 - - - attach-javadocs - - jar - - - - - - org.apache.maven.plugins - maven-source-plugin - 2.2.1 - - - attach-sources - - jar-no-fork - - - - - - - - - - sign-artifacts - - - - org.apache.maven.plugins - maven-gpg-plugin - 1.5 - - - sign-artifacts - verify - - sign - - - - - - - - - - - - io.swagger.core.v3 - swagger-annotations - ${swagger-core-version} - - - com.squareup.retrofit2 - converter-gson - ${retrofit-version} - - - com.squareup.retrofit2 - retrofit - ${retrofit-version} - - - com.squareup.retrofit2 - converter-scalars - ${retrofit-version} - - - org.apache.oltu.oauth2 - org.apache.oltu.oauth2.client - ${oltu-version} - - - io.gsonfire - gson-fire - ${gson-fire-version} - - {{#joda}} - - joda-time - joda-time - ${jodatime-version} - - {{/joda}} - {{#threetenbp}} - - org.threeten - threetenbp - ${threetenbp-version} - - {{/threetenbp}} - {{#useRxJava}} - - io.reactivex - rxjava - ${rxjava-version} - - - com.squareup.retrofit2 - adapter-rxjava - ${retrofit-version} - - {{/useRxJava}} - {{#useRxJava2}} - - io.reactivex.rxjava2 - rxjava - ${rxjava-version} - - - com.squareup.retrofit2 - adapter-rxjava2 - ${retrofit-version} - - {{/useRxJava2}} - - {{#usePlayWS}} - - - com.squareup.retrofit2 - converter-jackson - ${retrofit-version} - - - com.fasterxml.jackson.core - jackson-core - ${jackson-version} - - - com.fasterxml.jackson.core - jackson-annotations - ${jackson-version} - - - com.fasterxml.jackson.core - jackson-databind - ${jackson-version} - - - com.fasterxml.jackson.datatype - jackson-datatype-{{^java8}}joda{{/java8}}{{#java8}}jsr310{{/java8}} - ${jackson-version} - - {{#withXml}} - - - - com.fasterxml.jackson.dataformat - jackson-dataformat-xml - ${jackson-version} - - - {{/withXml}} - - com.typesafe.play - play-java-ws_2.11 - ${play-version} - - {{/usePlayWS}} - - {{#parcelableModel}} - - - com.google.android - android - 4.1.1.4 - provided - - {{/parcelableModel}} - - - - junit - junit - ${junit-version} - test - - - - UTF-8 - {{#java8}}1.8{{/java8}}{{^java8}}1.7{{/java8}} - ${java.version} - ${java.version} - 1.8.0 - 2.0.0 - {{#usePlayWS}} - {{#play24}} - 2.10.1 - 2.4.11 - {{/play24}} - {{#play25}} - 2.10.1 - 2.5.15 - {{/play25}} - {{/usePlayWS}} - 2.3.0 - {{#useRxJava}} - 1.3.0 - {{/useRxJava}} - {{#useRxJava2}} - 2.1.1 - {{/useRxJava2}} - {{#joda}} - 2.9.9 - {{/joda}} - {{#threetenbp}} - 1.3.5 - {{/threetenbp}} - 1.0.2 - 4.12 - + + 4.0.0 + {{groupId}} + {{artifactId}} + jar + Fineract Client + {{artifactVersion}} + {{artifactUrl}} + {{artifactDescription}} + + {{scmConnection}} + {{scmDeveloperConnection}} + {{scmUrl}} + + + + + {{licenseName}} + {{licenseUrl}} + repo + + + + + + {{developerName}} + {{developerEmail}} + {{developerOrganization}} + {{developerOrganizationUrl}} + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0-M1 + + + enforce-maven + + enforce + + + + + 2.2.0 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.12 + + + + loggerPath + conf/log4j.properties + + + -Xms512m -Xmx1500m + methods + pertest + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + jar + test-jar + + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 1.10 + + + add_sources + generate-sources + + add-source + + + + + src/main/java + + + + + add_test_sources + generate-test-sources + + add-test-source + + + + + src/test/java + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.2.0 + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + attach-sources + + jar-no-fork + + + + + + + + + + sign-artifacts + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + sign-artifacts + verify + + sign + + + + + + + + + + + + io.swagger.core.v3 + swagger-annotations + ${swagger-core-version} + + + com.squareup.retrofit2 + converter-gson + ${retrofit-version} + + + com.squareup.retrofit2 + retrofit + ${retrofit-version} + + + com.squareup.retrofit2 + converter-scalars + ${retrofit-version} + + + org.apache.oltu.oauth2 + org.apache.oltu.oauth2.client + ${oltu-version} + + + io.gsonfire + gson-fire + ${gson-fire-version} + + {{#joda}} + + joda-time + joda-time + ${jodatime-version} + + {{/joda}} + {{#threetenbp}} + + org.threeten + threetenbp + ${threetenbp-version} + + {{/threetenbp}} + {{#useRxJava}} + + io.reactivex + rxjava + ${rxjava-version} + + + com.squareup.retrofit2 + adapter-rxjava + ${retrofit-version} + + {{/useRxJava}} + {{#useRxJava2}} + + io.reactivex.rxjava2 + rxjava + ${rxjava-version} + + + com.squareup.retrofit2 + adapter-rxjava2 + ${retrofit-version} + + {{/useRxJava2}} + + {{#usePlayWS}} + + + com.squareup.retrofit2 + converter-jackson + ${retrofit-version} + + + com.fasterxml.jackson.core + jackson-core + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-annotations + ${jackson-version} + + + com.fasterxml.jackson.core + jackson-databind + ${jackson-version} + + + com.fasterxml.jackson.datatype + jackson-datatype-{{^java8}}joda{{/java8}}{{#java8}}jsr310{{/java8}} + ${jackson-version} + + {{#withXml}} + + + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + ${jackson-version} + + + {{/withXml}} + + com.typesafe.play + play-java-ws_2.11 + ${play-version} + + {{/usePlayWS}} + + {{#parcelableModel}} + + + com.google.android + android + 4.1.1.4 + provided + + {{/parcelableModel}} + + + + junit + junit + ${junit-version} + test + + + + UTF-8 + {{#java8}}1.8{{/java8}}{{^java8}}1.7{{/java8}} + ${java.version} + ${java.version} + 1.8.0 + 2.0.0 + {{#usePlayWS}} + {{#play24}} + 2.10.1 + 2.4.11 + {{/play24}} + {{#play25}} + 2.10.1 + 2.5.15 + {{/play25}} + {{/usePlayWS}} + 2.3.0 + {{#useRxJava}} + 1.3.0 + {{/useRxJava}} + {{#useRxJava2}} + 2.1.1 + {{/useRxJava2}} + {{#joda}} + 2.9.9 + {{/joda}} + {{#threetenbp}} + 1.3.5 + {{/threetenbp}} + 1.0.2 + 4.12 + \ No newline at end of file From 78816d3391ecf45bd7db794f0ad22329f388a651 Mon Sep 17 00:00:00 2001 From: Aleksandar Vidakovic Date: Thu, 27 Aug 2020 21:56:44 +0200 Subject: [PATCH 7/9] FINERACT-1134: Backport FINERACT-1129 to release branch 1.4.0 --- README.md | 47 +++++++++++++++- fineract-provider/build.gradle | 84 +++++++++++++++++++++++++++++ fineract-provider/gradle.properties | 2 +- 3 files changed, 131 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d387a8c81..07263f4e3 100644 --- a/README.md +++ b/README.md @@ -351,7 +351,52 @@ Our `ClasspathHellDuplicatesCheckRuleTest` detects classes that appear in more t Releasing --------- -[How to Release Apache Fineract](https://cwiki.apache.org/confluence/x/DRwIB) documents the process how we make the source code that is available here in this Git repository into a binary release ZIP available on http://fineract.apache.org. +[How to Release Apache Fineract](https://cwiki.apache.org/confluence/x/DRwIB) documents the process how we make the source code that is available here in this Git repository into a binary release tar.gz available on http://fineract.apache.org. + +Before you use Gradle to create a release you need to make sure that you provide the proper GPG parameters. You have to options: + +1. Provide the parameters via ~/gradle/gradle.properties in your home folder: +``` +signing.gnupg.keyName=7890ABCD +signing.gnupg.passphrase=secret +``` + +IMPORTANT: Do not set your GPG secrets in one of the project gradle.properties and double check that you are not accidentally committing them to Git. + +The release command would look then look like this: +``` +./gradlew -Pfineract.release clean build +``` + +2. Another way to provide these parameters are via project parameters on the command line. A release command would then look like this: +``` +./gradlew -Pfineract.release -Psigning.gnupg.keyName=7890ABCD -Psigning.gnupg.passphrase=secret clean build +``` + +NOTE: Let's assume your GPG key ID would be "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCD" then you have to use the last 8 characters (i. e. "7890ABCD") for the signing plugin property "signing.gnupg.keyName". + +Above tasks will create the following files in folder build/distributions: + +- distribution file: apache-fineract-1.4.0-binary.tar.gz +- ASCII armored signatures: apache-fineract-1.4.0-binary.tar.gz.asc +- SHA512 checksum: apache-fineract-1.4.0-binary.tar.gz.sha512 + +The signature is automatically verified by the build script. It will throw an exception if the verification fails. + +Additionally, you can verify the validity of the release distribution with: +``` +gpg --verify build/distributions/apache-fineract-1.4.0-binary.tar.gz.asc +``` + +The output should look somewhat like this: +``` +gpg: assuming signed data in 'build/distributions/apache-fineract-1.4.0-binary.tgz' +gpg: Signature made Mi 26 Aug 2020 17:17:45 CEST +gpg: using RSA key ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCD +gpg: Good signature from "Aleksandar Vidakovic (Apache Fineract Release Manager) " [ultimate] +``` + +NOTE: All commands shown above are assuming that the current working directory is the project root folder. More Information diff --git a/fineract-provider/build.gradle b/fineract-provider/build.gradle index ca10794a6..5c53efec2 100644 --- a/fineract-provider/build.gradle +++ b/fineract-provider/build.gradle @@ -81,6 +81,8 @@ apply plugin: "net.ltgt.errorprone" apply plugin: "com.diffplug.spotless" apply plugin: "io.swagger.core.v3.swagger-gradle-plugin" apply plugin: "org.hidetake.swagger.generator" +apply plugin: 'distribution' +apply plugin: 'signing' dependencyManagement { imports { @@ -823,6 +825,77 @@ bootJar { duplicatesStrategy = DuplicatesStrategy.EXCLUDE } +task sourcesJar(type: Jar) { + classifier 'sources' + from sourceSets.main.allSource +} + +tasks.withType(Tar){ + compression Compression.GZIP + extension 'tar.gz' + dependsOn 'buildSwaggerCodeFineract' +} + +distributions { + main { + baseName "apache-fineract-$releaseVersion-binary" + contents { + from sourcesJar + from bootJar + from bootWar + from('../build/swagger-code-fineract/build/libs/') { + include '**/*.jar' + rename 'client-(.+)\\.jar', 'fineract-client.jar' + } + from('../licenses/binary/') { + into "licenses/binary/" + } + from '../LICENSE_RELEASE' + from '../NOTICE_RELEASE' + rename ('LICENSE_RELEASE', 'LICENSE') + rename ('NOTICE_RELEASE', 'NOTICE') + + from '../DISCLAIMER' + from '../README.md' + } + } +} + +tasks.distZip.enabled false + +// create signatures and checksums only if project parameter "fineract.release" is provided on the command line +if( project.hasProperty("fineract.release") ) { + signing { + useGpgCmd() + sign distTar + } + + tasks.withType(Tar) { task -> + task.doLast { + ant.checksum file: task.archivePath, algorithm: 'SHA-512', fileext: '.sha512' + } + } + tasks.withType(Sign) { task -> + task.doLast { + new ByteArrayOutputStream().withStream { os -> + def result = exec { + workingDir '../build/distributions' + executable 'sh' + args '-c', "gpg --verify apache-fineract-$releaseVersion-binary.tar.gz.asc" + standardOutput = os + } + + if(result.exitValue==0) { + println '+++++++ GPG signature correct!' + } else { + println '------- GPG signature incorrect!' + throw new RuntimeException('GPG signature incorrect!') + } + } + } + } +} + // Configuration for spotbugs plugin // https://github.com/spotbugs/spotbugs-gradle-plugin @@ -899,3 +972,14 @@ swaggerSources { } generateSwaggerCodeFineract.dependsOn prepareConfigJson + +// TODO: fix version information for client jar +// TODO: refactor to multi-module project and make client a separate module; cleaner than running exec +task buildSwaggerCodeFineract(type:Exec, dependsOn: [ + 'resolve', + 'generateSwaggerCodeFineract' +]) { + workingDir '../build/swagger-code-fineract' + executable 'sh' + args '-c', 'chmod +x gradlew && ./gradlew clean build' +} diff --git a/fineract-provider/gradle.properties b/fineract-provider/gradle.properties index fc5aad879..55ff45d70 100644 --- a/fineract-provider/gradle.properties +++ b/fineract-provider/gradle.properties @@ -16,5 +16,5 @@ # specific language governing permissions and limitations # under the License. # -releaseVersion=1.0.0 +releaseVersion=1.4.0 buildType=BUILD From bcfbd6d9ab02b8962a972a429118272bb4ccf777 Mon Sep 17 00:00:00 2001 From: Aleksandar Vidakovic Date: Fri, 28 Aug 2020 04:20:01 +0200 Subject: [PATCH 8/9] FINERACT-1134: Backport FINERACT-1129 fix to release branch 1.4.0 --- README.md | 15 ++++++---- fineract-provider/build.gradle | 52 ++++++++++++++++++---------------- 2 files changed, 38 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 07263f4e3..0f6e786bf 100644 --- a/README.md +++ b/README.md @@ -377,13 +377,16 @@ NOTE: Let's assume your GPG key ID would be "ABCDEFGHIJKLMNOPQRSTUVWXYZ123456789 Above tasks will create the following files in folder build/distributions: -- distribution file: apache-fineract-1.4.0-binary.tar.gz -- ASCII armored signatures: apache-fineract-1.4.0-binary.tar.gz.asc -- SHA512 checksum: apache-fineract-1.4.0-binary.tar.gz.sha512 +- binary distribution file: apache-fineract-1.4.0-binary.tar.gz +- ASCII armored signature for binary distribution: apache-fineract-1.4.0-binary.tar.gz.asc +- SHA512 checksum for binary distribution: apache-fineract-1.4.0-binary.tar.gz.sha512 +- source distribution file: apache-fineract-1.4.0-src.tar.gz +- ASCII armored signature for source distribution: apache-fineract-1.4.0-src.tar.gz.asc +- SHA512 checksum for source distribution: apache-fineract-1.4.0-src.tar.gz.sha512 -The signature is automatically verified by the build script. It will throw an exception if the verification fails. +The signatures are automatically verified by the build script. It will throw an exception if the verification fails. -Additionally, you can verify the validity of the release distribution with: +Additionally, you can verify the validity of the release distribution files e. g. with: ``` gpg --verify build/distributions/apache-fineract-1.4.0-binary.tar.gz.asc ``` @@ -396,6 +399,8 @@ gpg: using RSA key ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890ABCD gpg: Good signature from "Aleksandar Vidakovic (Apache Fineract Release Manager) " [ultimate] ``` + +NOTE: All commands shown above are assuming that the current working directory is the project root folder. NOTE: All commands shown above are assuming that the current working directory is the project root folder. diff --git a/fineract-provider/build.gradle b/fineract-provider/build.gradle index 5c53efec2..2f132c1cd 100644 --- a/fineract-provider/build.gradle +++ b/fineract-provider/build.gradle @@ -825,22 +825,16 @@ bootJar { duplicatesStrategy = DuplicatesStrategy.EXCLUDE } -task sourcesJar(type: Jar) { - classifier 'sources' - from sourceSets.main.allSource -} - -tasks.withType(Tar){ +tasks.withType(Tar) { compression Compression.GZIP extension 'tar.gz' dependsOn 'buildSwaggerCodeFineract' } distributions { - main { + binary { baseName "apache-fineract-$releaseVersion-binary" contents { - from sourcesJar from bootJar from bootWar from('../build/swagger-code-fineract/build/libs/') { @@ -859,17 +853,26 @@ distributions { from '../README.md' } } + src { + baseName "apache-fineract-$releaseVersion-src" + contents { + from "../" + exclude 'build' , '.git', '.gradle', '.github', '.settings', '.project', '.classpath', '.idea', 'out', '._.DS_Store', '.DS_Store', 'WebContent', '.externalToolbuilders', '.theia', '.gitpod.yml', '.travis.yml', 'LICENSE_RELEASE', 'NOTICE_RELEASE', '**/licenses/binary' + rename ('LICENSE_SOURCE', 'LICENSE') + rename ('NOTICE_SOURCE', 'NOTICE') + } + } } -tasks.distZip.enabled false +tasks.binaryDistZip.enabled false +tasks.srcDistZip.enabled false // create signatures and checksums only if project parameter "fineract.release" is provided on the command line if( project.hasProperty("fineract.release") ) { signing { useGpgCmd() - sign distTar + sign (binaryDistTar, srcDistTar) } - tasks.withType(Tar) { task -> task.doLast { ant.checksum file: task.archivePath, algorithm: 'SHA-512', fileext: '.sha512' @@ -877,19 +880,20 @@ if( project.hasProperty("fineract.release") ) { } tasks.withType(Sign) { task -> task.doLast { - new ByteArrayOutputStream().withStream { os -> - def result = exec { - workingDir '../build/distributions' - executable 'sh' - args '-c', "gpg --verify apache-fineract-$releaseVersion-binary.tar.gz.asc" - standardOutput = os - } - - if(result.exitValue==0) { - println '+++++++ GPG signature correct!' - } else { - println '------- GPG signature incorrect!' - throw new RuntimeException('GPG signature incorrect!') + task.getFilesToSign().each { f -> + new ByteArrayOutputStream().withStream { os -> + def result = exec { + workingDir '../build/distributions' + executable 'sh' + args '-c', "gpg --verify ${f}.asc" + standardOutput = os + } + if(result.exitValue==0) { + println '+++ GPG signature correct!' + } else { + println '--- GPG signature incorrect!' + throw new RuntimeException('--- GPG signature incorrect!') + } } } } From f5757a7b115787e81cd136c39ba0ba3bec25ddc4 Mon Sep 17 00:00:00 2001 From: Aleksandar Vidakovic Date: Thu, 3 Sep 2020 09:16:35 +0200 Subject: [PATCH 9/9] FINERACT-1141: Backport FINERACT-1135 to 1.4.0 Error at Loan Repayments - SQLSyntaxErrorException --- .../service/LoanReadPlatformServiceImpl.java | 43 ++++++++++--------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java index 87ec1a053..a1eb9d7e2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceImpl.java @@ -431,7 +431,7 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService { this.context.authenticatedUser(); RepaymentTransactionTemplateMapper mapper = new RepaymentTransactionTemplateMapper(); - String sql = "select " + mapper.schema() + " where l.id =?"; + String sql = "select " + mapper.schema(); LoanTransactionData loanTransactionData = this.jdbcTemplate.queryForObject(sql, mapper, LoanTransactionType.REPAYMENT.getValue(), loanId, loanId); final Collection paymentOptions = this.paymentTypeReadPlatformService.retrieveAllPaymentTypes(); @@ -2176,35 +2176,36 @@ public class LoanReadPlatformServiceImpl implements LoanReadPlatformService { public String schema() { StringBuilder sqlBuilder = new StringBuilder(); - sqlBuilder.append("if(max(tr.transaction_date)>ls.dueDate,max(tr.transaction_date),ls.dueDate) as transactionDate,"); + sqlBuilder.append("if(max(tr.transaction_date)>ls.dueDate,max(tr.transaction_date),ls.dueDate) as transactionDate, "); sqlBuilder.append( - "ls.principal_amount - IFNULL(ls.principal_writtenoff_derived,0) - IFNULL(ls.principal_completed_derived,0) as principalDue,"); + "ls.principal_amount - IFNULL(ls.principal_writtenoff_derived,0) - IFNULL(ls.principal_completed_derived,0) as principalDue, "); sqlBuilder.append( - "ls.interest_amount - IFNULL(ls.interest_completed_derived,0) - IFNULL(ls.interest_waived_derived,0) - IFNULL(ls.interest_writtenoff_derived,0) as interestDue,"); + "ls.interest_amount - IFNULL(ls.interest_completed_derived,0) - IFNULL(ls.interest_waived_derived,0) - IFNULL(ls.interest_writtenoff_derived,0) as interestDue, "); sqlBuilder.append( - "ls.fee_charges_amount - IFNULL(ls.fee_charges_completed_derived,0) - IFNULL(ls.fee_charges_writtenoff_derived,0) - IFNULL(ls.fee_charges_waived_derived,0) as feeDue,"); + "ls.fee_charges_amount - IFNULL(ls.fee_charges_completed_derived,0) - IFNULL(ls.fee_charges_writtenoff_derived,0) - IFNULL(ls.fee_charges_waived_derived,0) as feeDue, "); sqlBuilder.append( - "ls.penalty_charges_amount - IFNULL(ls.penalty_charges_completed_derived,0) - IFNULL(ls.penalty_charges_writtenoff_derived,0) - IFNULL(ls.penalty_charges_waived_derived,0) as penaltyDue,"); + "ls.penalty_charges_amount - IFNULL(ls.penalty_charges_completed_derived,0) - IFNULL(ls.penalty_charges_writtenoff_derived,0) - IFNULL(ls.penalty_charges_waived_derived,0) as penaltyDue, "); sqlBuilder.append( - " l.currency_code as currencyCode, l.currency_digits as currencyDigits, l.currency_multiplesof as inMultiplesOf, rc.`name` as currencyName, "); - sqlBuilder.append(" rc.display_symbol as currencyDisplaySymbol, rc.internationalized_name_code as currencyNameCode "); - sqlBuilder.append(" FROM m_loan l"); + "l.currency_code as currencyCode, l.currency_digits as currencyDigits, l.currency_multiplesof as inMultiplesOf, rc.`name` as currencyName, "); + sqlBuilder.append("rc.display_symbol as currencyDisplaySymbol, rc.internationalized_name_code as currencyNameCode "); + sqlBuilder.append("FROM m_loan l "); sqlBuilder.append( - " LEFT JOIN m_loan_transaction tr ON tr.loan_id = l.id AND tr.transaction_type_enum = ? and tr.is_reversed = 0"); - sqlBuilder.append(" join m_currency rc on rc.`code` = l.currency_code "); - sqlBuilder.append(" JOIN m_loan_repayment_schedule ls ON ls.loan_id = l.id AND ls.completed_derived = 0 "); - sqlBuilder.append(" join( "); - sqlBuilder.append(" (select min(ls.duedate) datedue,ls.loan_id from m_loan_repayment_schedule ls "); - sqlBuilder.append(" where ls.loan_id = ? and ls.completed_derived = 0)"); - sqlBuilder.append(" )asq on asq.loan_id = ls.loan_id and asq.datedue = ls.duedate"); - sqlBuilder.append(" GROUP BY ls.duedate"); - sqlBuilder.append(",ls.principal_amount,ls.principal_completed_derived,ls.principal_writtenoff_derived"); + "LEFT JOIN m_loan_transaction tr ON tr.loan_id = l.id AND tr.transaction_type_enum = ? and tr.is_reversed = 0 "); + sqlBuilder.append("join m_currency rc on rc.`code` = l.currency_code "); + sqlBuilder.append("JOIN m_loan_repayment_schedule ls ON ls.loan_id = l.id AND ls.completed_derived = 0 "); + sqlBuilder.append("join( "); + sqlBuilder.append("(select min(ls.duedate) datedue,ls.loan_id from m_loan_repayment_schedule ls "); + sqlBuilder.append("where ls.loan_id = ? and ls.completed_derived = 0) )asq "); + sqlBuilder.append("on asq.loan_id = ls.loan_id and asq.datedue = ls.duedate "); + sqlBuilder.append("WHERE l.id = ? "); + sqlBuilder.append("GROUP BY ls.duedate, "); + sqlBuilder.append("ls.principal_amount,ls.principal_completed_derived,ls.principal_writtenoff_derived, "); sqlBuilder - .append(",ls.interest_amount,ls.interest_completed_derived,ls.interest_waived_derived,ls.interest_writtenoff_derived"); + .append("ls.interest_amount,ls.interest_completed_derived,ls.interest_waived_derived,ls.interest_writtenoff_derived, "); sqlBuilder.append( - ",ls.fee_charges_amount,ls.fee_charges_completed_derived, ls.fee_charges_writtenoff_derived, ls.fee_charges_waived_derived"); + "ls.fee_charges_amount,ls.fee_charges_completed_derived, ls.fee_charges_writtenoff_derived, ls.fee_charges_waived_derived, "); sqlBuilder.append( - ",ls.penalty_charges_amount, ls.penalty_charges_completed_derived, ls.penalty_charges_writtenoff_derived, ls.penalty_charges_waived_derived"); + "ls.penalty_charges_amount, ls.penalty_charges_completed_derived, ls.penalty_charges_writtenoff_derived, ls.penalty_charges_waived_derived "); return sqlBuilder.toString(); }