diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/accrual/api/AccrualAccountingApiResource.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/accrual/api/AccrualAccountingApiResource.java index d716e788676..224a1c302b0 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/accrual/api/AccrualAccountingApiResource.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/accrual/api/AccrualAccountingApiResource.java @@ -27,7 +27,10 @@ import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Consumes; import jakarta.ws.rs.POST; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; import lombok.RequiredArgsConstructor; diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/api/GLClosuresApiResource.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/api/GLClosuresApiResource.java index 6fe5be379e5..dc706ddf825 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/api/GLClosuresApiResource.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/api/GLClosuresApiResource.java @@ -31,7 +31,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/api/FinancialActivityAccountsApiResource.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/api/FinancialActivityAccountsApiResource.java index 715a36e7a0a..ae3e459066e 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/api/FinancialActivityAccountsApiResource.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/api/FinancialActivityAccountsApiResource.java @@ -31,7 +31,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Context; diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/api/GLAccountsApiResource.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/api/GLAccountsApiResource.java index d0ed1635036..2c5a33eda9e 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/api/GLAccountsApiResource.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/api/GLAccountsApiResource.java @@ -31,7 +31,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/api/ProvisioningEntriesApiResource.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/api/ProvisioningEntriesApiResource.java index 479d3bbca0c..304944dc574 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/api/ProvisioningEntriesApiResource.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/api/ProvisioningEntriesApiResource.java @@ -31,7 +31,10 @@ import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/api/AccountingRuleApiResource.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/api/AccountingRuleApiResource.java index 8d450cd551c..4c981fa8a21 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/api/AccountingRuleApiResource.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/api/AccountingRuleApiResource.java @@ -30,7 +30,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Context; diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/api/CashierApiResource.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/api/CashierApiResource.java index c95f9857eaa..23476e87cfa 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/api/CashierApiResource.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/api/CashierApiResource.java @@ -21,7 +21,10 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.GET; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; import jakarta.ws.rs.core.MediaType; diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/api/TellerApiResource.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/api/TellerApiResource.java index 630ad36f413..27936e07700 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/api/TellerApiResource.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/api/TellerApiResource.java @@ -31,7 +31,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/api/TellerJournalApiResource.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/api/TellerJournalApiResource.java index 6f28e5f6f2f..2bb569cff5d 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/api/TellerJournalApiResource.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/api/TellerJournalApiResource.java @@ -21,7 +21,10 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.GET; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; import jakarta.ws.rs.core.MediaType; diff --git a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/api/ChargesApiResource.java b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/api/ChargesApiResource.java index 039eed85a63..80cb53a89a6 100644 --- a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/api/ChargesApiResource.java +++ b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/api/ChargesApiResource.java @@ -30,7 +30,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Context; diff --git a/fineract-core/src/main/java/org/apache/fineract/batch/api/BatchApiResource.java b/fineract-core/src/main/java/org/apache/fineract/batch/api/BatchApiResource.java index 26b1bcb29bb..4c4c4548d0f 100644 --- a/fineract-core/src/main/java/org/apache/fineract/batch/api/BatchApiResource.java +++ b/fineract-core/src/main/java/org/apache/fineract/batch/api/BatchApiResource.java @@ -30,7 +30,10 @@ import jakarta.ws.rs.DefaultValue; import jakarta.ws.rs.HttpMethod; import jakarta.ws.rs.POST; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; import jakarta.ws.rs.core.Context; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/api/BusinessDateApiResource.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/api/BusinessDateApiResource.java index 4510baa3fdc..e487d7ac542 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/api/BusinessDateApiResource.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/api/BusinessDateApiResource.java @@ -25,7 +25,10 @@ import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/api/CacheApiResource.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/api/CacheApiResource.java index 442cb8b6eb3..fa5076919e7 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/api/CacheApiResource.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/api/CacheApiResource.java @@ -24,7 +24,10 @@ import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; import java.util.Collection; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/api/ExternalEventConfigurationApiResource.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/api/ExternalEventConfigurationApiResource.java index a30e28e85be..a83fae53244 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/api/ExternalEventConfigurationApiResource.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/api/ExternalEventConfigurationApiResource.java @@ -24,7 +24,10 @@ import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; import java.util.function.Supplier; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/api/InternalExternalEventsApiResource.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/api/InternalExternalEventsApiResource.java index 2472f941f34..83518ed105c 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/api/InternalExternalEventsApiResource.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/api/InternalExternalEventsApiResource.java @@ -20,7 +20,10 @@ import jakarta.ws.rs.DELETE; import jakarta.ws.rs.GET; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; import jakarta.ws.rs.core.MediaType; diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/api/CurrenciesApiResource.java b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/api/CurrenciesApiResource.java index 4592cda44af..b2fdbff587e 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/api/CurrenciesApiResource.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/api/CurrenciesApiResource.java @@ -24,7 +24,10 @@ import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; import java.util.function.Supplier; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/api/PaymentTypeApiResource.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/api/PaymentTypeApiResource.java index 0d649535a0f..ca49d037a98 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/api/PaymentTypeApiResource.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/api/PaymentTypeApiResource.java @@ -25,7 +25,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/DocumentApiResource.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/DocumentApiResource.java index 2ce3f6fb463..2b8a84bbf69 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/DocumentApiResource.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/DocumentApiResource.java @@ -37,7 +37,10 @@ import jakarta.ws.rs.HeaderParam; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/ImagesApiResource.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/ImagesApiResource.java index 7ca3769d77a..e0796da33e7 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/ImagesApiResource.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/ImagesApiResource.java @@ -48,7 +48,10 @@ import jakarta.ws.rs.HeaderParam; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/api/ExternalAssetOwnerLoanProductAttributesApiResource.java b/fineract-investor/src/main/java/org/apache/fineract/investor/api/ExternalAssetOwnerLoanProductAttributesApiResource.java index 8f4946eecae..244a62e016a 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/api/ExternalAssetOwnerLoanProductAttributesApiResource.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/api/ExternalAssetOwnerLoanProductAttributesApiResource.java @@ -28,7 +28,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/api/ExternalAssetOwnersApiResource.java b/fineract-investor/src/main/java/org/apache/fineract/investor/api/ExternalAssetOwnersApiResource.java index 9f0a91564a0..600524409e3 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/api/ExternalAssetOwnersApiResource.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/api/ExternalAssetOwnersApiResource.java @@ -34,7 +34,10 @@ import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/api/LoanOriginatorApiResource.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/api/LoanOriginatorApiResource.java index c3c39791f9d..30f35a30a89 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/api/LoanOriginatorApiResource.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/api/LoanOriginatorApiResource.java @@ -31,7 +31,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/api/LoanOriginatorsApiResource.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/api/LoanOriginatorsApiResource.java index f456c5a5a96..cdd7168abc2 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/api/LoanOriginatorsApiResource.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/api/LoanOriginatorsApiResource.java @@ -26,7 +26,10 @@ import jakarta.ws.rs.DELETE; import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/api/DelinquencyApiResource.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/api/DelinquencyApiResource.java index 16bd8cd9874..a2affb6ecd0 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/api/DelinquencyApiResource.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/api/DelinquencyApiResource.java @@ -30,7 +30,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Context; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/api/LoanInterestPauseApiResource.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/api/LoanInterestPauseApiResource.java index a24dd216088..7e97a377504 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/api/LoanInterestPauseApiResource.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/api/LoanInterestPauseApiResource.java @@ -31,7 +31,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanScheduleApiResource.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanScheduleApiResource.java index c764b124b8a..37ae851654b 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanScheduleApiResource.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanScheduleApiResource.java @@ -27,7 +27,10 @@ import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Consumes; import jakarta.ws.rs.POST; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/api/RescheduleLoansApiResource.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/api/RescheduleLoansApiResource.java index 8c8bd7f4c67..2d5c8f844e4 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/api/RescheduleLoansApiResource.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/api/RescheduleLoansApiResource.java @@ -28,7 +28,10 @@ import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/api/LoanProductsDetailsApiResource.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/api/LoanProductsDetailsApiResource.java index c2859a8ecc4..fdbc6e9c98c 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/api/LoanProductsDetailsApiResource.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/api/LoanProductsDetailsApiResource.java @@ -21,7 +21,10 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.GET; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Context; import jakarta.ws.rs.core.MediaType; diff --git a/fineract-mix/src/main/java/org/apache/fineract/mix/api/MixReportApiResource.java b/fineract-mix/src/main/java/org/apache/fineract/mix/api/MixReportApiResource.java index 8e876b8de63..9195bd91d17 100644 --- a/fineract-mix/src/main/java/org/apache/fineract/mix/api/MixReportApiResource.java +++ b/fineract-mix/src/main/java/org/apache/fineract/mix/api/MixReportApiResource.java @@ -21,7 +21,10 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.GET; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; import jakarta.ws.rs.core.MediaType; diff --git a/fineract-mix/src/main/java/org/apache/fineract/mix/api/MixTaxonomyApiResource.java b/fineract-mix/src/main/java/org/apache/fineract/mix/api/MixTaxonomyApiResource.java index 3d1166c6895..b8c1621d463 100644 --- a/fineract-mix/src/main/java/org/apache/fineract/mix/api/MixTaxonomyApiResource.java +++ b/fineract-mix/src/main/java/org/apache/fineract/mix/api/MixTaxonomyApiResource.java @@ -21,7 +21,10 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.GET; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; import java.util.List; diff --git a/fineract-mix/src/main/java/org/apache/fineract/mix/api/MixTaxonomyMappingApiResource.java b/fineract-mix/src/main/java/org/apache/fineract/mix/api/MixTaxonomyMappingApiResource.java index 7fa833f4ca8..d93be45e2ba 100644 --- a/fineract-mix/src/main/java/org/apache/fineract/mix/api/MixTaxonomyMappingApiResource.java +++ b/fineract-mix/src/main/java/org/apache/fineract/mix/api/MixTaxonomyMappingApiResource.java @@ -23,7 +23,10 @@ import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; import java.util.function.Supplier; diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanBuyDownFeeApiResource.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanBuyDownFeeApiResource.java index 3e0dd6c32b7..cd1b182630d 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanBuyDownFeeApiResource.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanBuyDownFeeApiResource.java @@ -26,7 +26,10 @@ import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.GET; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Context; diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanCapitalizedIncomeApiResource.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanCapitalizedIncomeApiResource.java index 6eb45f7a0a8..9eaaadea350 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanCapitalizedIncomeApiResource.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanCapitalizedIncomeApiResource.java @@ -25,7 +25,10 @@ import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.GET; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Context; diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/InternalProgressiveLoanApiResource.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/InternalProgressiveLoanApiResource.java index 929a47c1cff..345d5b4d387 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/InternalProgressiveLoanApiResource.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/InternalProgressiveLoanApiResource.java @@ -25,7 +25,10 @@ import jakarta.ws.rs.DELETE; import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; 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 c955afa66a0..54569ee95f3 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 @@ -28,7 +28,10 @@ import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -98,7 +101,7 @@ public class JournalEntriesApiResource { @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Journal Entries", operationId = "retrieveAllJournalEntries", description = "The list capability of journal entries can support pagination and sorting.\n\n" + @Operation(summary = "List Journal Entries", operationId = "retrieveAllJournalEntries", tags = {"Journal Entries"}, description = "The list capability of journal entries can support pagination and sorting.\n\n" + "Example Requests:\n" + "\n" + "journalentries\n" + "\n" + "journalentries?transactionId=PB37X8Y21EQUY4S\n" + "\n" + "journalentries?officeId=1&manualEntriesOnly=true&fromDate=1 July 2013&toDate=15 July 2013&dateFormat=dd MMMM yyyy&locale=en\n" + "\n" + "journalentries?fields=officeName,glAccountName,transactionDate\n" + "\n" + "journalentries?offset=10&limit=50\n" @@ -165,7 +168,7 @@ public String retrieveAll(@Context final UriInfo uriInfo, @GET @Path("{journalEntryId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a single Entry", description = "Example Requests:\n" + "\n" + "journalentries/1\n" + "\n" + "\n" + "\n" + @Operation(summary = "Retrieve a single Entry", tags = {"Journal Entries"}, description = "Example Requests:\n" + "\n" + "journalentries/1\n" + "\n" + "\n" + "\n" + "journalentries/1?fields=officeName,glAccountId,entryType,amount\n" + "\n" + "journalentries/1?runningBalance=true\n" + "\n" + "journalentries/1?transactionDetails=true") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = JournalEntriesApiResourceSwagger.JournalEntryTransactionItem.class))) @@ -188,7 +191,7 @@ public String retrieveJournalEntryById( @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create \"Balanced\" Journal Entries", description = "Note: A Balanced (simple) Journal entry would have atleast one \"Debit\" and one \"Credit\" entry whose amounts are equal \n" + @Operation(summary = "Create \"Balanced\" Journal Entries", tags = {"Journal Entries"}, description = "Note: A Balanced (simple) Journal entry would have atleast one \"Debit\" and one \"Credit\" entry whose amounts are equal \n" + "Compound Journal entries may have \"n\" debits and \"m\" credits where both \"m\" and \"n\" are greater than 0 and the net sum or all debits and credits are equal \n\n" + "\n" + "Mandatory Fields\n" + "officeId, transactionDate\n\n" + "\ncredits- glAccountId, amount, comments\n\n " + "\ndebits- glAccountId, amount, comments\n\n " + "\n" + "Optional Fields\n" @@ -218,7 +221,7 @@ public String createGLJournalEntry(@Parameter(hidden = true) final String jsonRe @Path("{transactionId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update Running balances for Journal Entries", description = "This API calculates the running balances for office. If office ID not provided this API calculates running balances for all offices. \n" + @Operation(summary = "Update Running balances for Journal Entries", tags = {"Journal Entries"}, description = "This API calculates the running balances for office. If office ID not provided this API calculates running balances for all offices. \n" + "Mandatory Fields\n" + "officeId") @RequestBody(content = @Content(schema = @Schema(implementation = JournalEntriesApiResourceSwagger.PostJournalEntriesTransactionIdRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = JournalEntriesApiResourceSwagger.PostJournalEntriesTransactionIdResponse.class))) @@ -240,6 +243,9 @@ public String createReversalJournalEntry(@Parameter(hidden = true) final String @GET @Path("provisioning") @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Retrieve Journal Entries for Provisioning", + description = "Returns journal entries related to provisioning entries based on entry ID.", + tags = {"Journal Entries"}) public String retrieveJournalEntries(@QueryParam("offset") final Integer offset, @QueryParam("limit") final Integer limit, @QueryParam("entryId") final Long entryId, @Context final UriInfo uriInfo) { this.context.authenticatedUser(); @@ -254,6 +260,7 @@ public String retrieveJournalEntries(@QueryParam("offset") final Integer offset, @GET @Path("openingbalance") @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Retrieve Opening Balance", description = "Returns the opening balance for a specific office and currency.", tags = {"Journal Entries"}) public String retrieveOpeningBalance(@Context final UriInfo uriInfo, @QueryParam("officeId") final Long officeId, @QueryParam("currencyCode") final String currencyCode) { @@ -271,6 +278,7 @@ private boolean is(final String commandParam, final String commandValue) { @GET @Path("downloadtemplate") @Produces("application/vnd.ms-excel") + @Operation(summary = "Download journal entries template", description = "Returns an Excel template for bulk importing journal entries.", tags = {"Journal Entries"}) public Response getJournalEntriesTemplate(@QueryParam("officeId") final Long officeId, @QueryParam("dateFormat") final String dateFormat) { return bulkImportWorkbookPopulatorService.getTemplate(GlobalEntityType.GL_JOURNAL_ENTRIES.toString(), officeId, null, dateFormat); @@ -281,6 +289,7 @@ public Response getJournalEntriesTemplate(@QueryParam("officeId") final Long off @Consumes(MediaType.MULTIPART_FORM_DATA) @RequestBody(description = "Upload journal entries template", content = { @Content(mediaType = MediaType.MULTIPART_FORM_DATA, schema = @Schema(implementation = UploadRequest.class)) }) + @Operation(summary = "Upload journal entries template", description = "Uploads a filled Excel template to create multiple journal entries in bulk.", tags = {"Journal Entries"}) public String postJournalEntriesTemplate(@FormDataParam("file") InputStream uploadedInputStream, @FormDataParam("file") FormDataContentDisposition fileDetail, @FormDataParam("locale") final String locale, @FormDataParam("dateFormat") final String dateFormat) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/api/AdHocApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/api/AdHocApiResource.java index 9b01321dd4b..a2712710725 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/api/AdHocApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/api/AdHocApiResource.java @@ -25,7 +25,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; @@ -64,6 +67,7 @@ public class AdHocApiResource { @GET @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Retrieve all AdHoc Queries", description = "Returns a list of all stored ad-hoc queries for custom reporting.", tags = {"AdHocQuery Api"}) public List retrieveAll() { this.context.authenticatedUser(); @@ -73,6 +77,7 @@ public List retrieveAll() { @GET @Produces({ MediaType.APPLICATION_JSON }) @Path("template") + @Operation(summary = "Retrieve AdHoc Query Template", description = "Returns a template for creating a new ad-hoc query, including available tables and fields.", tags = {"AdHocQuery Api"}) public AdHocData template() { this.context.authenticatedUser(); return adHocReadPlatformService.retrieveNewAdHocDetails(); @@ -81,6 +86,7 @@ public AdHocData template() { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Create an AdHoc Query", description = "Creates a new ad-hoc query for custom reporting purposes.", tags = {"AdHocQuery Api"}) public CommandProcessingResult createAdHocQuery(final AdHocRequest adHocRequest) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createAdHoc() @@ -92,6 +98,7 @@ public CommandProcessingResult createAdHocQuery(final AdHocRequest adHocRequest) @GET @Path("{adHocId}") @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Retrieve an AdHoc Query", description = "Returns the details of a specific ad-hoc query by its ID.", tags = {"AdHocQuery Api"}) public AdHocData retrieveAdHocQuery(@PathParam("adHocId") @Parameter(description = "adHocId") final Long adHocId) { this.context.authenticatedUser(); @@ -103,6 +110,7 @@ public AdHocData retrieveAdHocQuery(@PathParam("adHocId") @Parameter(description @Path("{adHocId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Update an AdHoc Query", description = "Updates the details of an existing ad-hoc query.", tags = {"AdHocQuery Api"}) public CommandProcessingResult update(@PathParam("adHocId") @Parameter(description = "adHocId") final Long adHocId, final AdHocRequest adHocRequest) { @@ -121,6 +129,7 @@ public CommandProcessingResult update(@PathParam("adHocId") @Parameter(descripti @DELETE @Path("{adHocId}") @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Delete an AdHoc Query", description = "Deletes a specific ad-hoc query by its ID.", tags = {"AdHocQuery Api"}) public CommandProcessingResult deleteAdHocQuery(@PathParam("adHocId") @Parameter(description = "adHocId") final Long adHocId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteAdHoc(adHocId).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/api/ConfigureBusinessStepApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/cob/api/ConfigureBusinessStepApiResource.java index 6311e7e464e..6f8b0da12f7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/api/ConfigureBusinessStepApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/api/ConfigureBusinessStepApiResource.java @@ -28,7 +28,10 @@ import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; @@ -59,7 +62,7 @@ public class ConfigureBusinessStepApiResource { @GET @Path("/names") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Business Jobs", description = "Returns the configured Business Jobs") + @Operation(summary = "List Business Jobs", tags = {"Business Step Configuration"}, description = "Returns the configured Business Jobs") public ConfiguredJobNamesDTO retrieveAllConfiguredBusinessJobs() { List businessJobNames = configJobParameterService.getAllConfiguredJobNames(); return new ConfiguredJobNamesDTO(businessJobNames); @@ -68,7 +71,7 @@ public ConfiguredJobNamesDTO retrieveAllConfiguredBusinessJobs() { @GET @Path("{jobName}/steps") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Business Step Configurations for a Job", description = "Returns the configured Business Steps for a job") + @Operation(summary = "List Business Step Configurations for a Job", tags = {"Business Step Configuration"}, description = "Returns the configured Business Steps for a job") public JobBusinessStepConfigData retrieveAllConfiguredBusinessStep( @PathParam("jobName") @Parameter(description = "jobName") final String jobName) { return configJobParameterService.getBusinessStepConfigByJobName(jobName); @@ -78,7 +81,7 @@ public JobBusinessStepConfigData retrieveAllConfiguredBusinessStep( @Path("{jobName}/steps") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Business Step Configurations for a Job", description = "Updates the Business steps execution order for a job") + @Operation(summary = "List Business Step Configurations for a Job", tags = {"Business Step Configuration"}, description = "Updates the Business steps execution order for a job") @RequestBody(content = @Content(schema = @Schema(implementation = BusinessStepRequest.class))) @ApiResponse(responseCode = "204", description = "NO_CONTENT") public Response updateJobBusinessStepConfig(@PathParam("jobName") @Parameter(description = "jobName") final String jobName, @@ -94,7 +97,7 @@ public Response updateJobBusinessStepConfig(@PathParam("jobName") @Parameter(des @GET @Path("{jobName}/available-steps") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Business Step Configurations for a Job", description = "Returns the available Business Steps for a job") + @Operation(summary = "List Business Step Configurations for a Job", tags = {"Business Step Configuration"}, description = "Returns the available Business Steps for a job") public JobBusinessStepDetail retrieveAllAvailableBusinessStep( @PathParam("jobName") @Parameter(description = "jobName") final String jobName) { return configJobParameterService.getAvailableBusinessStepsByJobName(jobName); diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/api/InternalCOBApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/cob/api/InternalCOBApiResource.java index 6faeeda933f..ecd0382dd2a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/api/InternalCOBApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/api/InternalCOBApiResource.java @@ -25,7 +25,10 @@ import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Context; @@ -86,6 +89,7 @@ public void afterPropertiesSet() throws Exception { @GET @Produces({ MediaType.APPLICATION_JSON }) @Path("partitions/{partitionSize}") + @Operation(summary = "Get COB partitions", description = "Retrieves loan COB partitions based on the business date and partition size. For internal testing purposes only.", tags = {"Internal COB"}) public String getCobPartitions(@Context final UriInfo uriInfo, @PathParam("partitionSize") int partitionSize) { LocalDate businessDate = ThreadLocalContextUtil.getBusinessDateByType(BusinessDateType.BUSINESS_DATE); log.info("RetrieveLoanCOBPartitions is called with partitionSize {} for {}", partitionSize, businessDate); @@ -98,6 +102,7 @@ public String getCobPartitions(@Context final UriInfo uriInfo, @PathParam("parti @POST @Consumes({ MediaType.APPLICATION_JSON }) @Path("fast-forward-cob-date-of-loan/{loanId}") + @Operation(summary = "Fast forward COB date of loan", description = "Manually updates the last closed business date for a specific loan. For internal testing only.", tags = {"Internal COB"}) public void updateLoanCobLastDate(@Context final UriInfo uriInfo, @PathParam("loanId") long loanId, String jsonBody) { JsonElement root = JsonParser.parseString(jsonBody); String lastClosedBusinessDate = root.getAsJsonObject().get("lastClosedBusinessDate").getAsString(); @@ -111,6 +116,7 @@ public void updateLoanCobLastDate(@Context final UriInfo uriInfo, @PathParam("lo @Consumes({ MediaType.APPLICATION_JSON }) @Path("loan-reprocess/{loanId}") @Transactional + @Operation(summary = "Reprocess loan schedule", description = "Regenerates the loan schedule by reprocessing transactions for a specific loan. For internal testing only.", tags = {"Internal COB"}) public void loanReprocess(@Context final UriInfo uriInfo, @PathParam("loanId") long loanId) { loanScheduleService.regenerateScheduleWithReprocessingTransactions(loanRepositoryWrapper.findOneWithNotFoundDetection(loanId)); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/api/InternalLoanAccountLockApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/cob/api/InternalLoanAccountLockApiResource.java index c61696e1562..025c80c9375 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/api/InternalLoanAccountLockApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/api/InternalLoanAccountLockApiResource.java @@ -18,10 +18,15 @@ */ package org.apache.fineract.cob.api; +import io.swagger.v3.oas.annotations.tags.Tag; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import jakarta.ws.rs.Consumes; +import io.swagger.v3.oas.annotations.Operation; import jakarta.ws.rs.POST; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Context; @@ -47,6 +52,7 @@ @Path("/v1/internal/loans") @RequiredArgsConstructor @Slf4j +@Tag(name = "Internal Loan Account Lock", description = "Internal API for managing loan account locks for testing purposes") public class InternalLoanAccountLockApiResource implements InitializingBean { private final LoanAccountLockRepository loanAccountLockRepository; @@ -69,6 +75,7 @@ public void afterPropertiesSet() throws Exception { @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @SuppressFBWarnings("SLF4J_SIGN_ONLY_FORMAT") + @Operation(summary = "Place a lock on a loan account", description = "Manually places a lock on a specific loan account for a given owner. For internal testing only.", tags = {"Internal Loan Account Lock"}) public Response placeLockOnLoanAccount(@Context final UriInfo uriInfo, @PathParam("loanId") Long loanId, @PathParam("lockOwner") String lockOwner, @RequestBody(required = false) LockRequest request) { log.warn("------------------------------------------------------------"); diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/api/LoanAccountLockApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/cob/api/LoanAccountLockApiResource.java index e5f6db99534..c43fd7b7f5d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/api/LoanAccountLockApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/api/LoanAccountLockApiResource.java @@ -21,7 +21,10 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.GET; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; import jakarta.ws.rs.core.MediaType; @@ -42,7 +45,7 @@ public class LoanAccountLockApiResource { @GET @Path("locked") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List locked loan accounts", description = "Returns the locked loan IDs") + @Operation(summary = "List locked loan accounts", tags = {"Loan Account Lock"}, description = "Returns the locked loan IDs") public LoanAccountLockResponseDTO retrieveLockedAccounts(@QueryParam("page") Integer pageParam, @QueryParam("limit") Integer limitParam) { int page = Objects.requireNonNullElse(pageParam, 0); diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/api/LoanCOBCatchUpApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/cob/api/LoanCOBCatchUpApiResource.java index 06886a72753..87d1b79f101 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/api/LoanCOBCatchUpApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/api/LoanCOBCatchUpApiResource.java @@ -24,7 +24,10 @@ import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; @@ -49,7 +52,7 @@ public class LoanCOBCatchUpApiResource { @GET @Path("oldest-cob-closed") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieves the oldest COB processed loan", description = "Retrieves the COB business date and the oldest COB processed loan") + @Operation(summary = "Retrieves the oldest COB processed loan", tags = {"Loan COB Catch Up"}, description = "Retrieves the COB business date and the oldest COB processed loan") public OldestCOBProcessedLoanDTO getOldestCOBProcessedLoan() { return loanCOBCatchUpServiceOp.map(COBCatchUpService::getOldestCOBProcessedLoan) .orElseThrow(() -> new JobIsNotFoundOrNotEnabledException(JobName.LOAN_COB.name())); @@ -59,7 +62,7 @@ public OldestCOBProcessedLoanDTO getOldestCOBProcessedLoan() { @Path("catch-up") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Executes Loan COB Catch Up", description = "Executes the Loan COB job on every day from the oldest Loan to the current COB business date") + @Operation(summary = "Executes Loan COB Catch Up", tags = {"Loan COB Catch Up"}, description = "Executes the Loan COB job on every day from the oldest Loan to the current COB business date") @ApiResponse(responseCode = "200", description = "All loans are up to date") @ApiResponse(responseCode = "202", description = "Catch Up has been started") @ApiResponse(responseCode = "400", description = "Catch Up is already running") @@ -71,7 +74,7 @@ public Response executeLoanCOBCatchUp() { @GET @Path("is-catch-up-running") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieves whether Loan COB catch up is running", description = "Retrieves whether Loan COB catch up is running, and the current execution date if it is running.") + @Operation(summary = "Retrieves whether Loan COB catch up is running", tags = {"Loan COB Catch Up"}, description = "Retrieves whether Loan COB catch up is running, and the current execution date if it is running.") public IsCatchUpRunningDTO isCatchUpRunning() { return loanCOBCatchUpServiceOp.map(COBCatchUpService::isCatchUpRunning).orElseGet(() -> new IsCatchUpRunningDTO(false, null)); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/api/WorkingCapitalLoanCOBCatchUpApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/cob/api/WorkingCapitalLoanCOBCatchUpApiResource.java index 09c8344d127..4efec5d398e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/api/WorkingCapitalLoanCOBCatchUpApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/api/WorkingCapitalLoanCOBCatchUpApiResource.java @@ -24,7 +24,10 @@ import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; @@ -49,7 +52,7 @@ public class WorkingCapitalLoanCOBCatchUpApiResource { @GET @Path("oldest-cob-closed") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieves the oldest COB processed Working Capital Loan", description = "Retrieves the COB business date and the oldest COB processed loan") + @Operation(summary = "Retrieves the oldest COB processed Working Capital Loan", tags = {"Working Capital Loan COB Catch Up"}, description = "Retrieves the COB business date and the oldest COB processed loan") public OldestCOBProcessedLoanDTO getOldestCOBProcessedLoan() { return loanCOBCatchUpServiceOp.map(COBCatchUpService::getOldestCOBProcessedLoan) .orElseThrow(() -> new JobIsNotFoundOrNotEnabledException(JobName.LOAN_COB.name())); @@ -59,7 +62,7 @@ public OldestCOBProcessedLoanDTO getOldestCOBProcessedLoan() { @Path("catch-up") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Executes Working Capital Loan COB Catch Up", description = "Executes the Working Capital Loan COB job on every day from the oldest Loan to the current COB business date") + @Operation(summary = "Executes Working Capital Loan COB Catch Up", tags = {"Working Capital Loan COB Catch Up"}, description = "Executes the Working Capital Loan COB job on every day from the oldest Loan to the current COB business date") @ApiResponse(responseCode = "200", description = "All loans are up to date") @ApiResponse(responseCode = "202", description = "Catch Up has been started") @ApiResponse(responseCode = "400", description = "Catch Up is already running") @@ -71,7 +74,7 @@ public Response executeLoanCOBCatchUp() { @GET @Path("is-catch-up-running") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieves whether Working Capital Loan COB catch up is running", description = "Retrieves whether Working Capital Loan COB catch up is running, and the current execution date if it is running.") + @Operation(summary = "Retrieves whether Working Capital Loan COB catch up is running", tags = {"Working Capital Loan COB Catch Up"}, description = "Retrieves whether Working Capital Loan COB catch up is running, and the current execution date if it is running.") public IsCatchUpRunningDTO isCatchUpRunning() { return loanCOBCatchUpServiceOp.map(COBCatchUpService::isCatchUpRunning).orElseGet(() -> new IsCatchUpRunningDTO(false, null)); } 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 b2387ba6795..cd7159404df 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 @@ -23,7 +23,10 @@ import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.BeanParam; import jakarta.ws.rs.GET; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -62,7 +65,7 @@ public class AuditsApiResource { @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Audits", description = "Get a 200 list of audits that match the criteria supplied and sorted by audit id in descending order, and are within the requestors' data scope. Also it supports pagination and sorting\n" + @Operation(summary = "List Audits", tags = {"Audits"}, description = "Get a 200 list of audits that match the criteria supplied and sorted by audit id in descending order, and are within the requestors' data scope. Also it supports pagination and sorting\n" + "\n" + "Example Requests:\n" + "\n" + "audits\n" + "\n" + "audits?fields=madeOnDate,maker,processingResult\n" + "\n" + "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") @@ -87,7 +90,7 @@ public String retrieveAuditEntries(@Context final UriInfo uriInfo, @BeanParam Au @GET @Path("{auditId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve an Audit Entry", description = "Example Requests:\n" + "\n" + "audits/20\n" + @Operation(summary = "Retrieve an Audit Entry", tags = {"Audits"}, description = "Example Requests:\n" + "\n" + "audits/20\n" + "audits/20?fields=madeOnDate,maker,processingResult") public AuditData retrieveAuditEntry(@PathParam("auditId") @Parameter final Long auditId) { context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSIONS); @@ -98,7 +101,7 @@ public AuditData retrieveAuditEntry(@PathParam("auditId") @Parameter final Long @GET @Path("/searchtemplate") @Produces({ MediaType.APPLICATION_JSON }) - @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" + @Operation(summary = "Audit Search Template", tags = {"Audits"}, 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") public AuditSearchData retrieveAuditSearchTemplate() { this.context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSIONS); 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 eb2685c49e2..0f37ff3f61c 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 @@ -29,7 +29,10 @@ import jakarta.ws.rs.DELETE; import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -66,7 +69,7 @@ public class MakercheckersApiResource { @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Maker Checker Entries", description = "Get a list of entries that can be checked by the requestor that match the criteria supplied.\n" + @Operation(summary = "List Maker Checker Entries", tags = {"Maker Checker (or 4-eye) functionality"}, description = "Get a list of entries that can be checked by the requestor that match the criteria supplied.\n" + "\n" + "Example Requests:\n" + "\n" + "makercheckers\n" + "\n" + "makercheckers?fields=madeOnDate,maker,processingResult\n" + "\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") @@ -81,7 +84,7 @@ public List retrieveCommands(@Context final UriInfo uriInfo, @BeanPar @GET @Path("/searchtemplate") @Produces({ MediaType.APPLICATION_JSON }) - @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" + @Operation(summary = "Maker Checker Search Template", tags = {"Maker Checker (or 4-eye) functionality"}, 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") public AuditSearchData retrieveAuditSearchTemplate() { return readPlatformService.retrieveSearchTemplate("makerchecker"); @@ -91,7 +94,7 @@ public AuditSearchData retrieveAuditSearchTemplate() { @Path("{auditId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Approve Maker Checker Entry | Reject Maker Checker Entry") + @Operation(tags = {"Maker Checker (or 4-eye) functionality"}, summary = "Approve Maker Checker Entry | Reject Maker Checker Entry") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = MakercheckersApiResourceSwagger.PostMakerCheckersResponse.class))) public CommandProcessingResult approveMakerCheckerEntry(@PathParam("auditId") @Parameter(description = "auditId") final Long auditId, @QueryParam("command") @Parameter(description = "command") final String commandParam) { @@ -115,7 +118,7 @@ private boolean is(final String commandParam, final String commandValue) { @DELETE @Path("{auditId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Delete Maker Checker Entry") + @Operation(tags = {"Maker Checker (or 4-eye) functionality"}, summary = "Delete Maker Checker Entry") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = MakercheckersApiResourceSwagger.PostMakerCheckersResponse.class))) public CommandProcessingResult deleteMakerCheckerEntry(@PathParam("auditId") @Parameter(description = "auditId") final Long auditId) { final Long id = 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 c9acdab2eed..b03d08e501a 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 @@ -31,7 +31,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Context; @@ -75,7 +78,7 @@ public class AccountNumberFormatsApiResource { @GET @Path("template") @Produces({ MediaType.APPLICATION_JSON }) - @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" + @Operation(summary = "Retrieve Account number format Template", tags = {"Account number format"}, 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") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = AccountNumberFormatsApiResourceSwagger.GetAccountNumberFormatsResponseTemplate.class))) public String retrieveTemplate(@Context final UriInfo uriInfo) { @@ -91,7 +94,7 @@ public String retrieveTemplate(@Context final UriInfo uriInfo) { @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Account number formats", description = "Example Requests:\n" + "\n" + "accountnumberformats\n" + "\n" + "\n" + @Operation(summary = "List Account number formats", tags = {"Account number format"}, description = "Example Requests:\n" + "\n" + "accountnumberformats\n" + "\n" + "\n" + "accountnumberformats?fields=accountType,prefixType") @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = AccountNumberFormatsApiResourceSwagger.GetAccountNumberFormatsIdResponse.class)))) public String retrieveAll(@Context final UriInfo uriInfo) { @@ -108,7 +111,7 @@ public String retrieveAll(@Context final UriInfo uriInfo) { @GET @Path("{accountNumberFormatId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve an Account number format", description = "Example Requests:\n" + "\n" + "accountnumberformats/1\n" + "\n" + @Operation(summary = "Retrieve an Account number format", tags = {"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") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = AccountNumberFormatsApiResourceSwagger.GetAccountNumberFormatsIdResponse.class))) public String retrieveOne(@Context final UriInfo uriInfo, @@ -132,7 +135,7 @@ public String retrieveOne(@Context final UriInfo uriInfo, @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create an Account number format", description = "Note: You may associate a single Account number format for a given account type\n" + @Operation(summary = "Create an Account number format", tags = {"Account number format"}, description = "Note: You may associate a single Account number format for a given account type\n" + "Mandatory Fields for Account number formats\n" + "accountType") @RequestBody(content = @Content(schema = @Schema(implementation = AccountNumberFormatsApiResourceSwagger.PostAccountNumberFormatsRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = AccountNumberFormatsApiResourceSwagger.PostAccountNumberFormatsResponse.class))) @@ -152,7 +155,7 @@ public String create(@Parameter(hidden = true) final String apiRequestBodyAsJson @Path("{accountNumberFormatId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update an Account number format") + @Operation(summary = "Update an Account number format", tags = {"Account number format"}) @RequestBody(required = true, content = @Content(schema = @Schema(implementation = AccountNumberFormatsApiResourceSwagger.PutAccountNumberFormatsRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = AccountNumberFormatsApiResourceSwagger.PutAccountNumberFormatsResponse.class))) public String update( @@ -172,7 +175,7 @@ public String update( @DELETE @Path("{accountNumberFormatId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Delete an Account number format", description = "Note: Account numbers created while this format was active would remain unchanged.") + @Operation(summary = "Delete an Account number format", tags = {"Account number format"}, description = "Note: Account numbers created while this format was active would remain unchanged.") @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/bulkimport/api/BulkImportApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/api/BulkImportApiResource.java index 5a58a4b66fc..bc9eca18336 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/api/BulkImportApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/api/BulkImportApiResource.java @@ -22,7 +22,10 @@ import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.GET; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; import jakarta.ws.rs.core.Context; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/api/EmailApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/api/EmailApiResource.java index f301496b02b..c2086c5b6ca 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/api/EmailApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/api/EmailApiResource.java @@ -24,7 +24,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/api/EmailCampaignApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/api/EmailCampaignApiResource.java index 580cc3c65e4..5dcb6e4ae5e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/api/EmailCampaignApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/api/EmailCampaignApiResource.java @@ -25,7 +25,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/api/EmailConfigurationApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/api/EmailConfigurationApiResource.java index b46afec56d8..ae44150aee2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/api/EmailConfigurationApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/api/EmailConfigurationApiResource.java @@ -22,7 +22,10 @@ import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Context; import jakarta.ws.rs.core.MediaType; 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 c5b566034ac..2a666782610 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 @@ -34,7 +34,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; 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 cf7fd1e38f1..ee1cc272195 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 @@ -31,7 +31,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Context; @@ -102,7 +105,7 @@ public String retrieveAllCodeValues(@Context final UriInfo uriInfo, @GET @Path("{codeId}/codevalues/{codeValueId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Code description", description = "Returns the details of a Code Value\n" + "\n" + "Example Requests:\n" + @Operation(summary = "Retrieve a Code description", tags = {"Code Values"}, description = "Returns the details of a Code Value\n" + "\n" + "Example Requests:\n" + "\n" + "codes/1/codevalues/1") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CodeValuesApiResourceSwagger.GetCodeValuesDataResponse.class))) public String retrieveCodeValue(@Context final UriInfo uriInfo, @@ -121,7 +124,7 @@ public String retrieveCodeValue(@Context final UriInfo uriInfo, @Path("{codeId}/codevalues") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create a Code description", description = "") + @Operation(summary = "Create a Code description", tags = {"Code Values"}, description = "") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = CodeValuesApiResourceSwagger.PostCodeValuesDataRequest.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, @@ -139,7 +142,7 @@ public String createCodeValue(@PathParam("codeId") @Parameter(description = "cod @Path("{codeId}/codevalues/{codeValueId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update a Code description", description = "Updates the details of a code description.") + @Operation(summary = "Update a Code description", tags = {"Code Values"}, description = "Updates the details of a code description.") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = CodeValuesApiResourceSwagger.PutCodeValuesDataRequest.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, @@ -157,7 +160,7 @@ public String updateCodeValue(@PathParam("codeId") @Parameter(description = "cod @DELETE @Path("{codeId}/codevalues/{codeValueId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Delete a Code description", description = "Deletes a code description") + @Operation(summary = "Delete a Code description", tags = {"Code Values"}, description = "Deletes a code description") @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) { @@ -172,7 +175,7 @@ public String deleteCodeValue(@PathParam("codeId") @Parameter(description = "cod @GET @Path("name/{codeName}/codevalues") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Code Values", operationId = "retrieveAllCodeValuesByCodeName", description = "Returns the list of Code Values for a given Code\n" + @Operation(summary = "List Code Values", operationId = "retrieveAllCodeValuesByCodeName", tags = {"Code Values"}, description = "Returns the list of Code Values for a given Code\n" + "\n" + "Example Requests:\n" + "\n" + "codes/1/codevalues", parameters = @Parameter(name = "codeId", description = "co")) @ApiResponse(responseCode = "200", description = "A List of code values for a given code", content = @Content(array = @ArraySchema(schema = @Schema(implementation = CodeValuesApiResourceSwagger.GetCodeValuesDataResponse.class)))) public List retrieveAllCodeValues(@Context final UriInfo uriInfo, @@ -186,7 +189,7 @@ public List retrieveAllCodeValues(@Context final UriInfo uriInfo, @GET @Path("name/{codeName}/codevalues/{codeValueId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Code description", description = "Returns the details of a Code Value\n" + "\n" + "Example Requests:\n" + @Operation(summary = "Retrieve a Code description", tags = {"Code Values"}, description = "Returns the details of a Code Value\n" + "\n" + "Example Requests:\n" + "\n" + "codes/name/ADDRESS_TYPE/codevalues/1") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CodeValuesApiResourceSwagger.GetCodeValuesDataResponse.class))) public CodeValueData retrieveCodeValue(@Context final UriInfo uriInfo, @@ -202,7 +205,7 @@ public CodeValueData retrieveCodeValue(@Context final UriInfo uriInfo, @Path("name/{codeName}/codevalues") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create a Code description", operationId = "createCodeValueByCodeName", description = "") + @Operation(summary = "Create a Code description", operationId = "createCodeValueByCodeName", tags = {"Code Values"}, description = "") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = CodeValuesApiResourceSwagger.PostCodeValuesDataRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CodeValuesApiResourceSwagger.PostCodeValueDataResponse.class))) public CommandProcessingResult createCodeValue(@PathParam("codeName") @Parameter(description = "codeName") final String codeName, @@ -218,7 +221,7 @@ public CommandProcessingResult createCodeValue(@PathParam("codeName") @Parameter @Path("name/{codeName}/codevalues/{codeValueId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update a Code description", operationId = "updateCodeValueByCodeName", description = "Updates the details of a code description.") + @Operation(summary = "Update a Code description", operationId = "updateCodeValueByCodeName", tags = {"Code Values"}, description = "Updates the details of a code description.") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = CodeValuesApiResourceSwagger.PutCodeValuesDataRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CodeValuesApiResourceSwagger.PutCodeValueDataResponse.class))) public CommandProcessingResult updateCodeValue(@PathParam("codeName") @Parameter(description = "codeName") final String codeName, @@ -235,7 +238,7 @@ public CommandProcessingResult updateCodeValue(@PathParam("codeName") @Parameter @DELETE @Path("name/{codeName}/codevalues/{codeValueId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Delete a Code description", description = "Deletes a code description") + @Operation(summary = "Delete a Code description", tags = {"Code Values"}, description = "Deletes a code description") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CodeValuesApiResourceSwagger.DeleteCodeValueDataResponse.class))) public CommandProcessingResult deleteCodeValue(@PathParam("codeName") @Parameter(description = "codeName") final String codeName, @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 3dc1d45c2f5..bbb314155c8 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 @@ -31,7 +31,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Context; @@ -76,7 +79,7 @@ public class CodesApiResource { @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Codes", description = "Returns the list of codes.\n" + "\n" + "Example Requests:\n" + "\n" + "codes") + @Operation(summary = "Retrieve Codes", tags = {"Codes"}, description = "Returns the list of codes.\n" + "\n" + "Example Requests:\n" + "\n" + "codes") @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = CodesApiResourceSwagger.GetCodesResponse.class)))) public String retrieveCodes(@Context final UriInfo uriInfo) { @@ -91,7 +94,7 @@ public String retrieveCodes(@Context final UriInfo uriInfo) { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @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.") + @Operation(summary = "Create a Code", tags = {"Codes"}, 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))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CodesApiResourceSwagger.PostCodesResponse.class))) public String createCode(@Parameter(hidden = true) final String apiRequestBodyAsJson) { @@ -106,7 +109,7 @@ public String createCode(@Parameter(hidden = true) final String apiRequestBodyAs @GET @Path("{codeId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Code", description = "Returns the details of a Code.\n" + "\n" + "Example Requests:\n" + "\n" + @Operation(summary = "Retrieve a Code", tags = {"Codes"}, description = "Returns the details of a Code.\n" + "\n" + "Example Requests:\n" + "\n" + "codes/1") @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) { @@ -120,7 +123,7 @@ public String retrieveCode(@PathParam("codeId") @Parameter(description = "codeId @GET @Path("name/{codeName}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Code", description = "Returns the details of a Code.\n" + "\n" + "Example Requests:\n" + "\n" + @Operation(summary = "Retrieve a Code", tags = {"Codes"}, description = "Returns the details of a Code.\n" + "\n" + "Example Requests:\n" + "\n" + "codes/1") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CodesApiResourceSwagger.GetCodesResponse.class))) public String retrieveCodeByName(@PathParam("codeName") @Parameter(description = "codeName") final String codeName, @@ -136,7 +139,7 @@ public String retrieveCodeByName(@PathParam("codeName") @Parameter(description = @Path("{codeId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update a Code", description = "Updates the details of a code if it is not system defined.") + @Operation(summary = "Update a Code", tags = {"Codes"}, description = "Updates the details of a code if it is not system defined.") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = CodesApiResourceSwagger.PutCodesRequest.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, @@ -152,7 +155,7 @@ public String updateCode(@PathParam("codeId") @Parameter(description = "codeId") @DELETE @Path("{codeId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Delete a Code", description = "Deletes a code if it is not system defined.") + @Operation(summary = "Delete a Code", tags = {"Codes"}, description = "Deletes a code if it is not system defined.") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CodesApiResourceSwagger.DeleteCodesResponse.class))) public String deleteCode(@PathParam("codeId") @Parameter(description = "codeId") final Long codeId) { 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 9ec41024996..04a803ab3c9 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 @@ -28,7 +28,10 @@ import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Context; @@ -65,7 +68,7 @@ public class ExternalServicesConfigurationApiResource { @GET @Path("{servicename}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve External Services Configuration", description = "Returns a external Service configurations based on the Service Name.\n" + @Operation(summary = "Retrieve External Services Configuration", tags = {"External Services"}, 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") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ExternalServicesPropertiesData.class))) public String retrieveOne(@PathParam("servicename") @Parameter(description = "servicename") final String serviceName, @@ -82,7 +85,7 @@ public String retrieveOne(@PathParam("servicename") @Parameter(description = "se @Path("{servicename}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update External Service", description = "Updates the external Service Configuration for a Service Name.\n" + "\n" + @Operation(summary = "Update External Service", tags = {"External Services"}, 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))) @ApiResponse(responseCode = "200", description = "OK") 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 c91dee8e417..47e768817d6 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 @@ -29,7 +29,10 @@ import jakarta.ws.rs.DefaultValue; import jakarta.ws.rs.GET; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -80,7 +83,7 @@ public class GlobalConfigurationApiResource { @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Global Configuration | Retrieve Global Configuration for surveys", description = "Returns the list global enable/disable configurations.\n" + @Operation(summary = "Retrieve Global Configuration | Retrieve Global Configuration for surveys", tags = {"Global Configuration"}, description = "Returns the list global enable/disable configurations.\n" + "\n" + "Example Requests:\n" + "\n" + "configurations\n\n" + "\n" + "Returns the list global enable/disable survey configurations.\n" + "\n" + "Example Requests:\n" + "\n" + "configurations/survey") @@ -99,7 +102,7 @@ public String retrieveConfiguration(@Context final UriInfo uriInfo, @GET @Path("{configId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Global Configuration", operationId = "retrieveOneGlobalConfiguration", description = "Returns a global enable/disable configurations.\n" + @Operation(summary = "Retrieve Global Configuration", operationId = "retrieveOneGlobalConfiguration", tags = {"Global Configuration"}, description = "Returns a global enable/disable configurations.\n" + "\n" + "Example Requests:\n" + "\n" + "configurations/1") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = GlobalConfigurationPropertyData.class))) public String retrieveOne(@PathParam("configId") @Parameter(description = "configId") final Long configId, @@ -116,7 +119,7 @@ public String retrieveOne(@PathParam("configId") @Parameter(description = "confi @GET @Path("name/{name}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Global Configuration", description = "Returns a global enable/disable configuration.\n" + "\n" + @Operation(summary = "Retrieve Global Configuration", tags = {"Global Configuration"}, description = "Returns a global enable/disable configuration.\n" + "\n" + "Example Requests:\n" + "\n" + "configurations/name/enable-address") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = GlobalConfigurationPropertyData.class))) public String retrieveOneByName(@PathParam("name") @Parameter(description = "name") final String name, @Context final UriInfo uriInfo) { @@ -133,7 +136,7 @@ public String retrieveOneByName(@PathParam("name") @Parameter(description = "nam @Path("{configId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update Global Configuration", operationId = "updateGlobalConfiguration", description = "Updates an enable/disable global configuration item.") + @Operation(summary = "Update Global Configuration", operationId = "updateGlobalConfiguration", tags = {"Global Configuration"}, description = "Updates an enable/disable global configuration item.") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = GlobalConfigurationApiResourceSwagger.PutGlobalConfigurationsRequest.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, @@ -153,7 +156,7 @@ public String updateConfiguration(@PathParam("configId") @Parameter(description @Path("/name/{configName}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update Global Configuration by name", description = "Updates an enable/disable global configuration item by name") + @Operation(summary = "Update Global Configuration by name", tags = {"Global Configuration"}, description = "Updates an enable/disable global configuration item by name") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = GlobalConfigurationApiResourceSwagger.PutGlobalConfigurationsRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = GlobalConfigurationApiResourceSwagger.PutGlobalConfigurationsResponse.class))) public String updateConfigurationByName(@PathParam("configName") @Parameter(description = "configName") final String configName, diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/InternalConfigurationsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/InternalConfigurationsApiResource.java index bd1ca019765..44777cc7ba6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/InternalConfigurationsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/InternalConfigurationsApiResource.java @@ -22,7 +22,10 @@ import io.swagger.v3.oas.annotations.Operation; import jakarta.ws.rs.Consumes; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; @@ -38,10 +41,13 @@ import org.springframework.beans.factory.InitializingBean; import org.springframework.context.annotation.Profile; import org.springframework.stereotype.Component; +import io.swagger.v3.oas.annotations.tags.Tag; + @Profile(FineractProfiles.TEST) @Component @Path("/v1/internal/configurations") +@Tag(name = "Internal Configurations", description = "Internal configuration resources for testing") @RequiredArgsConstructor @Slf4j public class InternalConfigurationsApiResource implements InitializingBean { @@ -66,7 +72,7 @@ public void afterPropertiesSet() throws Exception { @Path("name/{configName}/value/{configValue}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update internal global configuration", operationId = "updateInternalGlobalConfiguration") + @Operation(summary = "Update internal global configuration", operationId = "updateInternalGlobalConfiguration", tags = {"Internal Configurations"}) @SuppressFBWarnings("SLF4J_SIGN_ONLY_FORMAT") public Response updateGlobalConfiguration(@PathParam("configName") String configName, @PathParam("configValue") Long configValue) { log.warn("------------------------------------------------------------"); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/debug/EchoHeadersApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/debug/EchoHeadersApiResource.java index ac60f156608..d59d14b1fd1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/debug/EchoHeadersApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/debug/EchoHeadersApiResource.java @@ -20,7 +20,10 @@ import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Context; import jakarta.ws.rs.core.HttpHeaders; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/JerseyConfig.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/JerseyConfig.java index 0bb82fa9506..882b26d231e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/JerseyConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/JerseyConfig.java @@ -22,7 +22,10 @@ import jakarta.annotation.PostConstruct; import jakarta.inject.Singleton; import jakarta.ws.rs.ApplicationPath; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.ext.Provider; import org.apache.fineract.infrastructure.core.api.jersey.PageableParamProvider; import org.glassfish.jersey.internal.inject.AbstractBinder; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/api/CreditBureauConfigurationApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/api/CreditBureauConfigurationApiResource.java index 46a7f69c62f..2838314e3de 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/api/CreditBureauConfigurationApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/api/CreditBureauConfigurationApiResource.java @@ -24,7 +24,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Context; @@ -76,6 +79,7 @@ public class CreditBureauConfigurationApiResource { @GET @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "List Credit Bureau Configuration", tags = {"Credit Bureau Configuration"}, description = "") public String getCreditBureau(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSIONS); @@ -89,6 +93,7 @@ public String getCreditBureau(@Context final UriInfo uriInfo) { @GET @Path("/mappings") @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Retrieve Credit Bureau Loan Product Mappings", tags = {"Credit Bureau Integration"}, description = "") public String getCreditBureauLoanProductMapping(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSIONS); @@ -104,6 +109,7 @@ public String getCreditBureauLoanProductMapping(@Context final UriInfo uriInfo) @GET @Path("/organisationCreditBureau") @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Retrieve Organisation Credit Bureau details", tags = {"Credit Bureau Integration"}, description = "") public String getOrganisationCreditBureau(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSIONS); @@ -118,6 +124,7 @@ public String getOrganisationCreditBureau(@Context final UriInfo uriInfo) { @GET @Path("/config/{organisationCreditBureauId}") @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Retrieve Credit Bureau Configuration", tags = {"Credit Bureau Integration"}, description = "") public String getConfiguration(@PathParam("organisationCreditBureauId") final Long organisationCreditBureauId, @Context final UriInfo uriInfo) { @@ -132,6 +139,7 @@ public String getConfiguration(@PathParam("organisationCreditBureauId") final Lo @GET @Path("/loanProduct") @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Retrieve Loan Products from Credit Bureau", tags = {"Credit Bureau Integration"}, description = "") public String fetchLoanProducts(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSIONS); @@ -146,6 +154,7 @@ public String fetchLoanProducts(@Context final UriInfo uriInfo) { @GET @Path("/loanProduct/{loanProductId}") @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Retrieve Credit Bureau Loan Product Mapping", tags = {"Credit Bureau Integration"}, description = "") public String fetchMappingByLoanProductId(@Context final UriInfo uriInfo, @PathParam("loanProductId") final Long loanProductId) { this.context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSIONS); @@ -161,6 +170,7 @@ public String fetchMappingByLoanProductId(@Context final UriInfo uriInfo, @PathP @Path("/organisationCreditBureau") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Update Credit Bureau Configuration", tags = {"Credit Bureau Integration"}, description = "") public String updateCreditBureau(final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateCreditBureau().withJson(apiRequestBodyAsJson).build(); @@ -174,6 +184,7 @@ public String updateCreditBureau(final String apiRequestBodyAsJson) { @Path("/mappings") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Update Credit Bureau Loan Product Mapping", tags = {"Credit Bureau Integration"}, description = "") public String updateCreditBureauLoanProductMapping(final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateCreditBureauLoanProductMapping() @@ -188,6 +199,7 @@ public String updateCreditBureauLoanProductMapping(final String apiRequestBodyAs @Path("/organisationCreditBureau/{organisationCreditBureauId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Add Organisation Credit Bureau", tags = {"Credit Bureau Integration"}, description = "") public String addOrganisationCreditBureau(@PathParam("organisationCreditBureauId") final Long organisationCreditBureauId, final String apiRequestBodyAsJson) { @@ -203,6 +215,7 @@ public String addOrganisationCreditBureau(@PathParam("organisationCreditBureauId @Path("/mappings/{organisationCreditBureauId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Create Credit Bureau Loan Product Mapping", tags = {"Credit Bureau Integration"}, description = "") public String createCreditBureauLoanProductMapping(@PathParam("organisationCreditBureauId") final Long organisationCreditBureauId, final String apiRequestBodyAsJson) { @@ -218,6 +231,7 @@ public String createCreditBureauLoanProductMapping(@PathParam("organisationCredi @Path("/configuration/{creditBureauId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Create Credit Bureau Configuration", tags = {"Credit Bureau Integration"}, description = "") public String createCreditBureauConfiguration(@PathParam("creditBureauId") final Long creditBureauId, final String apiRequestBodyAsJson) { @@ -233,6 +247,7 @@ public String createCreditBureauConfiguration(@PathParam("creditBureauId") final @Path("/configuration/{configurationId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Update Credit Bureau Configuration", tags = {"Credit Bureau Configuration"}, description = "") public String updateCreditBureauConfiguration(@PathParam("configurationId") final Long configurationId, final String apiRequestBodyAsJson) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/api/CreditBureauIntegrationApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/api/CreditBureauIntegrationApiResource.java index 9fef17067ee..a133e276a31 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/api/CreditBureauIntegrationApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/api/CreditBureauIntegrationApiResource.java @@ -29,7 +29,10 @@ import jakarta.ws.rs.DELETE; import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; 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 d70d36245e1..6db6e8528a3 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 @@ -34,7 +34,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -79,7 +82,7 @@ public class DatatablesApiResource { @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Data Tables", description = "Lists registered data tables and the Apache Fineract Core application table they are registered to.\n" + @Operation(summary = "List Data Tables", tags = {"Data Tables"}, description = "Lists registered data tables and the Apache Fineract Core application table they are registered to.\n" + "\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") @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = DatatablesApiResourceSwagger.GetDataTablesResponse.class)))) @@ -94,7 +97,7 @@ public String getDatatables(@QueryParam("apptable") @Parameter(description = "ap @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create Data Table", description = "Create a new data table and registers it with the Apache Fineract Core application table.\n" + @Operation(summary = "Create Data Table", tags = {"Data Tables"}, description = "Create a new data table and registers it with the Apache Fineract Core application table.\n" + "\n" + "Field Descriptions\n" + "\n" + "Mandatory - datatableName : \n" + "\nThe name of the Data Table.\n" + "\n" + "Mandatory - apptableName\n" + "\n" + "Application table name. Must be one of the following:\n" + "\n" + "m_client\n" + "\n" + "m_group" + "\n" + "\n" + "m_loan" + "\n" + "\n" + "m_office" + "\n" + "\n" + "m_saving_account" + "\n" + "\n" @@ -125,7 +128,7 @@ public String createDatatable(@Parameter(hidden = true) final String apiRequestB @Path("{datatableName}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @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.") + @Operation(summary = "Update Data Table", tags = {"Data Tables"}, 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))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = DatatablesApiResourceSwagger.PutDataTablesResponse.class))) public String updateDatatable(@PathParam("datatableName") @Parameter(description = "datatableName") final String datatableName, @@ -141,7 +144,7 @@ public String updateDatatable(@PathParam("datatableName") @Parameter(description @Path("{datatableName}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Delete Data Table", description = "Deletes a data table and deregisters it from the Apache Fineract Core application table.") + @Operation(summary = "Delete Data Table", tags = {"Data Tables"}, description = "Deletes a data table and deregisters it from the Apache Fineract Core application table.") @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) { @@ -156,7 +159,7 @@ public String deleteDatatable(@PathParam("datatableName") @Parameter(description @Path("register/{datatable}/{apptable}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @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)") + @Operation(summary = "Register Data Table", tags = {"Data Tables"}, 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))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = DatatablesApiResourceSwagger.PutDataTablesResponse.class))) public String registerDatatable(@PathParam("datatable") @Parameter(description = "datatable") final String datatable, @@ -175,7 +178,7 @@ public String registerDatatable(@PathParam("datatable") @Parameter(description = @Path("deregister/{datatable}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Deregister Data Table", description = "Deregisters a data table. It will no longer be available through the API.") + @Operation(summary = "Deregister Data Table", tags = {"Data Tables"}, description = "Deregisters a data table. It will no longer be available through the API.") @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.datatableWriteService.deregisterDatatable(datatable); @@ -188,7 +191,7 @@ public String deregisterDatatable(@PathParam("datatable") @Parameter(description @GET @Path("{datatable}") @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.") + @Operation(summary = "Retrieve Data Table Details", tags = {"Data Tables"}, description = "Lists a registered data table details and the Apache Fineract Core application table they are registered to.") @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) { @@ -200,7 +203,7 @@ public String getDatatable(@PathParam("datatable") @Parameter(description = "dat @GET @Path("{datatable}/query") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Query Data Table values", description = "Query values from a registered data table.") + @Operation(summary = "Query Data Table values", tags = {"Data Tables"}, description = "Query values from a registered data table.") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = List.class))) public String queryValues(@PathParam("datatable") @Parameter(description = "datatable") final String datatable, @QueryParam("columnFilter") @Parameter(description = "columnFilter") final String columnFilter, @@ -218,7 +221,7 @@ public String queryValues(@PathParam("datatable") @Parameter(description = "data @Path("{datatable}/query") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Query Data Table values", description = "Query values from a registered data table.") + @Operation(summary = "Query Data Table values", tags = {"Data Tables"}, description = "Query values from a registered data table.") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = List.class))) public String advancedQuery(@PathParam("datatable") @Parameter(description = "datatable") final String datatable, PagedLocalRequest queryRequest, @Context final UriInfo uriInfo) { @@ -229,7 +232,7 @@ public String advancedQuery(@PathParam("datatable") @Parameter(description = "da @GET @Path("{datatable}/{apptableId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Entry(s) from Data Table", description = "Gets the entry (if it exists) for data tables that are one to one with the application table. \n" + @Operation(summary = "Retrieve Entry(s) from Data Table", tags = {"Data Tables"}, description = "Gets the entry (if it exists) for data tables that are one to one with the application table. \n" + "Gets the entries (if they exist) for data tables that are one to many with the application table.\n" + "\n" + "Note: The 'fields' parameter is not available for datatables.\n" + "\n" + "ARGUMENTS\n" + "orderoptional Specifies the order in which data is returned.genericResultSetoptional, defaults to false If 'true' an optimised JSON format is returned suitable for tabular display of data. This format is used by the default data tables UI functionality.\n" @@ -259,6 +262,7 @@ public String getDatatable(@PathParam("datatable") @Parameter(description = "dat } @GET + @Operation(summary = "Retrieve Data Table Entry", tags = {"Data Tables"}, description = "Returns a specific entry from a data table") @Path("{datatable}/{apptableId}/{datatableId}") @Produces({ MediaType.APPLICATION_JSON }) public String getDatatableManyEntry(@PathParam("datatable") final String datatable, @PathParam("apptableId") final Long apptableId, @@ -285,7 +289,7 @@ public String getDatatableManyEntry(@PathParam("datatable") final String datatab @Path("{datatable}/{apptableId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create Entry in Data Table", description = "Adds a row to the data table.\n" + "\n" + @Operation(summary = "Create Entry in Data Table", tags = {"Data Tables"}, description = "Adds a row to the data table.\n" + "\n" + "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 = String.class)), description = "{\n \"BusinessDescription\": \"Livestock sales\",\n \"Comment\": \"First comment made\",\n \"Education_cv\": \"Primary\",\n \"Gender_cd\": 6,\n \"HighestRatePaid\": 8.5,\n \"NextVisit\": \"01 October 2012\",\n \"YearsinBusiness\": 5,\n \"dateFormat\": \"dd MMMM yyyy\",\n \"locale\": \"en\"\n}") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = DatatablesApiResourceSwagger.PostDataTablesAppTableIdResponse.class))) @@ -307,7 +311,7 @@ public String createDatatableEntry(@PathParam("datatable") @Parameter(descriptio @Path("{datatable}/{apptableId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update Entry in Data Table (One to One)", description = "Updates the row (if it exists) of the data table.") + @Operation(summary = "Update Entry in Data Table (One to One)", tags = {"Data Tables"}, description = "Updates the row (if it exists) of the data table.") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = String.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, @@ -328,7 +332,7 @@ public String updateDatatableEntryOnetoOne(@PathParam("datatable") @Parameter(de @Path("{datatable}/{apptableId}/{datatableId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update Entry in Data Table (One to Many)", description = "Updates the row (if it exists) of the data table.") + @Operation(summary = "Update Entry in Data Table (One to Many)", tags = {"Data Tables"}, description = "Updates the row (if it exists) of the data table.") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = String.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, @@ -349,7 +353,7 @@ public String updateDatatableEntryOneToMany(@PathParam("datatable") @Parameter(d @DELETE @Path("{datatable}/{apptableId}") @Produces({ MediaType.APPLICATION_JSON }) - @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" + @Operation(summary = "Delete Entry(s) in Data Table", tags = {"Data Tables"}, 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.") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = DatatablesApiResourceSwagger.DeleteDataTablesDatatableAppTableIdResponse.class))) public String deleteDatatableEntries(@PathParam("datatable") @Parameter(description = "datatable") final String datatable, @@ -367,7 +371,7 @@ public String deleteDatatableEntries(@PathParam("datatable") @Parameter(descript @DELETE @Path("{datatable}/{apptableId}/{datatableId}") @Produces({ MediaType.APPLICATION_JSON }) - @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" + @Operation(summary = "Delete Entry in Datatable (One to Many)", tags = {"Data Tables"}, description = "Deletes the entry (if it exists) for data tables that are one to many with the application table.\n" + "\n") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = DatatablesApiResourceSwagger.DeleteDataTablesDatatableAppTableIdDatatableIdResponse.class))) public String deleteDatatableEntry(@PathParam("datatable") @Parameter(description = "datatable", example = "{}") final String datatable, 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 fe51ac483c4..5a1a4d4ac17 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 @@ -30,7 +30,10 @@ import jakarta.ws.rs.DELETE; import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -63,7 +66,7 @@ public class EntityDatatableChecksApiResource { @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Entity-Datatable Checks", description = "The list capability of Entity-Datatable Checks can support pagination.\n" + @Operation(summary = "List Entity-Datatable Checks", tags = {"Entity Data Table"}, description = "The list capability of Entity-Datatable Checks can support pagination.\n" + "\n" + "OPTIONAL ARGUMENTS\n" + "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") @@ -83,7 +86,7 @@ public String retrieveAll(@Context final UriInfo uriInfo, @QueryParam("status") @GET @Path("template") @Produces({ MediaType.APPLICATION_JSON }) - @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" + @Operation(summary = "Retrieve Entity-Datatable Checks Template", tags = {"Entity Data Table"}, 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") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = EntityDatatableChecksApiResourceSwagger.GetEntityDatatableChecksTemplateResponse.class))) public String getTemplate(@Context final UriInfo uriInfo) { @@ -96,7 +99,7 @@ public String getTemplate(@Context final UriInfo uriInfo) { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create Entity-Datatable Checks", description = "Mandatory Fields : \n" + "entity, status, datatableName\n" + "\n" + @Operation(summary = "Create Entity-Datatable Checks", tags = {"Entity Data Table"}, description = "Mandatory Fields : \n" + "entity, status, datatableName\n" + "\n" + "Non-Mandatory Fields : \n" + "productId") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = EntityDatatableChecksApiResourceSwagger.PostEntityDatatableChecksTemplateRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = EntityDatatableChecksApiResourceSwagger.PostEntityDatatableChecksTemplateResponse.class))) @@ -111,7 +114,7 @@ public String createEntityDatatableCheck(@Parameter(hidden = true) final String @Path("{entityDatatableCheckId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Delete Entity-Datatable Checks", description = "Deletes an existing Entity-Datatable Check") + @Operation(summary = "Delete Entity-Datatable Checks", tags = {"Entity Data Table"}, description = "Deletes an existing Entity-Datatable Check") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = EntityDatatableChecksApiResourceSwagger.DeleteEntityDatatableChecksTemplateResponse.class))) public String deleteDatatable( @PathParam("entityDatatableCheckId") @Parameter(description = "entityDatatableCheckId") final long entityDatatableCheckId, 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 bf3ad1571df..de072f2c98a 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 @@ -31,7 +31,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Context; @@ -74,7 +77,7 @@ public class ReportsApiResource { @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Reports", operationId = "retrieveAllReports", description = "Lists all reports and their parameters.\n" + @Operation(summary = "List Reports", operationId = "retrieveAllReports", tags = {"Reports"}, description = "Lists all reports and their parameters.\n" + "\n" + "Example Request:\n" + "\n" + "reports") @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = ReportsApiResourceSwagger.GetReportsResponse.class)))) public String retrieveReportList(@Context final UriInfo uriInfo) { @@ -90,7 +93,7 @@ public String retrieveReportList(@Context final UriInfo uriInfo) { @GET @Path("{id}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Report\n", operationId = "retrieveOneReport", description = "Example Requests:\n" + "\n" + @Operation(summary = "Retrieve a Report\n", operationId = "retrieveOneReport", tags = {"Reports"}, description = "Example Requests:\n" + "\n" + "reports/1\n" + "\n" + "\n" + "reports/1?template=true") @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) { @@ -111,7 +114,7 @@ public String retrieveReport(@PathParam("id") @Parameter(description = "id") fin @GET @Path("template") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Report Template", operationId = "retrieveTemplateReport", 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" + @Operation(summary = "Retrieve Report Template", operationId = "retrieveTemplateReport", tags = {"Reports"}, 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") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ReportsApiResourceSwagger.GetReportsTemplateResponse.class))) public String retrieveOfficeTemplate(@Context final UriInfo uriInfo) { @@ -129,7 +132,7 @@ public String retrieveOfficeTemplate(@Context final UriInfo uriInfo) { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create a Report", operationId = "createReport", description = "") + @Operation(summary = "Create a Report", operationId = "createReport", tags = {"Reports"}, description = "") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = ReportsApiResourceSwagger.PostRepostRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ReportsApiResourceSwagger.PostReportsResponse.class))) public String createReport(@Parameter(hidden = true) final String apiRequestBodyAsJson) { @@ -145,7 +148,7 @@ public String createReport(@Parameter(hidden = true) final String apiRequestBody @Path("{id}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update a Report", operationId = "updateReport", description = "Only the useReport description can be updated for core reports.") + @Operation(summary = "Update a Report", operationId = "updateReport", tags = {"Reports"}, description = "Only the useReport description can be updated for core reports.") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = ReportsApiResourceSwagger.PutReportRequest.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, @@ -161,7 +164,7 @@ public String updateReport(@PathParam("id") @Parameter(description = "id") final @DELETE @Path("{id}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Delete a Report", operationId = "deleteReport", description = "Only non-core reports can be deleted.") + @Operation(summary = "Delete a Report", operationId = "deleteReport", tags = {"Reports"}, description = "Only non-core reports can be deleted.") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ReportsApiResourceSwagger.DeleteReportsResponse.class))) public String deleteReport(@PathParam("id") @Parameter(description = "id") final Long id) { 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 0adcc5ff05a..f60e6d0723e 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 @@ -28,7 +28,10 @@ import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.DefaultValue; import jakarta.ws.rs.GET; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -64,7 +67,7 @@ public class RunreportsApiResource { @GET @Path("/availableExports/{reportName}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Return all available export types for the specific report", operationId = "retrieveAllAvailableExports", description = "Returns the list of all available export types for a given report.") + @Operation(summary = "Return all available export types for the specific report", operationId = "retrieveAllAvailableExports", tags = {"Run Reports"}, description = "Returns the list of all available export types for a given report.") @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = ReportExportType.class)))) @ApiResponse(responseCode = "400", description = "Bad Request - Invalid report name or parameters") @ApiResponse(responseCode = "500", description = "Internal Server Error") @@ -88,7 +91,7 @@ public Response retrieveAllAvailableExports( @Path("{reportName}") @Timed(value = "fineract.report.execution", description = "Time taken to execute reports", extraTags = { "component", "reporting" }) @Produces({ MediaType.APPLICATION_JSON, "text/csv", "application/vnd.ms-excel", "application/pdf", "text/html" }) - @Operation(summary = "Run a predefined report", operationId = "runReport", description = ReportParameters.FULL_DESCRIPTION) + @Operation(summary = "Run a predefined report", operationId = "runReport", tags = {"Run Reports"}, description = ReportParameters.FULL_DESCRIPTION) @ApiResponse(responseCode = "200", description = "OK - Report executed successfully", content = @Content(schema = @Schema(implementation = RunreportsApiResourceSwagger.RunReportsResponse.class))) @ApiResponse(responseCode = "400", description = "Bad Request - Missing or invalid parameters") @ApiResponse(responseCode = "401", description = "Unauthorized - Not authorized to run this report") diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/api/FineractEntityApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/api/FineractEntityApiResource.java index d0aef5bf8bf..d13ed0c378e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/api/FineractEntityApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/api/FineractEntityApiResource.java @@ -24,7 +24,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Context; @@ -61,6 +64,7 @@ public class FineractEntityApiResource { @GET @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Retrieve Custom Entity Relationships", tags = {"Fineract Entity"}, description = "") public String retrieveAll(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(FineractEntityApiResourceConstants.FINERACT_ENTITY_RESOURCE_NAME); @@ -73,6 +77,7 @@ public String retrieveAll(@Context final UriInfo uriInfo) { @GET @Path("/{mapId}") @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Retrieve a Custom Entity Relationship", tags = {"Fineract Entity"}, description = "") public String retrieveOne(@PathParam("mapId") final Long mapId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(FineractEntityApiResourceConstants.FINERACT_ENTITY_RESOURCE_NAME); @@ -86,6 +91,7 @@ public String retrieveOne(@PathParam("mapId") final Long mapId, @Context final U @GET @Path("/{mapId}/{fromId}/{toId}") @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Retrieve Entity to Entity Mappings", tags = {"Fineract Entity"}, description = "") public String getEntityToEntityMappings(@PathParam("mapId") final Long mapId, @PathParam("fromId") final Long fromId, @PathParam("toId") final Long toId, @Context final UriInfo uriInfo) { @@ -102,6 +108,7 @@ public String getEntityToEntityMappings(@PathParam("mapId") final Long mapId, @P @Path("/{relId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Create Entity to Entity Mapping", tags = {"Fineract Entity"}, description = "") public String createMap(@PathParam("relId") final Long relId, final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // @@ -119,6 +126,7 @@ public String createMap(@PathParam("relId") final Long relId, final String apiRe @Path("/{mapId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Update Entity to Entity Mapping", tags = {"Fineract Entity"}, description = "") public String updateMap(@PathParam("mapId") final Long mapId, final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // @@ -135,6 +143,7 @@ public String updateMap(@PathParam("mapId") final Long mapId, final String apiRe @DELETE @Path("{mapId}") @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Delete Entity to Entity Mapping", tags = {"Fineract Entity"}, description = "") public String delete(@PathParam("mapId") final Long mapId) { final CommandWrapper commandRequest = new CommandWrapperBuilder() // 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 57ee84ef5de..66a66751c21 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 @@ -34,7 +34,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Context; @@ -68,7 +71,7 @@ public class HookApiResource { private final PortfolioCommandSourceWritePlatformService commandsSourceWritePlatformService; @GET - @Operation(summary = "Retrieve Hooks", description = "Returns the list of hooks.\n" + "\n" + "Example Requests:\n" + "\n" + "hooks") + @Operation(summary = "Retrieve Hooks", tags = {"Hooks"}, description = "Returns the list of hooks.\n" + "\n" + "Example Requests:\n" + "\n" + "hooks") @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = HookApiResourceSwagger.GetHookResponse.class)))) public String retrieveHooks(@Context final UriInfo uriInfo) { @@ -82,7 +85,7 @@ public String retrieveHooks(@Context final UriInfo uriInfo) { @GET @Path("{hookId}") - @Operation(summary = "Retrieve a Hook", description = "Returns the details of a Hook.\n" + "\n" + "Example Requests:\n" + "\n" + @Operation(summary = "Retrieve a Hook", tags = {"Hooks"}, description = "Returns the details of a Hook.\n" + "\n" + "Example Requests:\n" + "\n" + "hooks/1") @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) { @@ -102,7 +105,7 @@ public String retrieveHook(@PathParam("hookId") @Parameter(description = "hookId @GET @Path("template") - @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" + @Operation(summary = "Retrieve Hooks Template", tags = {"Hooks"}, 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") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = HookApiResourceSwagger.GetHookTemplateResponse.class))) public String template(@Context final UriInfo uriInfo) { @@ -117,7 +120,7 @@ public String template(@Context final UriInfo uriInfo) { @POST @Consumes({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create a Hook", description = "The following parameters can be passed for the creation of a hook :-\n" + "\n" + @Operation(summary = "Create a Hook", tags = {"Hooks"}, description = "The following parameters can be passed for the creation of a hook :-\n" + "\n" + "name - string - Required. The name of the template that is being called. (See /hooks/template for the list of valid hook names.)\n" + "\n" + "isActive - boolean - Determines whether the hook is actually triggered.\n" + "\n" + "events - array - Determines what events the hook is triggered for.\n" + "\n" @@ -137,7 +140,7 @@ public String createHook(@Parameter(hidden = true) final String apiRequestBodyAs @PUT @Path("{hookId}") @Consumes({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update a Hook", description = "Updates the details of a hook.") + @Operation(summary = "Update a Hook", tags = {"Hooks"}, description = "Updates the details of a hook.") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = HookApiResourceSwagger.PutHookRequest.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, @@ -152,7 +155,7 @@ public String updateHook(@PathParam("hookId") @Parameter(description = "hookId") @DELETE @Path("{hookId}") - @Operation(summary = "Delete a Hook", description = "Deletes a hook.") + @Operation(summary = "Delete a Hook", tags = {"Hooks"}, description = "Deletes a hook.") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = HookApiResourceSwagger.DeleteHookResponse.class))) public String deleteHook(@PathParam("hookId") @Parameter(description = "hookId") final Long hookId) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/instancemode/api/InstanceModeApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/instancemode/api/InstanceModeApiResource.java index 764beec934b..8b9b644c71b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/instancemode/api/InstanceModeApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/instancemode/api/InstanceModeApiResource.java @@ -27,7 +27,10 @@ import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Consumes; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import lombok.RequiredArgsConstructor; @@ -62,7 +65,7 @@ public void afterPropertiesSet() throws Exception { @PUT @Consumes({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Changes the Fineract instance mode", description = "") + @Operation(summary = "Changes the Fineract instance mode", tags = {"Instance Mode"}, description = "") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = InstanceModeApiResourceSwagger.ChangeInstanceModeRequest.class))) @ApiResponse(responseCode = "200", description = "OK") @SuppressFBWarnings("SLF4J_SIGN_ONLY_FORMAT") diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/InlineJobApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/InlineJobApiResource.java index 3d8eb335bee..0c952ebde95 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/InlineJobApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/InlineJobApiResource.java @@ -27,7 +27,10 @@ import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Consumes; import jakarta.ws.rs.POST; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; @@ -53,7 +56,7 @@ public class InlineJobApiResource { @Path("{jobName}/inline") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Starts an inline Job", description = "Starts an inline Job") + @Operation(summary = "Starts an inline Job", tags = {"Inline Job"}, description = "Starts an inline Job") @RequestBody(content = @Content(schema = @Schema(implementation = InlineJobResourceSwagger.InlineJobRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = InlineJobResourceSwagger.InlineJobResponse.class))) @ApiResponse(responseCode = "400", description = "Request body item size validation error") 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 97c47be455c..cac7fee2a53 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 @@ -27,7 +27,10 @@ import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; import jakarta.ws.rs.core.Context; @@ -67,7 +70,7 @@ public SchedulerApiResource(final PlatformSecurityContext context, final JobRegi @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Scheduler Status", description = "Returns the scheduler status.\n" + "\n" + "Example Requests:\n" + "\n" + @Operation(summary = "Retrieve Scheduler Status", tags = {"Scheduler"}, description = "Returns the scheduler status.\n" + "\n" + "Example Requests:\n" + "\n" + "scheduler") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SchedulerApiResourceSwagger.GetSchedulerResponse.class))) public String retrieveStatus(@Context final UriInfo uriInfo) { @@ -82,7 +85,7 @@ public String retrieveStatus(@Context final UriInfo uriInfo) { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Activate Scheduler Jobs | Suspend Scheduler Jobs", description = "Activates the scheduler job service. | Suspends the scheduler job service.") + @Operation(summary = "Activate Scheduler Jobs | Suspend Scheduler Jobs", tags = {"Scheduler"}, description = "Activates the scheduler job service. | Suspends the scheduler job service.") @ApiResponse(responseCode = "200", description = "POST : scheduler?command=start\n\n" + "\n" + "POST : scheduler?command=stop") public Response changeSchedulerStatus( @QueryParam(SchedulerJobApiConstants.COMMAND) @Parameter(description = "command") final String commandParam) { 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 79df8a3d421..2096dcb55c9 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 @@ -36,7 +36,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -89,7 +92,7 @@ public class SchedulerJobApiResource { private final SqlValidator sqlValidator; @GET - @Operation(summary = "Retrieve Scheduler Jobs", operationId = "retrieveAllSchedulerJobs", description = "Returns the list of jobs.\n" + @Operation(summary = "Retrieve Scheduler Jobs", operationId = "retrieveAllSchedulerJobs", tags = {"SCHEDULER JOB"}, description = "Returns the list of jobs.\n" + "\n" + "Example Requests:\n" + "\n" + "jobs") @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = SchedulerJobApiResourceSwagger.GetJobsResponse.class)))) public String retrieveAll(@Context final UriInfo uriInfo) { @@ -101,7 +104,7 @@ public String retrieveAll(@Context final UriInfo uriInfo) { @GET @Path("{" + SchedulerJobApiConstants.JOB_ID + "}") - @Operation(summary = "Retrieve a Job", operationId = "retrieveOneSchedulerJob", description = "Returns the details of a Job.\n" + "\n" + @Operation(summary = "Retrieve a Job", operationId = "retrieveOneSchedulerJob", tags = {"SCHEDULER JOB"}, description = "Returns the details of a Job.\n" + "\n" + "Example Requests:\n" + "\n" + "jobs/5") @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, @@ -111,7 +114,7 @@ public String retrieveOne(@PathParam(SchedulerJobApiConstants.JOB_ID) @Parameter @GET @Path(SHORT_NAME_PARAM + "/{shortName}") - @Operation(summary = "Retrieve a Job", description = "Returns the details of a Job bu shortName.\n" + "\n" + "Example Requests:\n" + @Operation(summary = "Retrieve a Job", tags = {"SCHEDULER JOB"}, description = "Returns the details of a Job bu shortName.\n" + "\n" + "Example Requests:\n" + "\n" + "jobs/short-name/SA_PINT") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SchedulerJobApiResourceSwagger.GetJobsResponse.class))) public String retrieveByShortName( @@ -122,7 +125,7 @@ public String retrieveByShortName( @GET @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") + @Operation(summary = "Retrieve Job Run History", tags = {"SCHEDULER JOB"}, description = "Example Requests:\n" + "\n" + "jobs/5/runhistory?offset=0&limit=200") @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, @@ -135,7 +138,7 @@ public String retrieveHistory(@Context final UriInfo uriInfo, @GET @Path(SHORT_NAME_PARAM + "/{shortName}/" + SchedulerJobApiConstants.JOB_RUN_HISTORY) - @Operation(summary = "Retrieve Job Run History", description = "Example Requests:\n" + "\n" + @Operation(summary = "Retrieve Job Run History", tags = {"SCHEDULER JOB"}, description = "Example Requests:\n" + "\n" + "jobs/short-name/SA_PINT/runhistory?offset=0&limit=200") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SchedulerJobApiResourceSwagger.GetJobsJobIDJobRunHistoryResponse.class))) public String retrieveHistoryByShortName(@Context final UriInfo uriInfo, @@ -150,7 +153,7 @@ public String retrieveHistoryByShortName(@Context final UriInfo uriInfo, @POST @Path("{" + SchedulerJobApiConstants.JOB_ID + "}") @Consumes({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Run a Job", description = "Manually Execute Specific Job.") + @Operation(summary = "Run a Job", tags = {"SCHEDULER JOB"}, description = "Manually Execute Specific Job.") @RequestBody(content = @Content(schema = @Schema(implementation = SchedulerJobApiResourceSwagger.ExecuteJobRequest.class))) @ApiResponse(responseCode = "200", description = "POST: jobs/1?command=executeJob") public Response executeJob(@PathParam(SchedulerJobApiConstants.JOB_ID) @Parameter(description = "jobId") final Long jobId, @@ -162,7 +165,7 @@ public Response executeJob(@PathParam(SchedulerJobApiConstants.JOB_ID) @Paramete @POST @Path(SHORT_NAME_PARAM + "/{shortName}") @Consumes({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Run a Job", description = "Manually Execute Specific Job.") + @Operation(summary = "Run a Job", tags = {"SCHEDULER JOB"}, description = "Manually Execute Specific Job.") @RequestBody(content = @Content(schema = @Schema(implementation = SchedulerJobApiResourceSwagger.ExecuteJobRequest.class))) @ApiResponse(responseCode = "200", description = "POST: jobs/short-name/SA_PINT?command=executeJob") public Response executeJobByShortName( @@ -175,7 +178,7 @@ public Response executeJobByShortName( @PUT @Path("{" + SchedulerJobApiConstants.JOB_ID + "}") @Consumes({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update a Job", description = "Updates the details of a job.") + @Operation(summary = "Update a Job", tags = {"SCHEDULER JOB"}, description = "Updates the details of a job.") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = SchedulerJobApiResourceSwagger.PutJobsJobIDRequest.class))) @ApiResponse(responseCode = "200", description = "OK") public String updateJobDetail(@PathParam(SchedulerJobApiConstants.JOB_ID) @Parameter(description = "jobId") final Long jobId, @@ -186,7 +189,7 @@ public String updateJobDetail(@PathParam(SchedulerJobApiConstants.JOB_ID) @Param @PUT @Path(SHORT_NAME_PARAM + "/{shortName}") @Consumes({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update a Job", description = "Updates the details of a job.") + @Operation(summary = "Update a Job", tags = {"SCHEDULER JOB"}, description = "Updates the details of a job.") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = SchedulerJobApiResourceSwagger.PutJobsJobIDRequest.class))) @ApiResponse(responseCode = "200", description = "OK") public String updateJobDetailByShortName( 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 526a1b3563d..388ed169b0c 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 @@ -31,7 +31,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -71,7 +74,7 @@ public class ReportMailingJobApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create a Report Mailing Job", operationId = "createReportMailingJob", description = "Mandatory Fields: " + @Operation(summary = "Create a Report Mailing Job", operationId = "createReportMailingJob", tags = {"Report Mailing Jobs"}, description = "Mandatory Fields: " + "name, startDateTime, stretchyReportId, emailRecipients, emailSubject, emailMessage, emailAttachmentFileFormatId, recurrence, isActive\n" + "\n" + "Optional Fields: " + "description, stretchyReportParamMap") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = ReportMailingJobApiResourceSwagger.PostReportMailingJobsRequest.class))) @@ -89,7 +92,7 @@ public String createReportMailingJob(@Parameter(hidden = true) final String apiR @Path("{entityId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update a Report Mailing Job\n", operationId = "updateReportMailingJob", description = "") + @Operation(summary = "Update a Report Mailing Job\n", operationId = "updateReportMailingJob", tags = {"Report Mailing Jobs"}, description = "") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = ReportMailingJobApiResourceSwagger.PutReportMailingJobsRequest.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, @@ -107,7 +110,7 @@ public String updateReportMailingJob(@PathParam("entityId") @Parameter(descripti @Path("{entityId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Delete a Report Mailing Job", operationId = "deleteReportMailingJob", description = "") + @Operation(summary = "Delete a Report Mailing Job", operationId = "deleteReportMailingJob", tags = {"Report Mailing Jobs"}, description = "") @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) { @@ -123,7 +126,7 @@ public String deleteReportMailingJob(@PathParam("entityId") @Parameter(descripti @GET @Path("{entityId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Report Mailing Job", operationId = "retrieveOneReportMailingJob", description = "Example Requests:\n" + @Operation(summary = "Retrieve a Report Mailing Job", operationId = "retrieveOneReportMailingJob", tags = {"Report Mailing Jobs"}, description = "Example Requests:\n" + "\n" + "reportmailingjobs/1\n" + "\n" + "\n" + "reportmailingjobs/1?template=true") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ReportMailingJobApiResourceSwagger.GetReportMailingJobsResponse.class))) public String retrieveReportMailingJob(@PathParam("entityId") @Parameter(description = "entityId") final Long entityId, @@ -147,7 +150,7 @@ public String retrieveReportMailingJob(@PathParam("entityId") @Parameter(descrip @GET @Path("template") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Report Mailing Job Details Template", operationId = "retrieveTemplateReportMailingJob", 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" + @Operation(summary = "Retrieve Report Mailing Job Details Template", operationId = "retrieveTemplateReportMailingJob", tags = {"Report Mailing Jobs"}, 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") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ReportMailingJobApiResourceSwagger.GetReportMailingJobsTemplate.class))) public String retrieveReportMailingJobTemplate(@Context final UriInfo uriInfo) { @@ -164,7 +167,7 @@ public String retrieveReportMailingJobTemplate(@Context final UriInfo uriInfo) { @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Report Mailing Jobs", operationId = "retrieveAllReportMailingJobs", description = "Example Requests:\n" + @Operation(summary = "List Report Mailing Jobs", operationId = "retrieveAllReportMailingJobs", tags = {"Report Mailing Jobs"}, description = "Example Requests:\n" + "\n" + "reportmailingjobs") @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = ReportMailingJobApiResourceSwagger.GetReportMailingJobsResponse.class)))) public String retrieveAllReportMailingJobs(@Context final UriInfo uriInfo, 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 d5f2aaa0fe0..c331e5fe173 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 @@ -25,7 +25,10 @@ import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.GET; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; import jakarta.ws.rs.core.Context; @@ -58,7 +61,7 @@ public class ReportMailingJobRunHistoryApiResource { @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Report Mailing Job History", operationId = "retrieveAllReportMailingJobRunHistory", description = "The list capability of report mailing job history can support pagination and sorting.\n" + @Operation(summary = "List Report Mailing Job History", operationId = "retrieveAllReportMailingJobRunHistory", tags = {"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") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ReportMailingJobRunHistoryData.class))) public String retrieveAllByReportMailingJobId(@Context final UriInfo uriInfo, diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/api/SmsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/api/SmsApiResource.java index 8c128f49d88..a9393e7fb51 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/api/SmsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/api/SmsApiResource.java @@ -29,7 +29,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; @@ -68,7 +71,7 @@ public class SmsApiResource { private final DefaultToApiJsonSerializer apiJsonSerializer; @GET - @Operation(summary = "List all SMS messages", operationId = "retrieveAllSms") + @Operation(summary = "List all SMS messages", operationId = "retrieveAllSms", tags = {"SMS"}) public List retrieveAll() { context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSIONS); return readPlatformService.retrieveAll(); @@ -76,7 +79,7 @@ public List retrieveAll() { @POST @Consumes({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create a SMS message", operationId = "createSms") + @Operation(summary = "Create a SMS message", operationId = "createSms", tags = {"SMS"}) public CommandProcessingResult create(final SmsCreationRequest smsCreationRequest) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createSms() .withJson(apiJsonSerializer.serialize(smsCreationRequest)).build(); @@ -85,14 +88,14 @@ public CommandProcessingResult create(final SmsCreationRequest smsCreationReques @GET @Path("{resourceId}") - @Operation(summary = "Retrieve a SMS message", operationId = "retrieveOneSms") + @Operation(summary = "Retrieve a SMS message", operationId = "retrieveOneSms", tags = {"SMS"}) public SmsData retrieveOne(@PathParam("resourceId") final Long resourceId) { return readPlatformService.retrieveOne(resourceId); } @GET @Path("{campaignId}/messageByStatus") - @Operation(summary = "Retrieve SMS messages by status", operationId = "retrieveAllSmsByStatus") + @Operation(summary = "Retrieve SMS messages by status", operationId = "retrieveAllSmsByStatus", tags = {"SMS"}) public Page retrieveAllSmsByStatus(@PathParam("campaignId") final Long campaignId, @BeanParam SmsRequestParam smsRequestParam) { context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSIONS); @@ -113,7 +116,7 @@ public Page retrieveAllSmsByStatus(@PathParam("campaignId") final Long @PUT @Path("{resourceId}") @Consumes({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update a SMS message", operationId = "updateSms") + @Operation(summary = "Update a SMS message", operationId = "updateSms", tags = {"SMS"}) public CommandProcessingResult update(@PathParam("resourceId") final Long resourceId, final SmsUpdateRequest smsUpdateRequest) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateSms(resourceId) .withJson(apiJsonSerializer.serialize(smsUpdateRequest)).build(); @@ -122,7 +125,7 @@ public CommandProcessingResult update(@PathParam("resourceId") final Long resour @DELETE @Path("{resourceId}") - @Operation(summary = "Delete a SMS message", operationId = "deleteSms") + @Operation(summary = "Delete a SMS message", operationId = "deleteSms", tags = {"SMS"}) public CommandProcessingResult delete(@PathParam("resourceId") final Long resourceId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteSms(resourceId).build(); return commandsSourceWritePlatformService.logCommandSource(commandRequest); 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 ab365c4d423..1929d85b7d3 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 @@ -22,7 +22,10 @@ import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; @@ -55,6 +58,7 @@ public class LikelihoodApiResource { @GET @Path("{ppiName}") @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Retrieve Likelihood", tags = {"Likelihood"}, description = "") public String retrieveAll(@PathParam("ppiName") final String ppiName) { this.context.authenticatedUser().validateHasReadPermission(PovertyLineApiConstants.POVERTY_LINE_RESOURCE_NAME); @@ -67,6 +71,7 @@ public String retrieveAll(@PathParam("ppiName") final String ppiName) { @GET @Path("{ppiName}/{likelihoodId}") @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Retrieve a Likelihood", tags = {"Likelihood"}, description = "") public String retrieve(@PathParam("likelihoodId") final Long likelihoodId, @PathParam("ppiName") final String ppiName) { this.context.authenticatedUser().validateHasReadPermission(PovertyLineApiConstants.POVERTY_LINE_RESOURCE_NAME); @@ -80,6 +85,7 @@ public String retrieve(@PathParam("likelihoodId") final Long likelihoodId, @Path @Path("{ppiName}/{likelihoodId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Update a Likelihood", tags = {"Likelihood"}, description = "") public String update(@PathParam("likelihoodId") final Long likelihoodId, final String apiRequestBodyAsJson, @PathParam("ppiName") final String ppiName) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/PovertyLineApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/PovertyLineApiResource.java index bea106c454c..53b323c4936 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/PovertyLineApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/PovertyLineApiResource.java @@ -20,7 +20,10 @@ import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.GET; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; @@ -46,6 +49,7 @@ public class PovertyLineApiResource { @GET @Path("{ppiName}") @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Retrieve All Poverty Lines", tags = {"Poverty Line"}, description = "") public String retrieveAll(@PathParam("ppiName") final String ppiName) { this.context.authenticatedUser().validateHasReadPermission(PovertyLineApiConstants.POVERTY_LINE_RESOURCE_NAME); @@ -58,6 +62,7 @@ public String retrieveAll(@PathParam("ppiName") final String ppiName) { @GET @Path("{ppiName}/{likelihoodId}") @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Retrieve a Poverty Line", tags = {"Poverty Line"}, description = "") public String retrieveAll(@PathParam("ppiName") final String ppiName, @PathParam("likelihoodId") final Long likelihoodId) { 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 3965f19d21c..94fe462a7c4 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 @@ -31,7 +31,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; @@ -69,7 +72,7 @@ public class SurveyApiResource { @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve surveys", description = "Retrieve surveys. This allows to retrieve the list of survey tables registered .") + @Operation(summary = "Retrieve surveys", tags = {"Survey"}, description = "Retrieve surveys. This allows to retrieve the list of survey tables registered .") @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = SurveyApiResourceSwagger.GetSurveyResponse.class)))) public String retrieveSurveys() { @@ -82,7 +85,7 @@ public String retrieveSurveys() { @GET @Path("{surveyName}") @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.") + @Operation(summary = "Retrieve survey", tags = {"Survey"}, description = "Lists a registered survey table details and the Apache Fineract Core application table they are registered to.") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SurveyApiResourceSwagger.GetSurveyResponse.class))) public String retrieveSurvey(@PathParam("surveyName") @Parameter(description = "surveyName") final String surveyName) { @@ -98,7 +101,7 @@ public String retrieveSurvey(@PathParam("surveyName") @Parameter(description = " @Path("{surveyName}/{apptableId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create an entry in the survey table", description = "Insert and entry in a survey table (full fill the survey)." + @Operation(summary = "Create an entry in the survey table", tags = {"Survey"}, description = "Insert and entry in a survey table (full fill the survey)." + "\n" + "\n" + "Refer Link for sample Body: [ https://fineract.apache.org/docs/legacy/#survey_create ] ") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = SurveyApiResourceSwagger.PostSurveySurveyNameApptableIdRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SurveyApiResourceSwagger.PostSurveySurveyNameApptableIdResponse.class))) @@ -119,6 +122,7 @@ public String createDatatableEntry(@PathParam("surveyName") @Parameter(descripti @GET @Path("{surveyName}/{clientId}") @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Retrieve Client Survey Overview", tags = {"Survey"}, description = "") public String getClientSurveyOverview(@PathParam("surveyName") final String surveyName, @PathParam("clientId") final Long clientId) { this.context.authenticatedUser().validateHasReadPermission(SurveyApiConstants.SURVEY_RESOURCE_NAME); @@ -131,6 +135,7 @@ public String getClientSurveyOverview(@PathParam("surveyName") final String surv @GET @Path("{surveyName}/{clientId}/{entryId}") @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Retrieve Survey Entry", tags = {"Survey"}, description = "") public String getSurveyEntry(@PathParam("surveyName") final String surveyName, @PathParam("clientId") final Long clientId, @PathParam("entryId") final Long entryId) { @@ -146,6 +151,7 @@ public String getSurveyEntry(@PathParam("surveyName") final String surveyName, @ @Path("register/{surveyName}/{apptable}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Register a Survey", tags = {"Survey"}, description = "Registers a new survey for a data table") public String register(@PathParam("surveyName") final String datatable, @PathParam("apptable") final String apptable, final String apiRequestBodyAsJson) { @@ -161,6 +167,7 @@ public String register(@PathParam("surveyName") final String datatable, @PathPar @DELETE @Path("{surveyName}/{clientId}/{fulfilledId}") @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Delete Survey Entries", tags = {"Survey"}, description = "Deletes specific survey entries from the data table") public String deleteDatatableEntries(@PathParam("surveyName") final String surveyName, @PathParam("clientId") final Long clientId, @PathParam("fulfilledId") final Long fulfilledId) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/api/InteropApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/api/InteropApiResource.java index 3e88c2faca8..8def8f4136e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/api/InteropApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/api/InteropApiResource.java @@ -33,7 +33,10 @@ import jakarta.ws.rs.DefaultValue; import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -87,7 +90,7 @@ public class InteropApiResource { @GET @Produces({ MediaType.APPLICATION_JSON }) @Path("health") - @Operation(summary = "Query Interoperation Health Request", description = "") + @Operation(summary = "Query Interoperation Health Request", tags = {"Inter Operation"}, description = "") @ApiResponse(responseCode = "200", description = "OK") public String health(@Context UriInfo uriInfo) { return "OK"; @@ -96,7 +99,7 @@ public String health(@Context UriInfo uriInfo) { @GET @Produces({ MediaType.APPLICATION_JSON }) @Path("accounts/{accountId}") - @Operation(summary = "Query Interoperation Account details", description = "") + @Operation(summary = "Query Interoperation Account details", tags = {"Inter Operation"}, description = "") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = InteropAccountData.class))) public String getAccountDetails(@PathParam("accountId") @Parameter(description = "accountId") String accountId, @Context UriInfo uriInfo) { @@ -109,7 +112,7 @@ public String getAccountDetails(@PathParam("accountId") @Parameter(description = @GET @Produces({ MediaType.APPLICATION_JSON }) @Path("accounts/{accountId}/transactions") - @Operation(summary = "Query transactions by Account Id", description = "") + @Operation(summary = "Query transactions by Account Id", tags = {"Inter Operation"}, description = "") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = InteropTransactionsData.class))) public String getAccountTransactions(@PathParam("accountId") @Parameter(description = "accountId") String accountId, @DefaultValue("true") @QueryParam("debit") @Parameter(description = "debit") boolean debit, @@ -131,7 +134,7 @@ public String getAccountTransactions(@PathParam("accountId") @Parameter(descript @GET @Produces({ MediaType.APPLICATION_JSON }) @Path("accounts/{accountId}/identifiers") - @Operation(summary = "Query Interoperation secondary identifiers by Account Id", description = "") + @Operation(summary = "Query Interoperation secondary identifiers by Account Id", tags = {"Inter Operation"}, description = "") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = InteropIdentifiersResponseData.class))) public String getAccountIdentifiers(@PathParam("accountId") @Parameter(description = "accountId") String accountId, @Context UriInfo uriInfo) { @@ -144,7 +147,7 @@ public String getAccountIdentifiers(@PathParam("accountId") @Parameter(descripti @GET @Produces({ MediaType.APPLICATION_JSON }) @Path("parties/{idType}/{idValue}") - @Operation(summary = "Query Interoperation Account by secondary identifier", description = "") + @Operation(summary = "Query Interoperation Account by secondary identifier", tags = {"Inter Operation"}, description = "") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = InteropIdentifierAccountResponseData.class))) public String getAccountByIdentifier(@PathParam("idType") @Parameter(description = "idType") InteropIdentifierType idType, @PathParam("idValue") @Parameter(description = "idValue") String idValue, @Context UriInfo uriInfo) { @@ -157,7 +160,7 @@ public String getAccountByIdentifier(@PathParam("idType") @Parameter(description @GET @Produces({ MediaType.APPLICATION_JSON }) @Path("parties/{idType}/{idValue}/{subIdOrType}") - @Operation(summary = "Query Interoperation Account by secondary identifier", description = "") + @Operation(summary = "Query Interoperation Account by secondary identifier", tags = {"Inter Operation"}, description = "") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = InteropIdentifierAccountResponseData.class))) public String getAccountByIdentifier(@PathParam("idType") @Parameter(description = "idType") InteropIdentifierType idType, @PathParam("idValue") @Parameter(description = "idValue") String idValue, @@ -172,7 +175,7 @@ public String getAccountByIdentifier(@PathParam("idType") @Parameter(description @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @Path("parties/{idType}/{idValue}") - @Operation(summary = "Interoperation Identifier registration", description = "") + @Operation(summary = "Interoperation Identifier registration", tags = {"Inter Operation"}, description = "") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = InteropIdentifierRequestData.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = InteropIdentifierAccountResponseData.class))) public String registerAccountIdentifier(@PathParam("idType") @Parameter(description = "idType") InteropIdentifierType idType, @@ -192,7 +195,7 @@ public String registerAccountIdentifier(@PathParam("idType") @Parameter(descript @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @Path("parties/{idType}/{idValue}/{subIdOrType}") - @Operation(summary = "Interoperation Identifier registration", description = "") + @Operation(summary = "Interoperation Identifier registration", tags = {"Inter Operation"}, description = "") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = InteropIdentifierRequestData.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = InteropIdentifierAccountResponseData.class))) public String registerAccountIdentifier(@PathParam("idType") @Parameter(description = "idType") InteropIdentifierType idType, @@ -212,7 +215,7 @@ public String registerAccountIdentifier(@PathParam("idType") @Parameter(descript @DELETE @Produces({ MediaType.APPLICATION_JSON }) @Path("parties/{idType}/{idValue}") - @Operation(summary = "Allow Interoperation Identifier registration", description = "") + @Operation(summary = "Allow Interoperation Identifier registration", tags = {"Inter Operation"}, description = "") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = InteropIdentifierRequestData.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = InteropIdentifierAccountResponseData.class))) public String deleteAccountIdentifier(@PathParam("idType") @Parameter(description = "idType") InteropIdentifierType idType, @@ -229,7 +232,7 @@ public String deleteAccountIdentifier(@PathParam("idType") @Parameter(descriptio @DELETE @Produces({ MediaType.APPLICATION_JSON }) @Path("parties/{idType}/{idValue}/{subIdOrType}") - @Operation(summary = "Allow Interoperation Identifier registration", description = "") + @Operation(summary = "Allow Interoperation Identifier registration", tags = {"Inter Operation"}, description = "") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = InteropIdentifierRequestData.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = InteropIdentifierAccountResponseData.class))) public String deleteAccountIdentifier(@PathParam("idType") @Parameter(description = "idType") InteropIdentifierType idType, @@ -247,7 +250,7 @@ public String deleteAccountIdentifier(@PathParam("idType") @Parameter(descriptio @GET @Produces({ MediaType.APPLICATION_JSON }) @Path("transactions/{transactionCode}/requests/{requestCode}") - @Operation(summary = "Query Interoperation Transaction Request", description = "") + @Operation(summary = "Query Interoperation Transaction Request", tags = {"Inter Operation"}, description = "") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = InteropTransactionRequestResponseData.class))) public String getTransactionRequest(@PathParam("transactionCode") @Parameter(description = "transactionCode") String transactionCode, @PathParam("requestCode") @Parameter(description = "requestCode") String requestCode, @Context UriInfo uriInfo) { @@ -263,7 +266,7 @@ public String getTransactionRequest(@PathParam("transactionCode") @Parameter(des @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @Path("requests") - @Operation(summary = "Allow Interoperation Transaction Request", description = "") + @Operation(summary = "Allow Interoperation Transaction Request", tags = {"Inter Operation"}, description = "") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = InteropTransactionRequestData.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = InteropTransactionRequestResponseData.class))) public String createTransactionRequest(@Parameter(hidden = true) String quotesJson, @Context UriInfo uriInfo) { @@ -279,7 +282,7 @@ public String createTransactionRequest(@Parameter(hidden = true) String quotesJs @GET @Produces({ MediaType.APPLICATION_JSON }) @Path("transactions/{transactionCode}/quotes/{quoteCode}") - @Operation(summary = "Query Interoperation Quote", description = "") + @Operation(summary = "Query Interoperation Quote", tags = {"Inter Operation"}, description = "") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = InteropQuoteResponseData.class))) public String getQuote(@PathParam("transactionCode") @Parameter(description = "transactionCode") String transactionCode, @PathParam("quoteCode") @Parameter(description = "quoteCode") String quoteCode, @Context UriInfo uriInfo) { @@ -295,7 +298,7 @@ public String getQuote(@PathParam("transactionCode") @Parameter(description = "t @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @Path("quotes") - @Operation(summary = "Calculate Interoperation Quote", description = "") + @Operation(summary = "Calculate Interoperation Quote", tags = {"Inter Operation"}, description = "") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = InteropQuoteRequestData.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = InteropQuoteResponseData.class))) public String createQuote(@Parameter(hidden = true) String quotesJson, @Context UriInfo uriInfo) { @@ -310,7 +313,7 @@ public String createQuote(@Parameter(hidden = true) String quotesJson, @Context @GET @Produces({ MediaType.APPLICATION_JSON }) @Path("transactions/{transactionCode}/transfers/{transferCode}") - @Operation(summary = "Query Interoperation Transfer", description = "") + @Operation(summary = "Query Interoperation Transfer", tags = {"Inter Operation"}, description = "") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = InteropTransferResponseData.class))) public String getTransfer(@PathParam("transactionCode") @Parameter(description = "transactionCode") String transactionCode, @PathParam("transferCode") @Parameter(description = "transferCode") String transferCode, @Context UriInfo uriInfo) { @@ -326,7 +329,7 @@ public String getTransfer(@PathParam("transactionCode") @Parameter(description = @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @Path("transfers") - @Operation(summary = "Prepare Interoperation Transfer", description = "") + @Operation(summary = "Prepare Interoperation Transfer", tags = {"Inter Operation"}, description = "") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = InteropTransferRequestData.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = InteropTransferResponseData.class))) public String performTransfer(@QueryParam("action") @Parameter(description = "action") String action, @@ -354,7 +357,7 @@ public String performTransfer(@QueryParam("action") @Parameter(description = "ac @GET @Produces({ MediaType.APPLICATION_JSON }) @Path("accounts/{accountId}/kyc") - @Operation(summary = "Query KYC by Account Id", description = "") + @Operation(summary = "Query KYC by Account Id", tags = {"Inter Operation"}, description = "") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = InteropKycResponseData.class))) public String getClientKyc(@PathParam("accountId") @Parameter(description = "accountId") String accountId, @Context UriInfo uriInfo) { InteropKycResponseData result = interopService.getKyc(accountId); @@ -367,7 +370,7 @@ public String getClientKyc(@PathParam("accountId") @Parameter(description = "acc @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @Path("transactions/{accountId}/disburse") - @Operation(summary = "Disburse Loan by Account Id", description = "") + @Operation(summary = "Disburse Loan by Account Id", tags = {"Inter Operation"}, description = "") public String disburseLoan(@PathParam("accountId") @Parameter(description = "accountId") String accountId, @Parameter(hidden = true) final String apiRequestBodyAsJson, @Context UriInfo uriInfo) { return interopService.disburseLoan(accountId, apiRequestBodyAsJson); @@ -377,7 +380,7 @@ public String disburseLoan(@PathParam("accountId") @Parameter(description = "acc @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @Path("transactions/{accountId}/loanrepayment") - @Operation(summary = "Disburse Loan by Account Id", description = "") + @Operation(summary = "Disburse Loan by Account Id", tags = {"Inter Operation"}, description = "") public String loanRepayment(@PathParam("accountId") @Parameter(description = "accountId") String accountId, @Parameter(hidden = true) final String apiRequestBodyAsJson, @Context UriInfo uriInfo) { return interopService.loanRepayment(accountId, apiRequestBodyAsJson); diff --git a/fineract-provider/src/main/java/org/apache/fineract/notification/api/NotificationApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/notification/api/NotificationApiResource.java index 8b17692c356..9fd9367e5b6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/notification/api/NotificationApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/notification/api/NotificationApiResource.java @@ -27,7 +27,10 @@ import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; import jakarta.ws.rs.core.Context; @@ -59,7 +62,7 @@ public class NotificationApiResource { @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation + @Operation(summary = "Retrieve all Notifications", description = "Returns a paginated list of notifications for the authenticated user, with optional filtering by read status.", tags = {"Notification"}) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = NotificationApiResourceSwagger.GetNotificationsResponse.class))) public String getAllNotifications(@Context final UriInfo uriInfo, @QueryParam("orderBy") @Parameter(description = "orderBy") final String orderBy, @@ -86,6 +89,7 @@ public String getAllNotifications(@Context final UriInfo uriInfo, @PUT @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Update Notification Read Status", description = "Updates the read status of all notifications for the authenticated user.", tags = {"Notification"}) public void update() { this.context.authenticatedUser(); this.notificationReadPlatformService.updateNotificationReadStatus(); 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 3b6bee22442..288f323e930 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 @@ -34,7 +34,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -80,7 +83,7 @@ public class HolidaysApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create a Holiday", description = "Mandatory Fields: " + @Operation(summary = "Create a Holiday", tags = {"Holidays"}, description = "Mandatory Fields: " + "name, description, fromDate, toDate, repaymentsRescheduledTo, offices") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = HolidaysApiResourceSwagger.PostHolidaysRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = HolidaysApiResourceSwagger.PostHolidaysResponse.class))) @@ -97,7 +100,7 @@ public String createNewHoliday(@Parameter(hidden = true) final String apiRequest @Path("{holidayId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Activate a Holiday", description = "Always Holidays are created in pending state. This API allows to activate a holiday.\n" + @Operation(summary = "Activate a Holiday", tags = {"Holidays"}, description = "Always Holidays are created in pending state. This API allows to activate a holiday.\n" + "\n" + "Only the active holidays are considered for rescheduling the loan repayment.") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = HolidaysApiResourceSwagger.PostHolidaysHolidayIdRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = HolidaysApiResourceSwagger.PostHolidaysHolidayIdResponse.class))) @@ -128,7 +131,7 @@ public String handleCommands(@PathParam("holidayId") @Parameter(description = "h @GET @Path("{holidayId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Holiday", description = "Example Requests:\n" + "\n" + "holidays/1") + @Operation(summary = "Retrieve a Holiday", tags = {"Holidays"}, description = "Example Requests:\n" + "\n" + "holidays/1") @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) { @@ -146,7 +149,7 @@ public String retrieveOne(@PathParam("holidayId") @Parameter(description = "holi @Path("{holidayId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @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.") + @Operation(summary = "Update a Holiday", tags = {"Holidays"}, 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))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = HolidaysApiResourceSwagger.PutHolidaysHolidayIdResponse.class))) public String update(@PathParam("holidayId") @Parameter(description = "holidayId") final Long holidayId, @@ -162,7 +165,7 @@ public String update(@PathParam("holidayId") @Parameter(description = "holidayId @DELETE @Path("{holidayId}") @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.") + @Operation(summary = "Delete a Holiday", tags = {"Holidays"}, description = "This API allows to delete a holiday. This is a soft delete the deleted holiday status is marked as deleted.") @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(); @@ -176,7 +179,7 @@ private boolean is(final String commandParam, final String commandValue) { @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Holidays", description = "Example Requests:\n" + "\n" + "holidays?officeId=1") + @Operation(summary = "List Holidays", tags = {"Holidays"}, description = "Example Requests:\n" + "\n" + "holidays?officeId=1") @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, @@ -208,6 +211,7 @@ public String retrieveAllHolidays(@Context final UriInfo uriInfo, @GET @Path("/template") @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Retrieve Holiday Repayment Schedule Updation Type Options", description = "Returns the available options for updating repayment schedules during holidays.", tags = {"Holidays"}) public String retrieveRepaymentScheduleUpdationTyeOptions(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(HOLIDAY_RESOURCE_NAME); return this.toApiJsonSerializer.serialize(this.holidayReadPlatformService.retrieveRepaymentScheduleUpdationTyeOptions()); diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/api/OfficeTransactionsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/api/OfficeTransactionsApiResource.java index 256610cabd0..18d89602ef1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/api/OfficeTransactionsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/api/OfficeTransactionsApiResource.java @@ -22,7 +22,10 @@ import jakarta.ws.rs.DELETE; import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Context; @@ -32,6 +35,8 @@ import java.util.Collection; import java.util.HashSet; import java.util.Set; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; @@ -48,6 +53,7 @@ @Path("/v1/officetransactions") @Component @RequiredArgsConstructor +@Tag(name = "Office Transactions", description = "Endpoints for managing money transfers between different bank offices.") public class OfficeTransactionsApiResource { private static final Set RESPONSE_DATA_PARAMETERS = new HashSet<>( @@ -64,6 +70,7 @@ public class OfficeTransactionsApiResource { @GET @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "List office transactions", description = "Returns a list of all office-to-office transactions (inter-office transfers).", tags = {"Office Transactions"}) public String retrieveOfficeTransactions(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_READ_PERMISSIONS); @@ -77,6 +84,7 @@ public String retrieveOfficeTransactions(@Context final UriInfo uriInfo) { @GET @Path("template") @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Retrieve office transaction template", description = "Returns a template for creating a new office transaction, including list of offices and available currencies.", tags = {"Office Transactions"}) public String newOfficeTransactionDetails(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_READ_PERMISSIONS); @@ -90,6 +98,7 @@ public String newOfficeTransactionDetails(@Context final UriInfo uriInfo) { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Transfer money from one office to another", description = "Creates a new office-to-office transaction to transfer money.", tags = {"Office Transactions"}) public String transferMoneyFrom(final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createOfficeTransaction().withJson(apiRequestBodyAsJson).build(); @@ -102,6 +111,7 @@ public String transferMoneyFrom(final String apiRequestBodyAsJson) { @DELETE @Path("{transactionId}") @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Delete an office transaction", description = "Deletes a specific office-to-office transfer transaction by its ID.", tags = {"Office Transactions"}) public String delete(@PathParam("transactionId") final Long transactionId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteOfficeTransaction(transactionId).build(); 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 624a1f8ea51..67bf41a1f9d 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 @@ -32,7 +32,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -96,7 +99,7 @@ public class OfficesApiResource { @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Offices", description = "Example Requests:\n" + "\n" + "offices\n" + "\n" + "\n" + @Operation(summary = "List Offices", tags = {"Offices"}, description = "Example Requests:\n" + "\n" + "offices\n" + "\n" + "\n" + "offices?fields=id,name,openingDate") @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = OfficesApiResourceSwagger.GetOfficesResponse.class)))) public String retrieveOffices(@Context final UriInfo uriInfo, @@ -116,7 +119,7 @@ public String retrieveOffices(@Context final UriInfo uriInfo, @GET @Path("template") @Produces({ MediaType.APPLICATION_JSON }) - @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" + @Operation(summary = "Retrieve Office Details Template", tags = {"Offices"}, 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") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = OfficesApiResourceSwagger.GetOfficesTemplateResponse.class))) public String retrieveOfficeTemplate(@Context final UriInfo uriInfo) { @@ -131,7 +134,7 @@ public String retrieveOfficeTemplate(@Context final UriInfo uriInfo) { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create an Office", description = "Mandatory Fields\n" + "name, openingDate, parentId") + @Operation(summary = "Create an Office", tags = {"Offices"}, description = "Mandatory Fields\n" + "name, openingDate, parentId") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = OfficesApiResourceSwagger.PostOfficesRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = OfficesApiResourceSwagger.PostOfficesResponse.class))) public String createOffice(@Parameter(hidden = true) final String apiRequestBodyAsJson) { @@ -146,7 +149,7 @@ public String createOffice(@Parameter(hidden = true) final String apiRequestBody @GET @Path("{officeId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve an Office", description = "Example Requests:\n" + "\n" + "offices/1\n" + "\n" + "\n" + @Operation(summary = "Retrieve an Office", tags = {"Offices"}, description = "Example Requests:\n" + "\n" + "offices/1\n" + "\n" + "\n" + "offices/1?template=true\n" + "\n" + "\n" + "offices/1?fields=id,name,parentName") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = OfficesApiResourceSwagger.GetOfficesResponse.class))) public String retrieveOffice(@PathParam("officeId") @Parameter(description = "officeId") final Long officeId, @@ -164,7 +167,7 @@ public String retrieveOffice(@PathParam("officeId") @Parameter(description = "of @GET @Path("/external-id/{externalId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve an Office using external id", description = "Example Requests:\n" + "\n" + "offices/external-id/asd123\n" + @Operation(summary = "Retrieve an Office using external id", tags = {"Offices"}, description = "Example Requests:\n" + "\n" + "offices/external-id/asd123\n" + "\n" + "\n" + "offices/external-id/asd123?template=true\n" + "\n" + "\n" + "offices/external-id/asd123?fields=id,name,parentName") public OfficesApiResourceSwagger.GetOfficesResponse retrieveOfficeByExternalId( @@ -183,7 +186,7 @@ public OfficesApiResourceSwagger.GetOfficesResponse retrieveOfficeByExternalId( @Path("{officeId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update Office", description = "") + @Operation(summary = "Update Office", tags = {"Offices"}, description = "") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = OfficesApiResourceSwagger.PutOfficesOfficeIdRequest.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, @@ -200,7 +203,7 @@ public String updateOffice(@PathParam("officeId") @Parameter(description = "offi @Path("/external-id/{externalId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update Office", description = "") + @Operation(summary = "Update Office", tags = {"Offices"}, description = "") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = OfficesApiResourceSwagger.PutOfficesOfficeIdRequest.class))) public OfficesApiResourceSwagger.PutOfficesOfficeIdResponse updateOfficeWithExternalId( @Parameter(description = "externalId") @PathParam("externalId") final String externalId, @@ -217,6 +220,7 @@ public OfficesApiResourceSwagger.PutOfficesOfficeIdResponse updateOfficeWithExte @GET @Path("downloadtemplate") @Produces("application/vnd.ms-excel") + @Operation(summary = "Download office template", description = "Returns an Excel template for bulk importing offices.", tags = {"Offices"}) public Response getOfficeTemplate(@QueryParam("dateFormat") final String dateFormat) { return bulkImportWorkbookPopulatorService.getTemplate(GlobalEntityType.OFFICES.toString(), null, null, dateFormat); } @@ -226,6 +230,7 @@ public Response getOfficeTemplate(@QueryParam("dateFormat") final String dateFor @Consumes(MediaType.MULTIPART_FORM_DATA) @RequestBody(description = "Upload office template", content = { @Content(mediaType = MediaType.MULTIPART_FORM_DATA, schema = @Schema(implementation = UploadRequest.class)) }) + @Operation(summary = "Upload office template", description = "Uploads a filled Excel template to create multiple offices in bulk.", tags = {"Offices"}) public String postOfficeTemplate(@FormDataParam("file") InputStream uploadedInputStream, @FormDataParam("file") FormDataContentDisposition fileDetail, @FormDataParam("locale") final String locale, @FormDataParam("dateFormat") final String dateFormat) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/api/ProvisioningCategoryApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/api/ProvisioningCategoryApiResource.java index 4c645aefc4b..e0e301f57e9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/api/ProvisioningCategoryApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/api/ProvisioningCategoryApiResource.java @@ -24,7 +24,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; @@ -51,6 +54,7 @@ public class ProvisioningCategoryApiResource { @GET @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Retrieve all Provisioning Categories", description = "Returns a list of all defined provisioning categories.", tags = {"Provisioning Category"}) public List retrieveAll() { platformSecurityContext.authenticatedUser(); return provisioningCategoryReadPlatformService.retrieveAllProvisionCategories(); @@ -59,6 +63,7 @@ public List retrieveAll() { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Create a Provisioning Category", description = "Creates a new provisioning category for asset classification.", tags = {"Provisioning Category"}) public CommandProcessingResult createProvisioningCategory(final String apiRequestBodyAsJson) { platformSecurityContext.authenticatedUser(); CommandWrapper commandWrapper = new CommandWrapperBuilder().createProvisioningCategory().withJson(apiRequestBodyAsJson).build(); @@ -69,6 +74,7 @@ public CommandProcessingResult createProvisioningCategory(final String apiReques @Path("{categoryId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Update a Provisioning Category", description = "Updates the details of an existing provisioning category.", tags = {"Provisioning Category"}) public CommandProcessingResult updateProvisioningCategory(@PathParam("categoryId") final Long categoryId, final String apiRequestBodyAsJson) { platformSecurityContext.authenticatedUser(); @@ -80,6 +86,7 @@ public CommandProcessingResult updateProvisioningCategory(@PathParam("categoryId @DELETE @Path("{categoryId}") @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Delete a Provisioning Category", description = "Deletes a specific provisioning category by its ID.", tags = {"Provisioning Category"}) public CommandProcessingResult deleteProvisioningCategory(@PathParam("categoryId") final Long categoryId) { platformSecurityContext.authenticatedUser(); final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteProvisioningCategory(categoryId).build(); 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 2848058e1c0..fa3d74d8a35 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 @@ -31,7 +31,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Context; @@ -66,6 +69,8 @@ public class ProvisioningCriteriaApiResource { @GET @Path("template") @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Retrieve Provisioning Criteria Template", description = "Returns a template for creating new provisioning criteria, including product options and provisioning categories.", + tags = {"Provisioning Criteria"}) public ProvisioningCriteriaData retrieveTemplate() { platformSecurityContext.authenticatedUser(); return provisioningCriteriaReadPlatformService.retrievePrivisiongCriteriaTemplate(); @@ -74,7 +79,7 @@ public ProvisioningCriteriaData retrieveTemplate() { @GET @Path("{criteriaId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieves a Provisioning Criteria", description = "Retrieves a Provisioning Criteria") + @Operation(summary = "Retrieves a Provisioning Criteria", description = "Retrieves a Provisioning Criteria", tags = {"Provisioning Criteria"}) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ProvisioningCriteriaApiResourceSwagger.GetProvisioningCriteriaCriteriaIdResponse.class))) public ProvisioningCriteriaData retrieveProvisioningCriteria( @PathParam("criteriaId") @Parameter(description = "criteriaId") final Long criteriaId, @Context final UriInfo uriInfo) { @@ -89,7 +94,7 @@ public ProvisioningCriteriaData retrieveProvisioningCriteria( @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieves all created Provisioning Criterias", description = "Retrieves all created Provisioning Criterias") + @Operation(summary = "Retrieves all created Provisioning Criterias", tags = {"Provisioning Criteria"}, description = "Retrieves all created Provisioning Criterias") @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = ProvisioningCriteriaApiResourceSwagger.GetProvisioningCriteriaResponse.class)))) public List retrieveAllProvisioningCriterias() { platformSecurityContext.authenticatedUser(); @@ -99,7 +104,7 @@ public List retrieveAllProvisioningCriterias() { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create a new Provisioning Criteria", description = "Creates a new Provisioning Criteria\n" + "\n" + @Operation(summary = "Create a new Provisioning Criteria", tags = {"Provisioning Criteria"}, description = "Creates a new Provisioning Criteria\n" + "\n" + "Mandatory Fields: \n" + "criteriaName\n" + "provisioningcriteria\n" + "\n" + "Optional Fields: \n" + "loanProducts") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = ProvisioningCriteriaApiResourceSwagger.PostProvisioningCriteriaRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ProvisioningCriteriaApiResourceSwagger.PostProvisioningCriteriaResponse.class))) @@ -113,7 +118,7 @@ public CommandProcessingResult createProvisioningCriteria(@Parameter(hidden = tr @Path("{criteriaId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Updates a new Provisioning Criteria", description = "Updates a new Provisioning Criteria\n" + "\n" + @Operation(summary = "Updates a new Provisioning Criteria", tags = {"Provisioning Criteria"}, description = "Updates a new Provisioning Criteria\n" + "\n" + "Optional Fields\n" + "criteriaName, loanProducts, provisioningcriteria") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = ProvisioningCriteriaApiResourceSwagger.PutProvisioningCriteriaRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ProvisioningCriteriaApiResourceSwagger.PutProvisioningCriteriaResponse.class))) @@ -129,7 +134,7 @@ public CommandProcessingResult updateProvisioningCriteria( @DELETE @Path("{criteriaId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Deletes Provisioning Criteria", description = "Deletes Provisioning Criteria") + @Operation(summary = "Deletes Provisioning Criteria", tags = {"Provisioning Criteria"}, description = "Deletes Provisioning Criteria") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ProvisioningCriteriaApiResourceSwagger.DeleteProvisioningCriteriaResponse.class))) public CommandProcessingResult deleteProvisioningCriteria( @PathParam("criteriaId") @Parameter(description = "criteriaId") final Long criteriaId) { 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 3a0dc59ab1a..65e6f35e1c4 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 @@ -30,7 +30,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -76,7 +79,7 @@ public class StaffApiResource { private final CommandDispatcher dispatcher; @GET - @Operation(summary = "Retrieve Staff", operationId = "retrieveAllStaff", description = """ + @Operation(summary = "Retrieve Staff", operationId = "retrieveAllStaff", tags = {"Staff"}, description = """ Returns the list of staff members. Example Requests: @@ -99,7 +102,7 @@ public List retrieveAll(@QueryParam("officeId") @Parameter(descriptio @GET @Path("{staffId}") - @Operation(summary = "Retrieve a Staff Member", operationId = "retrieveOneStaff", description = """ + @Operation(summary = "Retrieve a Staff Member", operationId = "retrieveOneStaff", tags = {"Staff"}, description = """ Returns the details of a Staff Member. Example Requests: @@ -125,7 +128,7 @@ public StaffData retrieveOne(@PathParam("staffId") @Parameter(description = "sta @GET @Path("downloadtemplate") @Produces("application/vnd.ms-excel") - @Operation(summary = "Download bulk import template") + @Operation(summary = "Download bulk import template", tags = {"Staff"}) public Response getTemplate(@QueryParam("officeId") @Parameter(description = "officeId") final Long officeId, @QueryParam("dateFormat") @Parameter(description = "dateFormat") final String dateFormat) { return bulkImportWorkbookPopulatorService.getTemplate(GlobalEntityType.STAFF.toString(), officeId, null, dateFormat); @@ -133,7 +136,7 @@ public Response getTemplate(@QueryParam("officeId") @Parameter(description = "of @POST @Consumes({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create a staff member", operationId = "createStaff", description = """ + @Operation(summary = "Create a staff member", operationId = "createStaff", tags = {"Staff"}, description = """ Creates a staff member. Mandatory fields: @@ -160,7 +163,7 @@ public StaffCreateResponse createStaff(@RequestBody(required = true) @Valid Staf @PUT @Path("{staffId}") @Consumes({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update a Staff Member", description = "Updates the details of a staff member.") + @Operation(summary = "Update a Staff Member", tags = {"Staff"}, description = "Updates the details of a staff member.") public StaffUpdateResponse updateStaff(@PathParam("staffId") @Parameter(description = "staffId") final Long staffId, @RequestBody(required = true) @Valid StaffUpdateRequest request) { request.setId(staffId); @@ -180,6 +183,7 @@ public StaffUpdateResponse updateStaff(@PathParam("staffId") @Parameter(descript @Produces({ MediaType.WILDCARD }) @RequestBody(description = "Upload staff template", content = { @Content(mediaType = MediaType.MULTIPART_FORM_DATA, schema = @Schema(implementation = StaffUploadRequest.class)) }) + @Operation(summary = "Upload staff template", description = "Uploads a filled Excel template to create multiple staff members in bulk.", tags = {"Staff"}) public Long postTemplate(@FormDataParam("file") InputStream uploadedInputStream, @FormDataParam("file") FormDataContentDisposition fileDetail, @FormDataParam("locale") final String locale, @FormDataParam("dateFormat") final String dateFormat) { 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 be087b19237..9cb51f8ebab 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 @@ -24,7 +24,10 @@ import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; import java.time.Instant; @@ -54,7 +57,7 @@ public class WorkingDaysApiResource { @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Working days", description = "Example Requests:\n" + "\n" + "workingdays") + @Operation(summary = "List Working days", tags = {"Working days"}, description = "Example Requests:\n" + "\n" + "workingdays") public WorkingDaysData retrieveAll() { return this.workingDaysReadPlatformService.retrieve(); } @@ -62,7 +65,7 @@ public WorkingDaysData retrieveAll() { @PUT @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update a Working Day", description = "Mandatory Fields\n" + @Operation(summary = "Update a Working Day", tags = {"Working days"}, description = "Mandatory Fields\n" + "recurrence,repaymentRescheduleType,extendTermForDailyRepayments,locale") public WorkingDaysUpdateResponse update(@Valid WorkingDaysUpdateRequest request) { @@ -80,7 +83,7 @@ public WorkingDaysUpdateResponse update(@Valid WorkingDaysUpdateRequest request) @GET @Path("/template") @Produces({ MediaType.APPLICATION_JSON }) - @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" + @Operation(summary = "Working Days Template", tags = {"Working days"}, 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") public WorkingDaysData template() { return this.workingDaysReadPlatformService.repaymentRescheduleType(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/AccountTransfersApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/AccountTransfersApiResource.java index 57981eb2c9b..13e2fbbb8f6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/AccountTransfersApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/AccountTransfersApiResource.java @@ -29,7 +29,10 @@ import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -63,7 +66,7 @@ public class AccountTransfersApiResource { @GET @Path("template") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Account Transfer Template", operationId = "retrieveTemplateAccountTransfer", 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" + @Operation(summary = "Retrieve Account Transfer Template", operationId = "retrieveTemplateAccountTransfer", tags = {"Account Transfers"}, 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" + "\n\n" + "Field Defaults\n\n" + "Allowed Value Lists\n\n" + "Example Requests:\n\n" + "\n\n" + "accounttransfers/template?fromAccountType=2&fromOfficeId=1\n\n" + "\n\n" + "accounttransfers/template?fromAccountType=2&fromOfficeId=1&fromClientId=1\n\n" + "\n\n" @@ -83,7 +86,7 @@ public AccountTransferData template(@BeanParam AccountTransSearchParam accountTr @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create new Transfer", operationId = "createAccountTransfer", description = "Ability to create new transfer of monetary funds from one account to another.") + @Operation(summary = "Create new Transfer", operationId = "createAccountTransfer", tags = {"Account Transfers"}, description = "Ability to create new transfer of monetary funds from one account to another.") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = AccountTransferRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = AccountTransfersApiResourceSwagger.PostAccountTransfersResponse.class))) public CommandProcessingResult create(@Parameter(hidden = true) AccountTransferRequest accountTransferRequest) { @@ -95,7 +98,7 @@ public CommandProcessingResult create(@Parameter(hidden = true) AccountTransferR @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List account transfers", operationId = "retrieveAllAccountTransfers", description = "Lists account's transfers\n\n" + @Operation(summary = "List account transfers", operationId = "retrieveAllAccountTransfers", tags = {"Account Transfers"}, description = "Lists account's transfers\n\n" + "Example Requests:\n\n" + "\n\n" + "accounttransfers") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = AccountTransfersApiResourceSwagger.GetAccountTransfersResponse.class))) public Page retrieveAll(@QueryParam("externalId") @Parameter(description = "externalId") final String externalId, @@ -116,7 +119,7 @@ public Page retrieveAll(@QueryParam("externalId") @Paramete @GET @Path("{transferId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve account transfer", operationId = "retrieveOneAccountTransfer", description = "Retrieves account transfer\n\n" + @Operation(summary = "Retrieve account transfer", operationId = "retrieveOneAccountTransfer", tags = {"Account Transfers"}, description = "Retrieves account transfer\n\n" + "Example Requests :\n\n" + "\n\n" + "accounttransfers/1") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = AccountTransfersApiResourceSwagger.GetAccountTransfersResponse.GetAccountTransfersPageItems.class))) public AccountTransferData retrieveOne(@PathParam("transferId") @Parameter(description = "transferId") final Long transferId) { @@ -127,7 +130,7 @@ public AccountTransferData retrieveOne(@PathParam("transferId") @Parameter(descr @GET @Path("templateRefundByTransfer") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Refund of an Active Loan by Transfer Template", operationId = "retrieveTemplateRefundByTransfer", description = "Retrieves Refund of an Active Loan by Transfer Template" + @Operation(summary = "Retrieve Refund of an Active Loan by Transfer Template", operationId = "retrieveTemplateRefundByTransfer", tags = {"Account Transfers"}, description = "Retrieves Refund of an Active Loan by Transfer Template" + "Example Requests :\n\n" + "\n\n" + "accounttransfers/templateRefundByTransfer?fromAccountId=2&fromAccountType=1& toAccountId=1&toAccountType=2&toClientId=1&toOfficeId=1") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = AccountTransfersApiResourceSwagger.GetAccountTransfersTemplateRefundByTransferResponse.class))) @@ -144,7 +147,7 @@ public AccountTransferData templateRefundByTransfer(@BeanParam AccountTransSearc @Path("refundByTransfer") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Refund of an Active Loan by Transfer", operationId = "refundByTransfer", description = "Ability to refund an active loan by transferring to a savings account.") + @Operation(summary = "Refund of an Active Loan by Transfer", operationId = "refundByTransfer", tags = {"Account Transfers"}, description = "Ability to refund an active loan by transferring to a savings account.") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = AccountTransferRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = AccountTransfersApiResourceSwagger.PostAccountTransfersRefundByTransferResponse.class))) public CommandProcessingResult templateRefundByTransferPost(@Parameter(hidden = true) AccountTransferRequest accountTransferRequest) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionApiResource.java index b9af56216e5..d2a0a679d00 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionApiResource.java @@ -30,7 +30,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -88,7 +91,7 @@ public class StandingInstructionApiResource { @GET @Path("template") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Standing Instruction Template", operationId = "retrieveTemplateStandingInstruction", description = "This is a convenience resource. " + @Operation(summary = "Retrieve Standing Instruction Template", operationId = "retrieveTemplateStandingInstruction", tags = {"Standing Instructions"}, 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 Requests:\n" + "\n" + "standinginstructions/template?fromAccountType=2&fromOfficeId=1\n" + "\n" @@ -107,7 +110,7 @@ public StandingInstructionData template(@BeanParam StandingInstructionSearchPara @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create new Standing Instruction", operationId = "createStandingInstruction", description = "Ability to create new instruction for transfer of monetary funds from one account to another") + @Operation(summary = "Create new Standing Instruction", operationId = "createStandingInstruction", tags = {"Standing Instructions"}, description = "Ability to create new instruction for transfer of monetary funds from one account to another") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = StandingInstructionCreationRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = StandingInstructionApiResourceSwagger.PostStandingInstructionsResponse.class))) public CommandProcessingResult create(@Parameter(hidden = true) StandingInstructionCreationRequest creationRequest) { @@ -121,7 +124,7 @@ public CommandProcessingResult create(@Parameter(hidden = true) StandingInstruct @Path("{standingInstructionId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update Standing Instruction | Delete Standing Instruction", operationId = "updateStandingInstruction", description = "Ability to modify existing instruction for transfer of monetary funds from one account to another.\n" + @Operation(summary = "Update Standing Instruction | Delete Standing Instruction", operationId = "updateStandingInstruction", tags = {"Standing Instructions"}, description = "Ability to modify existing instruction for transfer of monetary funds from one account to another.\n" + "\n" + "PUT https://DomainName/api/v1/standinginstructions/1?command=update\n" + "\n\n" + "Ability to modify existing instruction for transfer of monetary funds from one account to another.\n" + "\n" + "PUT https://DomainName/api/v1/standinginstructions/1?command=delete") @@ -141,7 +144,7 @@ public CommandProcessingResult update( @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Standing Instructions", operationId = "retrieveAllStandingInstructions", description = "Example Requests:\n" + @Operation(summary = "List Standing Instructions", operationId = "retrieveAllStandingInstructions", tags = {"Standing Instructions"}, description = "Example Requests:\n" + "\n" + "standinginstructions") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = StandingInstructionApiResourceSwagger.GetStandingInstructionsResponse.class))) public Page retrieveAll( @@ -175,7 +178,7 @@ public Page retrieveAll( @GET @Path("{standingInstructionId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Standing Instruction", operationId = "retrieveOneStandingInstruction", description = "Example Requests :\n" + @Operation(summary = "Retrieve Standing Instruction", operationId = "retrieveOneStandingInstruction", tags = {"Standing Instructions"}, description = "Example Requests :\n" + "\n" + "standinginstructions/1") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = StandingInstructionApiResourceSwagger.GetStandingInstructionsStandingInstructionIdResponse.class))) public StandingInstructionData retrieveOne( diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionHistoryApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionHistoryApiResource.java index a9ca103694e..97a4513ecd2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionHistoryApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionHistoryApiResource.java @@ -25,7 +25,10 @@ import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.GET; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; import jakarta.ws.rs.core.MediaType; @@ -55,7 +58,7 @@ public class StandingInstructionHistoryApiResource { @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Standing Instructions Logged History", operationId = "retrieveAllStandingInstructionHistory", description = "The list capability of history can support pagination and sorting \n\n" + @Operation(summary = "Standing Instructions Logged History", operationId = "retrieveAllStandingInstructionHistory", tags = {"Standing Instructions History"}, description = "The list capability of history can support pagination and sorting \n\n" + "Example Requests :\n" + "\n" + "standinginstructionrunhistory\n" + "\n" + "standinginstructionrunhistory?orderBy=name&sortOrder=DESC\n" + "\n" + "standinginstructionrunhistory?offset=10&limit=50") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = StandingInstructionHistoryApiResourceSwagger.GetStandingInstructionRunHistoryResponse.class))) 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 9b2c44c5a52..14c85bcd9ae 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 @@ -29,7 +29,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -77,7 +80,7 @@ public class AccountsApiResource { @GET @Path("template") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Share Account Template", operationId = "retrieveTemplateShareAccount", 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" + @Operation(summary = "Retrieve Share Account Template", operationId = "retrieveTemplateShareAccount", tags = {"Share Account"}, 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 Requests:\n" + "\n" + "accounts/share/template?clientId=1\n" + "\n" + "\n" + "accounts/share/template?clientId=1&productId=1") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = AccountsApiResourceSwagger.GetAccountsTypeTemplateResponse.class))) @@ -91,7 +94,7 @@ public ShareAccountData template(@PathParam("type") @Parameter(description = "ty @GET @Path("{accountId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a share application/account", operationId = "retrieveOneShareAccount", description = "Retrieves a share application/account\n\n" + @Operation(summary = "Retrieve a share application/account", operationId = "retrieveOneShareAccount", tags = {"Share Account"}, description = "Retrieves a share application/account\n\n" + "Example Requests :\n" + "\n" + "shareaccount/1") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = AccountsApiResourceSwagger.GetAccountsTypeAccountIdResponse.class))) public ShareAccountData retrieveAccount(@PathParam("accountId") @Parameter(description = "accountId") final Long accountId, @@ -102,7 +105,7 @@ public ShareAccountData retrieveAccount(@PathParam("accountId") @Parameter(descr @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List share applications/accounts", operationId = "retrieveAllShareAccounts", description = "Lists share applications/accounts\n\n" + @Operation(summary = "List share applications/accounts", operationId = "retrieveAllShareAccounts", tags = {"Share Account"}, description = "Lists share applications/accounts\n\n" + "Example Requests:\n" + "\n" + "shareaccount") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = AccountsApiResourceSwagger.GetAccountsTypeResponse.class))) public Page retrieveAllAccounts(@PathParam("type") @Parameter(description = "type") final String accountType, @@ -114,7 +117,7 @@ public Page retrieveAllAccounts(@PathParam("type") @Parameter(descr @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Submit new share application", operationId = "createShareAccount", description = "Submits new share application\n\n" + @Operation(summary = "Submit new share application", operationId = "createShareAccount", tags = {"Share Account"}, description = "Submits new share application\n\n" + "Mandatory Fields: clientId, productId, submittedDate, savingsAccountId, requestedShares, applicationDate\n\n" + "Optional Fields: accountNo, externalId\n\n" + "Inherited from Product (if not provided): minimumActivePeriod, minimumActivePeriodFrequencyType, lockinPeriodFrequency, lockinPeriodFrequencyType") @@ -132,7 +135,7 @@ public CommandProcessingResult createAccount(@PathParam("type") @Parameter(descr @Path("{accountId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Approve share application | Undo approval share application | Reject share application | Activate a share account | Close a share account | Apply additional shares on a share account | Approve additional shares request on a share account | Reject additional shares request on a share account | Redeem shares on a share account", operationId = "handleCommandsShareAccount", description = "Approve share application:\n\n" + @Operation(tags = {"Share Account"}, summary = "Approve share application | Undo approval share application | Reject share application | Activate a share account | Close a share account | Apply additional shares on a share account | Approve additional shares request on a share account | Reject additional shares request on a share account | Redeem shares on a share account", operationId = "handleCommandsShareAccount", description = "Approve share application:\n\n" + "Approves share application so long as its in 'Submitted and pending approval' state.\n\n" + "Undo approval share application:\n\n" + "Will move 'approved' share application back to 'Submitted and pending approval' state.\n\n" + "Reject share application:\n\n" @@ -167,7 +170,7 @@ public CommandProcessingResult handleCommands(@PathParam("type") @Parameter(desc @Path("{accountId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Modify a share application", operationId = "updateShareAccount", description = "Share application can only be modified when in 'Submitted and pending approval' state. Once the application is approved, the details cannot be changed using this method. Specific api endpoints will be created to allow change of interest detail such as rate, compounding period, posting period etc") + @Operation(summary = "Modify a share application", operationId = "updateShareAccount", tags = {"Share Account"}, description = "Share application can only be modified when in 'Submitted and pending approval' state. Once the application is approved, the details cannot be changed using this method. Specific api endpoints will be created to allow change of interest detail such as rate, compounding period, posting period etc") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = AccountsApiResourceSwagger.PutAccountsTypeAccountIdRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = AccountsApiResourceSwagger.PutAccountsTypeAccountIdResponse.class))) public CommandProcessingResult updateAccount(@PathParam("type") @Parameter(description = "type") final String accountType, @@ -182,7 +185,7 @@ public CommandProcessingResult updateAccount(@PathParam("type") @Parameter(descr @GET @Path("downloadtemplate") @Produces("application/vnd.ms-excel") - @Operation(summary = "Download share accounts bulk imports template", operationId = "getShareAccountTemplate") + @Operation(summary = "Download share accounts bulk imports template", tags = {"Share Account"}, operationId = "getShareAccountTemplate") public Response getSharedAccountsTemplate(@QueryParam("officeId") final Long officeId, @QueryParam("dateFormat") final String dateFormat, @PathParam("type") @Parameter(description = "type") final String accountType) { @@ -192,7 +195,7 @@ public Response getSharedAccountsTemplate(@QueryParam("officeId") final Long off @POST @Path("uploadtemplate") @Consumes(MediaType.MULTIPART_FORM_DATA) - @Operation(summary = "Upload share accounts bulk imports data", operationId = "postShareAccountTemplate") + @Operation(summary = "Upload share accounts bulk imports data", tags = {"Share Account"}, operationId = "postShareAccountTemplate") @RequestBody(description = "Upload shared accounts template", content = { @Content(mediaType = MediaType.MULTIPART_FORM_DATA, schema = @Schema(implementation = UploadRequest.class)) }) public Long postSharedAccountsTemplate(@FormDataParam("file") InputStream uploadedInputStream, diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/api/EntityFieldConfigurationApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/api/EntityFieldConfigurationApiResource.java index 745a7f0bf8c..a0d5cc84f26 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/api/EntityFieldConfigurationApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/api/EntityFieldConfigurationApiResource.java @@ -22,7 +22,10 @@ import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.GET; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; @@ -47,7 +50,7 @@ public class EntityFieldConfigurationApiResource { @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieves the Entity Field Configuration", description = "It retrieves all the Entity Field Configuration") + @Operation(summary = "Retrieves the Entity Field Configuration", tags = {"Entity Field Configuration"}, description = "It retrieves all the Entity Field Configuration") public List getAddresses(@PathParam("entity") @Parameter(description = "entity") final String entityname) { this.context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSIONS); return this.readPlatformServicefld.retrieveFieldConfiguration(entityname); 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 85495f8aac8..094b7bdea9d 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 @@ -32,7 +32,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -83,7 +86,7 @@ public class CalendarsApiResource { @GET @Path("{calendarId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Calendar", operationId = "retrieveCalendar") + @Operation(summary = "Retrieve a Calendar", tags = {"Calendar"}, operationId = "retrieveCalendar") public CalendarData retrieveCalendar(@PathParam("calendarId") final Long calendarId, @PathParam("entityType") final String entityType, @PathParam("entityId") final Long entityId, @Context final UriInfo uriInfo) { @@ -112,7 +115,7 @@ public CalendarData retrieveCalendar(@PathParam("calendarId") final Long calenda */ @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Calendars by Entity", operationId = "retrieveCalendarsByEntityId") + @Operation(summary = "Retrieve Calendars by Entity", tags = {"Calendar"}, operationId = "retrieveCalendarsByEntityId") public List retrieveCalendarsByEntity(@PathParam("entityType") final String entityType, @PathParam("entityId") final Long entityId, @Context final UriInfo uriInfo, @DefaultValue("all") @QueryParam("calendarType") final String calendarType) { @@ -137,7 +140,7 @@ public List retrieveCalendarsByEntity(@PathParam("entityType") fin @GET @Path("template") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Calendar Template", operationId = "retrieveTemplateCalendar") + @Operation(summary = "Retrieve Calendar Template", tags = {"Calendar"}, operationId = "retrieveTemplateCalendar") public CalendarData retrieveNewCalendarDetails(@Context final UriInfo uriInfo, @PathParam("entityType") final String entityType, @PathParam("entityId") final Long entityId) { context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSIONS); @@ -147,7 +150,7 @@ public CalendarData retrieveNewCalendarDetails(@Context final UriInfo uriInfo, @ @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create a Calendar", operationId = "createCalendar") + @Operation(summary = "Create a Calendar", tags = {"Calendar"}, operationId = "createCalendar") public CommandProcessingResult createCalendar(@PathParam("entityType") final String entityType, @PathParam("entityId") final Long entityId, CalendarRequest calendarRequest) { @@ -168,7 +171,7 @@ public CommandProcessingResult createCalendar(@PathParam("entityType") final Str @Path("{calendarId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update a Calendar", operationId = "updateCalendar") + @Operation(summary = "Update a Calendar", tags = {"Calendar"}, operationId = "updateCalendar") public CommandProcessingResult updateCalendar(@PathParam("entityType") final String entityType, @PathParam("entityId") final Long entityId, @PathParam("calendarId") final Long calendarId, final String jsonRequestBody) { @@ -181,7 +184,7 @@ public CommandProcessingResult updateCalendar(@PathParam("entityType") final Str @DELETE @Path("{calendarId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Delete a Calendar", operationId = "deleteCalendar") + @Operation(summary = "Delete a Calendar", tags = {"Calendar"}, operationId = "deleteCalendar") public CommandProcessingResult deleteCalendar(@PathParam("entityType") final String entityType, @PathParam("entityId") final Long entityId, @PathParam("calendarId") final Long calendarId) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientAddressApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientAddressApiResource.java index 76b383ffee7..c33ab28f65a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientAddressApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientAddressApiResource.java @@ -29,7 +29,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -63,7 +66,7 @@ public class ClientAddressApiResource { @GET @Path("addresses/template") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve client address template", operationId = "retrieveTemplateClientAddress") + @Operation(summary = "Retrieve client address template", tags = {"Clients Address"}, operationId = "retrieveTemplateClientAddress") public AddressData getAddressesTemplate() { context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSIONS); return readPlatformService.retrieveTemplate(); @@ -74,7 +77,7 @@ public AddressData getAddressesTemplate() { @Path("/{clientid}/addresses") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create an address for a Client", operationId = "createClientAddress", description = "Mandatory Fields : \n" + @Operation(summary = "Create an address for a Client", operationId = "createClientAddress", tags = {"Clients Address"}, description = "Mandatory Fields : \n" + "type and clientId") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = ClientAddressRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientAddressApiResourcesSwagger.PostClientClientIdAddressesResponse.class))) @@ -90,7 +93,7 @@ public CommandProcessingResult addClientAddress(@QueryParam("type") @Parameter(d @GET @Path("/{clientid}/addresses") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List all addresses for a Client", operationId = "retrieveAllClientAddresses", description = """ + @Operation(summary = "List all addresses for a Client", operationId = "retrieveAllClientAddresses", tags = {"Clients Address"}, description = """ Example Requests: client/1/addresses @@ -108,7 +111,7 @@ public List getAddresses(@QueryParam("status") @Parameter(descripti @Path("/{clientid}/addresses") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update an address for a Client", operationId = "updateClientAddress", description = """ + @Operation(summary = "Update an address for a Client", operationId = "updateClientAddress", tags = {"Clients Address"}, description = """ All the address fields can be updated by using update client address API Mandatory Fields 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 ed47dbf1805..400862e662a 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 @@ -30,7 +30,10 @@ import jakarta.ws.rs.DefaultValue; import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -81,7 +84,7 @@ public class ClientChargesApiResource { @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Client Charges", operationId = "retrieveAllClientCharges", description = "The list capability of client charges supports pagination." + @Operation(summary = "List Client Charges", operationId = "retrieveAllClientCharges", tags = {"Client Charges"}, description = "The list capability of client charges supports pagination." + "Example Requests:\n" + "clients/1/charges\n" + "\nclients/1/charges?offset=0&limit=5") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientChargesApiResourceSwagger.GetClientsClientIdChargesResponse.class))) public String retrieveAllClientCharges(@PathParam("clientId") @Parameter(description = "clientId") final Long clientId, @@ -113,7 +116,7 @@ private boolean is(final String commandParam, final String commandValue) { @GET @Path("template") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve client charge template", operationId = "retrieveTemplateClientCharge") + @Operation(summary = "Retrieve client charge template", tags = {"Client Charges"}, operationId = "retrieveTemplateClientCharge") public String retrieveTemplate(@Context final UriInfo uriInfo, @PathParam("clientId") @Parameter(description = "clientId") final Long clientId) { @@ -130,7 +133,7 @@ public String retrieveTemplate(@Context final UriInfo uriInfo, @GET @Path("{chargeId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Client Charge", operationId = "retrieveOneClientCharge", description = "Example Requests:\n" + @Operation(summary = "Retrieve a Client Charge", operationId = "retrieveOneClientCharge", tags = {"Client Charges"}, description = "Example Requests:\n" + "clients/1/charges/1\n" + "\n" + "\n" + "clients/1/charges/1?fields=name,id") @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, @@ -160,7 +163,7 @@ public String retrieveClientCharge(@PathParam("clientId") @Parameter(description @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Add Client Charge", operationId = "createClientCharge", description = " This API associates a Client charge with an implicit Client account\n" + @Operation(summary = "Add Client Charge", operationId = "createClientCharge", tags = {"Client Charges"}, description = " This API associates a Client charge with an implicit Client account\n" + "Mandatory Fields : \n" + "chargeId and dueDate \n" + "Optional Fields : \n" + "amount") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = ClientChargesApiResourceSwagger.PostClientsClientIdChargesRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientChargesApiResourceSwagger.PostClientsClientIdChargesResponse.class))) @@ -179,7 +182,7 @@ public String applyClientCharge(@PathParam("clientId") @Parameter(description = @Path("{chargeId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Pay a Client Charge | Waive a Client Charge", operationId = "payOrWaiveClientCharge", description = "Pay a Client Charge:\n\n" + @Operation(summary = "Pay a Client Charge | Waive a Client Charge", operationId = "payOrWaiveClientCharge", tags = {"Client Charges"}, description = "Pay a Client Charge:\n\n" + "Mandatory Fields:" + "transactionDate and amount " + "" + "\"Pay either a part of or the entire due amount for a charge.(command=paycharge)\n" + "\n" + "Waive a Client Charge:\n" + "\n" + "\n" + "This API provides the facility of waiving off the remaining amount on a client charge (command=waive)\n\n" @@ -223,7 +226,7 @@ public String payOrWaiveClientCharge(@PathParam("clientId") @Parameter(descripti @DELETE @Path("{chargeId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Delete a Client Charge", operationId = "deleteClientCharge", description = "Deletes a Client Charge on which no transactions have taken place (either payments or waivers). ") + @Operation(summary = "Delete a Client Charge", operationId = "deleteClientCharge", tags = {"Client Charges"}, description = "Deletes a Client Charge on which no transactions have taken place (either payments or waivers). ") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientChargesApiResourceSwagger.DeleteClientsClientIdChargesChargeIdResponse.class))) public String deleteClientCharge(@PathParam("clientId") @Parameter(description = "clientId") final Long clientId, @PathParam("chargeId") @Parameter(description = "chargeId") final Long chargeId) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientFamilyMembersApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientFamilyMembersApiResource.java index c445ea09a63..060ada256e0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientFamilyMembersApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientFamilyMembersApiResource.java @@ -27,7 +27,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; @@ -59,7 +62,7 @@ public class ClientFamilyMembersApiResource { @GET @Path("/{familyMemberId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a client family member", operationId = "retrieveOneClientFamilyMember") + @Operation(summary = "Retrieve a client family member", tags = {"Client Family Member"}, operationId = "retrieveOneClientFamilyMember") public ClientFamilyMembersData getFamilyMember(@PathParam("familyMemberId") final Long familyMemberId, @PathParam("clientId") @Parameter(description = "clientId") final Long clientId) { @@ -70,7 +73,7 @@ public ClientFamilyMembersData getFamilyMember(@PathParam("familyMemberId") fina @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List all client family members", operationId = "retrieveAllClientFamilyMembers") + @Operation(summary = "List all client family members", tags = {"Client Family Member"}, operationId = "retrieveAllClientFamilyMembers") public List getFamilyMembers(@PathParam("clientId") final long clientId) { this.context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSIONS); return this.readPlatformService.getClientFamilyMembers(clientId); @@ -89,7 +92,7 @@ public ClientFamilyMembersData getTemplate(@PathParam("clientId") final long cli @Path("/{familyMemberId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update a client family member", operationId = "updateClientFamilyMember") + @Operation(summary = "Update a client family member", tags = {"Client Family Member"}, operationId = "updateClientFamilyMember") public CommandProcessingResult updateClientFamilyMembers(@PathParam("familyMemberId") final long familyMemberId, ClientFamilyMemberRequest clientFamilyMemberRequest, @PathParam("clientId") @Parameter(description = "clientId") final Long clientId) { @@ -102,7 +105,7 @@ public CommandProcessingResult updateClientFamilyMembers(@PathParam("familyMembe @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Add a client family member", operationId = "createClientFamilyMember") + @Operation(summary = "Add a client family member", tags = {"Client Family Member"}, operationId = "createClientFamilyMember") public CommandProcessingResult addClientFamilyMembers(@PathParam("clientId") final long clientid, ClientFamilyMemberRequest clientFamilyMemberRequest) { final CommandWrapper commandRequest = new CommandWrapperBuilder().addFamilyMembers(clientid) @@ -114,7 +117,7 @@ public CommandProcessingResult addClientFamilyMembers(@PathParam("clientId") fin @DELETE @Path("/{familyMemberId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Delete a client family member", operationId = "deleteClientFamilyMember") + @Operation(summary = "Delete a client family member", tags = {"Client Family Member"}, operationId = "deleteClientFamilyMember") public CommandProcessingResult deleteClientFamilyMembers(@PathParam("familyMemberId") final long familyMemberId, @PathParam("clientId") @Parameter(description = "clientId") final Long clientId) { final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteFamilyMembers(familyMemberId).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 5ee370d37c1..ade0c9a3a5a 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 @@ -30,7 +30,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Context; @@ -82,7 +85,7 @@ public class ClientIdentifiersApiResource { @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List all Identifiers for a Client", operationId = "retrieveAllClientIdentifiers", description = "Example Requests:\n" + @Operation(summary = "List all Identifiers for a Client", operationId = "retrieveAllClientIdentifiers", tags = {"Client Identifier"}, description = "Example Requests:\n" + "clients/1/identifiers\n" + "\n" + "\n" + "clients/1/identifiers?fields=documentKey,documentType,description") public List retrieveAllClientIdentifiers( @PathParam("clientId") @Parameter(description = "clientId") final Long clientId) { @@ -95,7 +98,7 @@ public List retrieveAllClientIdentifiers( @GET @Path("template") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Client Identifier Details Template", operationId = "retrieveTemplateClientIdentifier", description = "This is a convenience resource useful for building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n" + @Operation(summary = "Retrieve Client Identifier Details Template", operationId = "retrieveTemplateClientIdentifier", tags = {"Client Identifier"}, description = "This is a convenience resource useful for 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\nExample Request:\n" + "clients/1/identifiers/template") public ClientIdentifierData newClientIdentifierDetails( @PathParam("clientId") @Parameter(description = "clientId") final Long clientId) { @@ -110,7 +113,7 @@ public ClientIdentifierData newClientIdentifierDetails( @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create an Identifier for a Client", operationId = "createClientIdentifier", description = "Mandatory Fields\n" + @Operation(summary = "Create an Identifier for a Client", operationId = "createClientIdentifier", tags = {"Client Identifier"}, description = "Mandatory Fields\n" + "documentKey, documentTypeId ") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = ClientIdentifiersApiResourceSwagger.PostClientsClientIdIdentifiersRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientIdentifiersApiResourceSwagger.PostClientsClientIdIdentifiersResponse.class))) @@ -138,7 +141,7 @@ public CommandProcessingResult createClientIdentifier(@PathParam("clientId") @Pa @GET @Path("{identifierId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Client Identifier", operationId = "retrieveOneClientIdentifier", description = "Example Requests:\n" + @Operation(summary = "Retrieve a Client Identifier", operationId = "retrieveOneClientIdentifier", tags = {"Client Identifier"}, description = "Example Requests:\n" + "clients/1/identifier/2\n" + "\n" + "\n" + "clients/1/identifier/2?template=true\n" + "\n" + "clients/1/identifiers/2?fields=documentKey,documentType,description") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientIdentifiersApiResourceSwagger.GetClientsClientIdIdentifiersResponse.class))) @@ -164,7 +167,7 @@ public String retrieveClientIdentifiers(@PathParam("clientId") @Parameter(descri @Path("{identifierId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update a Client Identifier", operationId = "updateClientIdentifier", description = "Updates a Client Identifier") + @Operation(summary = "Update a Client Identifier", operationId = "updateClientIdentifier", tags = {"Client Identifier"}, description = "Updates a Client Identifier") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = ClientIdentifierRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientIdentifiersApiResourceSwagger.PutClientsClientIdIdentifiersIdentifierIdResponse.class))) public CommandProcessingResult updateClientIdentifer(@PathParam("clientId") @Parameter(description = "clientId") final Long clientId, @@ -192,7 +195,7 @@ public CommandProcessingResult updateClientIdentifer(@PathParam("clientId") @Par @DELETE @Path("{identifierId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Delete a Client Identifier", operationId = "deleteClientIdentifier", description = "Deletes a Client Identifier") + @Operation(summary = "Delete a Client Identifier", operationId = "deleteClientIdentifier", tags = {"Client Identifier"}, description = "Deletes a Client Identifier") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientIdentifiersApiResourceSwagger.DeleteClientsClientIdIdentifiersIdentifierIdResponse.class))) public CommandProcessingResult deleteClientIdentifier(@PathParam("clientId") @Parameter(description = "clientId") final Long clientId, @PathParam("identifierId") @Parameter(description = "identifierId") final Long clientIdentifierId) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientTransactionsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientTransactionsApiResource.java index dfd65cc8c98..18ecdd4c4d6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientTransactionsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientTransactionsApiResource.java @@ -27,7 +27,10 @@ import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -74,7 +77,7 @@ public class ClientTransactionsApiResource { @GET @Path("{clientId}/transactions") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Client Transactions", operationId = "retrieveAllClientTransactions", description = "The list capability of client transaction can support pagination." + @Operation(summary = "List Client Transactions", operationId = "retrieveAllClientTransactions", tags = {"Client Transaction"}, description = "The list capability of client transaction can support pagination." + "\n\n" + "Example Requests:\n\n" + "clients/189/transactions\n\n" + "clients/189/transactions?offset=10&limit=50") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientTransactionsApiResourceSwagger.GetClientsClientIdTransactionsResponse.class))) public String retrieveAllClientTransactions(@PathParam("clientId") @Parameter(description = "clientId") final Long clientId, @@ -88,7 +91,7 @@ public String retrieveAllClientTransactions(@PathParam("clientId") @Parameter(de @GET @Path("{clientId}/transactions/{transactionId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Client Transaction", operationId = "retrieveClientTransaction", description = "Example Requests:\n" + @Operation(summary = "Retrieve a Client Transaction", operationId = "retrieveClientTransaction", tags = {"Client Transaction"}, description = "Example Requests:\n" + "clients/1/transactions/1\n" + "\n" + "\n" + "clients/1/transactions/1?fields=id,officeName") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientTransactionsApiResourceSwagger.GetClientsClientIdTransactionsTransactionIdResponse.class))) public String retrieveClientTransaction(@PathParam("clientId") @Parameter(description = "clientId") final Long clientId, @@ -104,7 +107,7 @@ public String retrieveClientTransaction(@PathParam("clientId") @Parameter(descri @Path("{clientId}/transactions/{transactionId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Undo a Client Transaction", operationId = "undoClientTransaction", description = "Undoes a Client Transaction") + @Operation(summary = "Undo a Client Transaction", operationId = "undoClientTransaction", tags = {"Client Transaction"}, description = "Undoes a Client Transaction") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientTransactionsApiResourceSwagger.PostClientsClientIdTransactionsTransactionIdResponse.class))) public String undoClientTransaction(@PathParam("clientId") @Parameter(description = "clientId") final Long clientId, @PathParam("transactionId") @Parameter(description = "transactionId") final Long transactionId, @@ -117,7 +120,7 @@ public String undoClientTransaction(@PathParam("clientId") @Parameter(descriptio @GET @Path("external-id/{clientExternalId}/transactions") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Client Transactions", operationId = "retrieveAllClientTransactionsByClientExternalId", description = "The list capability of client transaction can support pagination." + @Operation(summary = "List Client Transactions", operationId = "retrieveAllClientTransactionsByClientExternalId", tags = {"Client Transaction"}, description = "The list capability of client transaction can support pagination." + "\n\n" + "Example Requests:\n\n" + "clients/external-id/7dd80a7c-ycba-a446-t378-91eb6f53e854/transactions\n\n" + "clients/external-id/7dd80a7c-ycba-a446-t378-91eb6f53e854/transactions?offset=10&limit=50") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientTransactionsApiResourceSwagger.GetClientsClientIdTransactionsResponse.class))) @@ -140,7 +143,7 @@ public String retrieveAllClientTransactions( @GET @Path("external-id/{clientExternalId}/transactions/{transactionId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Client Transaction", operationId = "retrieveClientTransactionByClientExternalId", description = "Example Requests:\n" + @Operation(summary = "Retrieve a Client Transaction", operationId = "retrieveClientTransactionByClientExternalId", tags = {"Client Transaction"}, description = "Example Requests:\n" + "clients/external-id/7dd80a7c-ycba-a446-t378-91eb6f53e854/transactions/1\n" + "\n" + "\n" + "clients/external-id/7dd80a7c-ycba-a446-t378-91eb6f53e854/transactions/1?fields=id,officeName") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientTransactionsApiResourceSwagger.GetClientsClientIdTransactionsTransactionIdResponse.class))) @@ -165,7 +168,7 @@ public String retrieveClientTransaction( @Path("external-id/{clientExternalId}/transactions/{transactionId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Undo a Client Transaction", operationId = "undoClientTransactionByClientExternalId", description = "Undoes a Client Transaction") + @Operation(summary = "Undo a Client Transaction", operationId = "undoClientTransactionByClientExternalId", tags = {"Client Transaction"}, description = "Undoes a Client Transaction") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientTransactionsApiResourceSwagger.PostClientsClientIdTransactionsTransactionIdResponse.class))) public String undoClientTransaction( @PathParam("clientExternalId") @Parameter(description = "clientExternalId") final String clientExternalId, @@ -186,7 +189,7 @@ public String undoClientTransaction( @GET @Path("{clientId}/transactions/external-id/{transactionExternalId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Client Transaction", operationId = "retrieveClientTransactionByTransactionExternalId", description = "Example Requests:\n" + @Operation(summary = "Retrieve a Client Transaction", operationId = "retrieveClientTransactionByTransactionExternalId", tags = {"Client Transaction"}, description = "Example Requests:\n" + "clients/1/transactions/external-id/7dd80a7c-ycba-a446-t378-91eb6f53e854\n" + "\n" + "\n" + "clients/1/transactions/external-id/7dd80a7c-ycba-a446-t378-91eb6f53e854?fields=id,officeName") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientTransactionsApiResourceSwagger.GetClientsClientIdTransactionsTransactionIdResponse.class))) @@ -210,7 +213,7 @@ public String retrieveClientTransaction(@PathParam("clientId") @Parameter(descri @GET @Path("external-id/{clientExternalId}/transactions/external-id/{transactionExternalId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Client Transaction", operationId = "retrieveClientTransactionByClientAndTransactionExternalId", description = "Example Requests:\n" + @Operation(summary = "Retrieve a Client Transaction", operationId = "retrieveClientTransactionByClientAndTransactionExternalId", tags = {"Client Transaction"}, description = "Example Requests:\n" + "clients/external-id/7dd80a7c-ycba-a446-t378-91eb6f53e854/transactions/external-id/7dd80a7c-ycba-a446-t378-91eb6f53e854\n" + "\n" + "\n" + "clients/external-id/7dd80a7c-ycba-a446-t378-91eb6f53e854/transactions/external-id/7dd80a7c-ycba-a446-t378-91eb6f53e854?fields=id,officeName") @@ -241,7 +244,7 @@ public String retrieveClientTransaction( @Path("{clientId}/transactions/external-id/{transactionExternalId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Undo a Client Transaction", operationId = "undoClientTransactionByTransactionExternalId", description = "Undoes a Client Transaction") + @Operation(summary = "Undo a Client Transaction", operationId = "undoClientTransactionByTransactionExternalId", tags = {"Client Transaction"}, description = "Undoes a Client Transaction") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientTransactionsApiResourceSwagger.PostClientsClientIdTransactionsTransactionIdResponse.class))) public String undoClientTransaction(@PathParam("clientId") @Parameter(description = "clientId") final Long clientId, @PathParam("transactionExternalId") @Parameter(description = "transactionExternalId") final String transactionExternalId, @@ -261,7 +264,7 @@ public String undoClientTransaction(@PathParam("clientId") @Parameter(descriptio @Path("external-id/{clientExternalId}/transactions/external-id/{transactionExternalId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Undo a Client Transaction", operationId = "undoClientTransactionByClientAndTransactionExternalId", description = "Undoes a Client Transaction") + @Operation(summary = "Undo a Client Transaction", operationId = "undoClientTransactionByClientAndTransactionExternalId", tags = {"Client Transaction"}, description = "Undoes a Client Transaction") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientTransactionsApiResourceSwagger.PostClientsClientIdTransactionsTransactionIdResponse.class))) public String undoClientTransaction( @PathParam("clientExternalId") @Parameter(description = "clientExternalId") final String clientExternalId, diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientsApiResource.java index d2d5caf3b6a..487a6762b80 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientsApiResource.java @@ -31,7 +31,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -100,7 +103,7 @@ public class ClientsApiResource { @GET @Path("template") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Client Details Template", operationId = "retrieveTemplateClient", 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" + @Operation(summary = "Retrieve Client Details Template", operationId = "retrieveTemplateClient", tags = {"Client"}, 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" + "clients/template") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.GetClientsTemplateResponse.class))) public String retrieveTemplate(@Context final UriInfo uriInfo, @@ -129,7 +132,7 @@ public String retrieveTemplate(@Context final UriInfo uriInfo, @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Clients", operationId = "retrieveAllClients", description = "The list capability of clients can support pagination and sorting.\n\n" + @Operation(summary = "List Clients", operationId = "retrieveAllClients", tags = {"Client"}, description = "The list capability of clients can support pagination and sorting.\n\n" + "Example Requests:\n" + "\n" + "clients\n" + "\n" + "clients?fields=displayName,officeName,timeline\n" + "\n" + "clients?offset=10&limit=50\n" + "\n" + "clients?orderBy=displayName&sortOrder=DESC") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.GetClientsResponse.class))) @@ -155,7 +158,7 @@ public String retrieveAll(@Context final UriInfo uriInfo, @GET @Path("{clientId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Client", operationId = "retrieveOneClient", description = "Example Requests:\n" + "\n" + "clients/1\n" + @Operation(summary = "Retrieve a Client", operationId = "retrieveOneClient", tags = {"Client"}, description = "Example Requests:\n" + "\n" + "clients/1\n" + "\n" + "\n" + "clients/1?template=true\n" + "\n" + "\n" + "clients/1?fields=id,displayName,officeName") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.GetClientsClientIdResponse.class))) public String retrieveOne(@PathParam("clientId") @Parameter(description = "clientId") final Long clientId, @@ -167,7 +170,7 @@ public String retrieveOne(@PathParam("clientId") @Parameter(description = "clien @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create a Client", operationId = "createClient", description = "Note:\n\n" + @Operation(summary = "Create a Client", operationId = "createClient", tags = {"Client"}, description = "Note:\n\n" + "1. You can enter either:firstname/middlename/lastname - for a person (middlename is optional) OR fullname - for a business or organisation (or person known by one name).\n" + "\n" + "2.If address is enable(enable-address=true), then additional field called address has to be passed.\n\n" + "Mandatory Fields: firstname and lastname OR fullname, officeId, active=true and activationDate OR active=false, if(address enabled) address\n\n" @@ -190,7 +193,7 @@ public String create(@Parameter(hidden = true) final String apiRequestBodyAsJson @Path("{clientId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update a Client", operationId = "updateClient", description = "Note: You can update any of the basic attributes of a client (but not its associations) using this API.\n" + @Operation(summary = "Update a Client", operationId = "updateClient", tags = {"Client"}, description = "Note: You can update any of the basic attributes of a client (but not its associations) using this API.\n" + "\n" + "Changing the relationship between a client and its office is not supported through this API. An API specific to handling transfers of clients between offices is available for the same.\n" + "\n" + "The relationship between a client and a group must be removed through the Groups API.") @@ -204,7 +207,7 @@ public String update(@Parameter(description = "clientId") @PathParam("clientId") @DELETE @Path("{clientId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Delete a Client", operationId = "deleteClient", description = "If a client is in Pending state, you are allowed to Delete it. The delete is a 'hard delete' and cannot be recovered from. Once clients become active or have loans or savings associated with them, you cannot delete the client but you may Close the client if they have left the program.") + @Operation(summary = "Delete a Client", operationId = "deleteClient", tags = {"Client"}, description = "If a client is in Pending state, you are allowed to Delete it. The delete is a 'hard delete' and cannot be recovered from. Once clients become active or have loans or savings associated with them, you cannot delete the client but you may Close the client if they have left the program.") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.DeleteClientsClientIdResponse.class))) public String delete(@PathParam("clientId") @Parameter(description = "clientId") final Long clientId) { return deleteClient(clientId, null); @@ -214,7 +217,7 @@ public String delete(@PathParam("clientId") @Parameter(description = "clientId") @Path("{clientId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Activate a Client | Close a Client | Reject a Client | Withdraw a Client | Reactivate a Client | UndoReject a Client | UndoWithdraw a Client | Assign a Staff | Unassign a Staff | Update Default Savings Account | Propose a Client Transfer | Withdraw a Client Transfer | Reject a Client Transfer | Accept a Client Transfer | Propose and Accept a Client Transfer", operationId = "handleCommandClient", description = "Activate a Client:\n\n" + @Operation(tags = {"Client"}, summary = "Activate a Client | Close a Client | Reject a Client | Withdraw a Client | Reactivate a Client | UndoReject a Client | UndoWithdraw a Client | Assign a Staff | Unassign a Staff | Update Default Savings Account | Propose a Client Transfer | Withdraw a Client Transfer | Reject a Client Transfer | Accept a Client Transfer | Propose and Accept a Client Transfer", operationId = "handleCommandClient", description = "Activate a Client:\n\n" + "Clients can be created in a Pending state. This API exists to enable client activation (for when a client becomes an approved member of the financial Institution).\n" + "\n" + "If the client happens to be already active this API will result in an error.\n\n" + "Close a Client:\n\n" + "Clients can be closed if they do not have any non-closed loans/savingsAccount. This API exists to close a client .\n" + "\n" @@ -255,7 +258,7 @@ public String activate(@PathParam("clientId") @Parameter(description = "clientId @GET @Path("{clientId}/accounts") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve client accounts overview", operationId = "retrieveAllClientAccounts", description = "An example of how a loan portfolio summary can be provided. This is requested in a specific use case of the community application.\n" + @Operation(summary = "Retrieve client accounts overview", operationId = "retrieveAllClientAccounts", tags = {"Client"}, description = "An example of how a loan portfolio summary can be provided. This is requested in a specific use case of the community application.\n" + "It is quite reasonable to add resources like this to simplify User Interface development.\n" + "\n" + "Example Requests:\n " + "\n" + "clients/1/accounts\n" + "\n" + "clients/1/accounts?fields=loanAccounts,savingsAccounts") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.GetClientsClientIdAccountsResponse.class))) @@ -268,7 +271,7 @@ public String retrieveAssociatedAccounts(@PathParam("clientId") @Parameter(descr @GET @Path("downloadtemplate") @Produces("application/vnd.ms-excel") - @Operation(summary = "Download client template for bulk import", operationId = "getClientTemplate") + @Operation(summary = "Download client template for bulk import", tags = {"Client"}, operationId = "getClientTemplate") public Response getClientTemplate(@QueryParam("legalFormType") final String legalFormType, @QueryParam("officeId") final Long officeId, @QueryParam("staffId") final Long staffId, @QueryParam("dateFormat") final String dateFormat) { return bulkImportWorkbookPopulatorService.getTemplate(legalFormType, officeId, staffId, dateFormat); @@ -277,7 +280,7 @@ public Response getClientTemplate(@QueryParam("legalFormType") final String lega @POST @Path("uploadtemplate") @Consumes(MediaType.MULTIPART_FORM_DATA) - @Operation(summary = "Upload client template for bulk import", operationId = "postClientTemplate") + @Operation(summary = "Upload client template for bulk import", tags = {"Client"}, operationId = "postClientTemplate") @RequestBody(description = "Upload client template", content = { @Content(mediaType = MediaType.MULTIPART_FORM_DATA, schema = @Schema(implementation = UploadRequest.class)) }) public String postClientTemplate(@QueryParam("legalFormType") final String legalFormType, @@ -291,7 +294,7 @@ public String postClientTemplate(@QueryParam("legalFormType") final String legal @GET @Path("{clientId}/obligeedetails") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve client obligee details", operationId = "retrieveClientObligeeDetails", description = "Retrieve client obligee details") + @Operation(summary = "Retrieve client obligee details", operationId = "retrieveClientObligeeDetails", tags = {"Client"}, description = "Retrieve client obligee details") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.GetClientObligeeDetailsResponse.class))) @ApiResponse(responseCode = "400", description = "Bad Request") public String retrieveObligeeDetails(@PathParam("clientId") final Long clientId, @Context final UriInfo uriInfo) { @@ -301,7 +304,7 @@ public String retrieveObligeeDetails(@PathParam("clientId") final Long clientId, @GET @Path("{clientId}/transferproposaldate") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve client transfer template", operationId = "retrieveClientTransferTemplate", description = "Retrieve client transfer template") + @Operation(summary = "Retrieve client transfer template", operationId = "retrieveClientTransferTemplate", tags = {"Client"}, description = "Retrieve client transfer template") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.GetClientTransferProposalDateResponse.class))) @ApiResponse(responseCode = "400", description = "Bad Request") public String retrieveTransferTemplate(@PathParam("clientId") final Long clientId, @Context final UriInfo uriInfo) { @@ -311,7 +314,7 @@ public String retrieveTransferTemplate(@PathParam("clientId") final Long clientI @GET @Path("/external-id/{externalId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Client by External Id", operationId = "retrieveOneClientByExternalId", description = "Example Requests:\n" + @Operation(summary = "Retrieve a Client by External Id", operationId = "retrieveOneClientByExternalId", tags = {"Client"}, description = "Example Requests:\n" + "\n" + "clients/123-456\n" + "\n" + "\n" + "clients/123-456?template=true\n" + "\n" + "\n" + "clients/123-456?fields=id,displayName,officeName") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.GetClientsClientIdResponse.class))) @@ -324,7 +327,7 @@ public String retrieveOne(@PathParam("externalId") @Parameter(description = "ext @GET @Path("/external-id/{externalId}/accounts") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve client accounts overview", operationId = "retrieveAllClientAccountsByExternalId", description = "An example of how a loan portfolio summary can be provided. This is requested in a specific use case of the community application.\n" + @Operation(summary = "Retrieve client accounts overview", operationId = "retrieveAllClientAccountsByExternalId", tags = {"Client"}, description = "An example of how a loan portfolio summary can be provided. This is requested in a specific use case of the community application.\n" + "It is quite reasonable to add resources like this to simplify User Interface development.\n" + "\n" + "Example Requests:\n " + "\n" + "clients/123-456/accounts\n" + "\n" + "clients/123-456/accounts?fields=loanAccounts,savingsAccounts") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.GetClientsClientIdAccountsResponse.class))) @@ -338,7 +341,7 @@ public String retrieveAssociatedAccounts(@PathParam("externalId") @Parameter(des @Path("/external-id/{externalId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update a Client using the External Id", operationId = "updateClientByExternalId", description = "Note: You can update any of the basic attributes of a client (but not its associations) using this API.\n" + @Operation(summary = "Update a Client using the External Id", operationId = "updateClientByExternalId", tags = {"Client"}, description = "Note: You can update any of the basic attributes of a client (but not its associations) using this API.\n" + "\n" + "Changing the relationship between a client and its office is not supported through this API. An API specific to handling transfers of clients between offices is available for the same.\n" + "\n" + "The relationship between a client and a group must be removed through the Groups API.") @@ -353,7 +356,7 @@ public String update(@Parameter(description = "externalId") @PathParam("external @Path("/external-id/{externalId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Activate a Client | Close a Client | Reject a Client | Withdraw a Client | Reactivate a Client | UndoReject a Client | UndoWithdraw a Client | Assign a Staff | Unassign a Staff | Update Default Savings Account | Propose a Client Transfer | Withdraw a Client Transfer | Reject a Client Transfer | Accept a Client Transfer | Propose and Accept a Client Transfer", operationId = "handleCommandClientByExternalId", description = "Activate a Client:\n\n" + @Operation(tags = {"Client"}, summary = "Activate a Client | Close a Client | Reject a Client | Withdraw a Client | Reactivate a Client | UndoReject a Client | UndoWithdraw a Client | Assign a Staff | Unassign a Staff | Update Default Savings Account | Propose a Client Transfer | Withdraw a Client Transfer | Reject a Client Transfer | Accept a Client Transfer | Propose and Accept a Client Transfer", operationId = "handleCommandClientByExternalId", description = "Activate a Client:\n\n" + "Clients can be created in a Pending state. This API exists to enable client activation (for when a client becomes an approved member of the financial Institution).\n" + "\n" + "If the client happens to be already active this API will result in an error.\n\n" + "Close a Client:\n\n" + "Clients can be closed if they do not have any non-closed loans/savingsAccount. This API exists to close a client .\n" + "\n" @@ -394,7 +397,7 @@ public String applyCommand(@PathParam("externalId") @Parameter(description = "ex @DELETE @Path("/external-id/{externalId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Delete a Client", operationId = "deleteClientByExternalId", description = "If a client is in Pending state, you are allowed to Delete it. The delete is a 'hard delete' and cannot be recovered from. Once clients become active or have loans or savings associated with them, you cannot delete the client but you may Close the client if they have left the program.") + @Operation(summary = "Delete a Client", operationId = "deleteClientByExternalId", tags = {"Client"}, description = "If a client is in Pending state, you are allowed to Delete it. The delete is a 'hard delete' and cannot be recovered from. Once clients become active or have loans or savings associated with them, you cannot delete the client but you may Close the client if they have left the program.") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.DeleteClientsClientIdResponse.class))) public String delete(@PathParam("externalId") @Parameter(description = "externalId") final String externalId) { return deleteClient(null, externalId); @@ -403,7 +406,7 @@ public String delete(@PathParam("externalId") @Parameter(description = "external @GET @Path("/external-id/{externalId}/obligeedetails") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve client obligee details", operationId = "retrieveClientObligeeDetailsByExternalId", description = "Retrieve client obligee details using the client external Id") + @Operation(summary = "Retrieve client obligee details", operationId = "retrieveClientObligeeDetailsByExternalId", tags = {"Client"}, description = "Retrieve client obligee details using the client external Id") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.GetClientObligeeDetailsResponse.class))) @ApiResponse(responseCode = "400", description = "Bad Request") public String retrieveObligeeDetails(@PathParam("externalId") final String externalId, @Context final UriInfo uriInfo) { @@ -413,7 +416,7 @@ public String retrieveObligeeDetails(@PathParam("externalId") final String exter @GET @Path("/external-id/{externalId}/transferproposaldate") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve client transfer template", operationId = "retrieveClientTransferTemplateByExternalId", description = "Retrieve client transfer template using the client external Id") + @Operation(summary = "Retrieve client transfer template", operationId = "retrieveClientTransferTemplateByExternalId", tags = {"Client"}, description = "Retrieve client transfer template using the client external Id") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.GetClientTransferProposalDateResponse.class))) @ApiResponse(responseCode = "400", description = "Bad Request") public String retrieveTransferTemplate(@PathParam("externalId") final String externalId, @Context final UriInfo uriInfo) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/InternalClientInformationApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/InternalClientInformationApiResource.java index 9839f6869b5..0bc66798d40 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/InternalClientInformationApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/InternalClientInformationApiResource.java @@ -26,7 +26,10 @@ import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import io.swagger.v3.oas.annotations.Operation; import jakarta.ws.rs.GET; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Context; @@ -51,6 +54,7 @@ @Path("/v1/internal/client") @RequiredArgsConstructor @Slf4j +@Tag(name = "Internal Client Information", description = "Internal client resources for testing") public class InternalClientInformationApiResource implements InitializingBean { private final ClientRepositoryWrapper clientRepositoryWrapper; @@ -73,7 +77,7 @@ public void afterPropertiesSet() { @GET @Path("{clientId}/audit") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Get internal client audit fields", operationId = "getInternalClientAuditFields") + @Operation(summary = "Get internal client audit fields", tags = {"Internal Client Information"}, operationId = "getInternalClientAuditFields") @SuppressFBWarnings("SLF4J_SIGN_ONLY_FORMAT") public String getClientAuditFields(@Context final UriInfo uriInfo, @PathParam("clientId") Long clientId) { log.warn("------------------------------------------------------------"); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/v2/search/ClientSearchV2ApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/v2/search/ClientSearchV2ApiResource.java index 5a302e88dd8..918cc182e96 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/v2/search/ClientSearchV2ApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/v2/search/ClientSearchV2ApiResource.java @@ -23,7 +23,10 @@ import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Consumes; import jakarta.ws.rs.POST; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; import lombok.RequiredArgsConstructor; @@ -46,7 +49,7 @@ public class ClientSearchV2ApiResource implements ClientSearchV2Api { @Path("search") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Search Clients by text", operationId = "searchClientsByText") + @Operation(summary = "Search Clients by text", tags = {"ClientSearchV2"}, operationId = "searchClientsByText") public Page searchByText(@Parameter PagedRequest request) { return delegate.searchByText(request); } 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 3011880dfcf..a1c6748e0ad 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 @@ -30,7 +30,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Context; @@ -79,7 +82,7 @@ public class CollateralsApiResource { @GET @Path("template") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Collateral 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" + @Operation(summary = "Retrieve Collateral Details Template", tags = {"Loan Collateral"}, 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" + "loans/1/collaterals/template") public CollateralData newCollateralTemplate(@PathParam("loanId") @Parameter(description = "loanId") final Long loanId) { @@ -91,7 +94,7 @@ public CollateralData newCollateralTemplate(@PathParam("loanId") @Parameter(desc @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Loan Collaterals", description = "Example Requests:\n" + "\n" + "loans/1/collaterals\n" + "\n" + "\n" + @Operation(summary = "List Loan Collaterals", tags = {"Loan Collateral"}, description = "Example Requests:\n" + "\n" + "loans/1/collaterals\n" + "\n" + "\n" + "loans/1/collaterals?fields=value,description") public List retrieveCollateralDetails(@PathParam("loanId") @Parameter(description = "loanId") final Long loanId) { this.context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSION); @@ -102,7 +105,7 @@ public List retrieveCollateralDetails(@PathParam("loanId") @Para @GET @Path("{collateralId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Collateral", description = "Example Requests:\n" + "\n" + "/loans/1/collaterals/1\n" + "\n" + "\n" + @Operation(summary = "Retrieve a Collateral", tags = {"Loan Collateral"}, description = "Example Requests:\n" + "\n" + "/loans/1/collaterals/1\n" + "\n" + "\n" + "/loans/1/collaterals/1?fields=description,description") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CollateralsApiResourceSwagger.GetLoansLoanIdCollateralsResponse.class))) public String retrieveCollateralDetails(@Context final UriInfo uriInfo, @@ -125,7 +128,7 @@ public String retrieveCollateralDetails(@Context final UriInfo uriInfo, @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create a Collateral", description = "Note: Currently, Collaterals may be added only before a Loan is approved") + @Operation(summary = "Create a Collateral", tags = {"Loan Collateral"}, description = "Note: Currently, Collaterals may be added only before a Loan is approved") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = LoansLoanIdCollateralsRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CollateralsApiResourceSwagger.PostLoansLoanIdCollateralsResponse.class))) public CommandProcessingResult createCollateral(@PathParam("loanId") @Parameter(description = "loanId") final Long loanId, @@ -141,7 +144,7 @@ public CommandProcessingResult createCollateral(@PathParam("loanId") @Parameter( @Path("{collateralId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update a Collateral") + @Operation(summary = "Update a Collateral", tags = {"Loan Collateral"}) @RequestBody(required = true, content = @Content(schema = @Schema(implementation = LoansLoandIdCollateralsCollateralIdRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CollateralsApiResourceSwagger.PutLoansLoanIdCollateralsCollateralIdResponse.class))) public CommandProcessingResult updateCollateral(@PathParam("loanId") @Parameter(description = "loanId") final Long loanId, @@ -156,7 +159,7 @@ public CommandProcessingResult updateCollateral(@PathParam("loanId") @Parameter( @DELETE @Path("{collateralId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Remove a Collateral", description = "Note: A collateral can only be removed from Loans that are not yet approved.") + @Operation(summary = "Remove a Collateral", tags = {"Loan Collateral"}, description = "Note: A collateral can only be removed from Loans that are not yet approved.") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CollateralsApiResourceSwagger.DeleteLoansLoanIdCollateralsCollateralIdResponse.class))) public CommandProcessingResult deleteCollateral(@PathParam("loanId") @Parameter(description = "loanId") final Long loanId, @PathParam("collateralId") @Parameter(description = "collateralId") final Long collateralId) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/api/ClientCollateralManagementApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/api/ClientCollateralManagementApiResource.java index 0aff20a1758..e3d4715dee4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/api/ClientCollateralManagementApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/api/ClientCollateralManagementApiResource.java @@ -30,7 +30,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -66,7 +69,7 @@ public class ClientCollateralManagementApiResource { @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Get Clients Collateral Products", operationId = "getClientCollateralProducts", description = "Get Collateral Product of a Client") + @Operation(summary = "Get Clients Collateral Products", operationId = "getClientCollateralProducts", tags = {"Client Collateral Management"}, description = "Get Collateral Product of a Client") public List getClientCollateral( @PathParam("clientId") @Parameter(description = "clientId") final Long clientId, @Context final UriInfo uriInfo, @QueryParam("prodId") @Parameter(description = "prodId") final Long prodId) { @@ -80,7 +83,7 @@ public List getClientCollateral( @GET @Path("{clientCollateralId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Get Client Collateral Data", operationId = "getClientCollateralData", description = "Get Client Collateral Data") + @Operation(summary = "Get Client Collateral Data", operationId = "getClientCollateralData", tags = {"Client Collateral Management"}, description = "Get Client Collateral Data") public ClientCollateralManagementData getClientCollateralData( @PathParam("clientId") @Parameter(description = "clientId") final Long clientId, @PathParam("clientCollateralId") @Parameter(description = "clientCollateralId") final Long collateralId) { @@ -94,7 +97,7 @@ public ClientCollateralManagementData getClientCollateralData( @GET @Path("template") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Get Client Collateral Template", operationId = "getClientCollateralTemplate", description = "Get Client Collateral Template") + @Operation(summary = "Get Client Collateral Template", operationId = "getClientCollateralTemplate", tags = {"Client Collateral Management"}, description = "Get Client Collateral Template") public List getClientCollateralTemplate( @PathParam("clientId") @Parameter(description = "clientId") final Long clientId) { return this.clientCollateralManagementReadPlatformService.getLoanCollateralTemplate(clientId); @@ -103,7 +106,7 @@ public List getClientCollateralTemplate( @POST @Produces({ MediaType.APPLICATION_JSON }) @Consumes({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Add New Collateral For a Client", operationId = "addClientCollateral", description = "Add New Collateral For a Client") + @Operation(summary = "Add New Collateral For a Client", operationId = "addClientCollateral", tags = {"Client Collateral Management"}, description = "Add New Collateral For a Client") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = ClientCollateralRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientCollateralManagementApiResourceSwagger.PostClientCollateralResponse.class))) public CommandProcessingResult addCollateral(@PathParam("clientId") @Parameter(description = "clientId") final Long clientId, @@ -118,7 +121,7 @@ public CommandProcessingResult addCollateral(@PathParam("clientId") @Parameter(d @Path("{collateralId}") @Produces({ MediaType.APPLICATION_JSON }) @Consumes({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update New Collateral of a Client", operationId = "updateClientCollateral", description = "Update New Collateral of a Client") + @Operation(summary = "Update New Collateral of a Client", operationId = "updateClientCollateral", tags = {"Client Collateral Management"}, description = "Update New Collateral of a Client") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = UpdateClientCollateralRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientCollateralManagementApiResourceSwagger.PutClientCollateralResponse.class))) public CommandProcessingResult updateCollateral(@PathParam("clientId") @Parameter(description = "clientId") final Long clientId, @@ -134,7 +137,7 @@ public CommandProcessingResult updateCollateral(@PathParam("clientId") @Paramete @DELETE @Path("{collateralId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Delete Client Collateral", operationId = "deleteClientCollateral", description = "Delete Client Collateral") + @Operation(summary = "Delete Client Collateral", operationId = "deleteClientCollateral", tags = {"Client Collateral Management"}, description = "Delete Client Collateral") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientCollateralManagementApiResourceSwagger.DeleteClientCollateralResponse.class))) public CommandProcessingResult deleteCollateral(@PathParam("clientId") @Parameter(description = "clientId") final Long clientId, diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/api/CollateralManagementApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/api/CollateralManagementApiResource.java index cb54ba1ecd7..b932cb9545d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/api/CollateralManagementApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/api/CollateralManagementApiResource.java @@ -30,7 +30,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; @@ -66,7 +69,7 @@ public class CollateralManagementApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create a new collateral", description = "Collateral Creation") + @Operation(summary = "Create a new collateral", tags = {"Collateral Management"}, description = "Collateral Creation") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = CollateralManagementProductRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CollateralManagementApiResourceSwagger.PostCollateralManagementProductResponse.class))) public CommandProcessingResult createCollateral( @@ -79,7 +82,7 @@ public CommandProcessingResult createCollateral( @GET @Path("{collateralId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Get Collateral", description = "Fetch Collateral") + @Operation(summary = "Get Collateral", tags = {"Collateral Management"}, description = "Fetch Collateral") public CollateralManagementData getCollateral( @PathParam("collateralId") @Parameter(description = "collateralId") final Long collateralId) { @@ -91,7 +94,7 @@ public CollateralManagementData getCollateral( @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Get All Collaterals", description = "Fetch all Collateral Products") + @Operation(summary = "Get All Collaterals", tags = {"Collateral Management"}, description = "Fetch all Collateral Products") public List getAllCollaterals() { this.context.authenticatedUser() .validateHasReadPermission(CollateralManagementJsonInputParams.COLLATERAL_PRODUCT_READ_PERMISSION.getValue()); @@ -101,7 +104,7 @@ public List getAllCollaterals() { @GET @Path("template") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Get Collateral Template", description = "Get Collateral Template") + @Operation(summary = "Get Collateral Template", tags = {"Collateral Management"}, description = "Get Collateral Template") public List getCollateralTemplate() { return currencyReadPlatformService.retrieveAllPlatformCurrencies(); } @@ -110,7 +113,7 @@ public List getCollateralTemplate() { @Path("{collateralId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update Collateral", description = "Update Collateral") + @Operation(summary = "Update Collateral", tags = {"Collateral Management"}, description = "Update Collateral") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = CollateralProductRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CollateralManagementApiResourceSwagger.PutCollateralProductResponse.class))) public CommandProcessingResult updateCollateral( @@ -125,7 +128,7 @@ public CommandProcessingResult updateCollateral( @DELETE @Path("{collateralId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Delete a Collateral", description = "Delete Collateral") + @Operation(summary = "Delete a Collateral", tags = {"Collateral Management"}, description = "Delete Collateral") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CollateralManagementApiResourceSwagger.DeleteCollateralProductResponse.class))) public CommandProcessingResult deleteCollateral( @PathParam("collateralId") @Parameter(description = "collateralId") final Long collateralId) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/api/LoanCollateralManagementApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/api/LoanCollateralManagementApiResource.java index fdfc8b2fe51..1f7c22a565c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/api/LoanCollateralManagementApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/api/LoanCollateralManagementApiResource.java @@ -23,7 +23,10 @@ import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.DELETE; import jakarta.ws.rs.GET; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; @@ -48,7 +51,7 @@ public class LoanCollateralManagementApiResource { @DELETE @Path("{id}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(description = "Delete Loan Collateral", summary = "Delete Loan Collateral") + @Operation(description = "Delete Loan Collateral", tags = {"Loan Collateral Management"}, summary = "Delete Loan Collateral") public CommandProcessingResult deleteLoanCollateral(@PathParam("loanId") @Parameter(description = "loanId") final Long loanId, @PathParam("id") @Parameter(description = "loan collateral id") final Long id) { @@ -59,7 +62,7 @@ public CommandProcessingResult deleteLoanCollateral(@PathParam("loanId") @Parame @GET @Path("{collateralId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(description = "Get Loan Collateral Details", summary = "Get Loan Collateral Details") + @Operation(description = "Get Loan Collateral Details", tags = {"Loan Collateral Management"}, summary = "Get Loan Collateral Details") public LoanCollateralResponseData getLoanCollateral( @PathParam("collateralId") @Parameter(description = "collateralId") final Long collateralId) { return this.loanCollateralManagementReadPlatformService.getLoanCollateralResponseData(collateralId); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/api/CollectionSheetApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/api/CollectionSheetApiResource.java index 78003256657..07dd038cde5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/api/CollectionSheetApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/api/CollectionSheetApiResource.java @@ -31,7 +31,10 @@ import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Consumes; import jakarta.ws.rs.POST; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; import jakarta.ws.rs.core.MediaType; @@ -65,7 +68,7 @@ public class CollectionSheetApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Generate Individual Collection Sheet | Save Collection Sheet", description = "Generate Individual Collection Sheet:\n\n" + @Operation(summary = "Generate Individual Collection Sheet | Save Collection Sheet", tags = {"Collection Sheet"}, description = "Generate Individual Collection Sheet:\n\n" + "This Api retrieves repayment details of all individual loans under a office as on a specified meeting date.\n\n" + "Save Collection Sheet:\n\n" + "This Api allows the loan officer to perform bulk repayments of individual loans and deposit of mandatory savings on a given meeting date.") diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/api/FundsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/api/FundsApiResource.java index f1d3576ad60..a79e8e3d309 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/api/FundsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/api/FundsApiResource.java @@ -29,7 +29,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; @@ -70,7 +73,7 @@ public class FundsApiResource { @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Funds", description = "Returns the list of funds.\n" + "\n" + "Example Requests:\n" + "\n" + "funds") + @Operation(summary = "Retrieve Funds", tags = {"Funds"}, description = "Returns the list of funds.\n" + "\n" + "Example Requests:\n" + "\n" + "funds") public List retrieveFunds() { context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSIONS); return readPlatformService.retrieveAllFunds(); @@ -79,7 +82,7 @@ public List retrieveFunds() { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create a Fund", description = "Creates a Fund") + @Operation(summary = "Create a Fund", tags = {"Funds"}, description = "Creates a Fund") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = FundRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = FundsApiResourceSwagger.PostFundsResponse.class))) public CommandProcessingResult createFund(@Parameter(hidden = true) final FundRequest fundRequest) { @@ -91,7 +94,7 @@ public CommandProcessingResult createFund(@Parameter(hidden = true) final FundRe @GET @Path("{fundId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Fund", description = "Returns the details of a Fund.\n" + "\n" + "Example Requests:\n" + "\n" + @Operation(summary = "Retrieve a Fund", tags = {"Funds"}, description = "Returns the details of a Fund.\n" + "\n" + "Example Requests:\n" + "\n" + "funds/1") public FundData retrieveFund(@PathParam("fundId") @Parameter(description = "fundId") final Long fundId) { context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSIONS); @@ -102,7 +105,7 @@ public FundData retrieveFund(@PathParam("fundId") @Parameter(description = "fund @Path("{fundId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update a Fund", description = "Updates the details of a fund.") + @Operation(summary = "Update a Fund", tags = {"Funds"}, description = "Updates the details of a fund.") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = FundRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = FundsApiResourceSwagger.PutFundsFundIdResponse.class))) public String updateFund(@PathParam("fundId") @Parameter(description = "fundId") final Long fundId, diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/CentersApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/CentersApiResource.java index d4e78e1af8a..2d65458b931 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/CentersApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/CentersApiResource.java @@ -32,7 +32,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -118,7 +121,7 @@ public class CentersApiResource { @GET @Path("template") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Center Template", operationId = "retrieveTemplateCenter", description = """ + @Operation(summary = "Retrieve a Center Template", operationId = "retrieveTemplateCenter", tags = {"Centers"}, description = """ Retrieves a Center Template Example Requests: @@ -157,7 +160,7 @@ public String retrieveTemplate(@Context final UriInfo uriInfo, @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Centers", operationId = "retrieveAllCenters", description = """ + @Operation(summary = "List Centers", operationId = "retrieveAllCenters", tags = {"Centers"}, description = """ The default implementation supports pagination and sorting with the default pagination size set to 200 records. The parameter limit with description -1 will return all entries. Example Requests: @@ -223,7 +226,7 @@ public String retrieveAll(@Context final UriInfo uriInfo, @GET @Path("{centerId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Center", operationId = "retrieveOneCenter", description = """ + @Operation(summary = "Retrieve a Center", operationId = "retrieveOneCenter", tags = {"Centers"}, description = """ Retrieves a Center Example Requests: @@ -287,7 +290,7 @@ public String retrieveOne(@Context final UriInfo uriInfo, @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create a Center", operationId = "createCenter", description = """ + @Operation(summary = "Create a Center", operationId = "createCenter", tags = {"Centers"}, description = """ Creates a Center Mandatory Fields: name, officeId, active, activationDate (if active=true) @@ -311,7 +314,7 @@ public String create(@Parameter(hidden = true) final String apiRequestBodyAsJson @Path("{centerId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update a Center", operationId = "updateCenter", description = "Updates a Center") + @Operation(summary = "Update a Center", operationId = "updateCenter", tags = {"Centers"}, description = "Updates a Center") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = CentersApiResourceSwagger.PutCentersCenterIdRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CentersApiResourceSwagger.PutCentersCenterIdResponse.class))) @@ -329,7 +332,7 @@ public String update(@PathParam("centerId") @Parameter(description = "centerId") @DELETE @Path("{centerId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Delete a Center", operationId = "deleteCenter", description = "A Center can be deleted if it is in pending state and has no association - groups, loans or savings") + @Operation(summary = "Delete a Center", operationId = "deleteCenter", tags = {"Centers"}, description = "A Center can be deleted if it is in pending state and has no association - groups, loans or savings") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CentersApiResourceSwagger.DeleteCentersCenterIdResponse.class))) public String delete(@PathParam("centerId") @Parameter(description = "centerId") final Long centerId) { @@ -344,7 +347,7 @@ public String delete(@PathParam("centerId") @Parameter(description = "centerId") @Path("{centerId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Activate a Center | Generate Collection Sheet | Save Collection Sheet | Close a Center | Associate Groups | Disassociate Groups", operationId = "handleCommandsCenter", description = """ + @Operation(tags = {"Centers"}, summary = "Activate a Center | Generate Collection Sheet | Save Collection Sheet | Close a Center | Associate Groups | Disassociate Groups", operationId = "handleCommandsCenter", description = """ Activate a Center: Centers can be created in a Pending state. This API exists to enable center activation. If the center happens to be already active, this API will result in an error. @@ -421,7 +424,7 @@ private boolean is(final String commandParam, final String commandValue) { @GET @Path("{centerId}/accounts") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Center accounts overview", operationId = "retrieveGroupAccountsCenter", description = """ + @Operation(summary = "Retrieve Center accounts overview", operationId = "retrieveGroupAccountsCenter", tags = {"Centers"}, description = """ An example of how a savings summary for a Center can be provided. This is requested in a specific use case of the reference application. It is quite reasonable to add resources like this to simplify User Interface development. @@ -451,7 +454,7 @@ public String retrieveGroupAccount(@PathParam("centerId") @Parameter(description @GET @Path("downloadtemplate") @Produces("application/vnd.ms-excel") - @Operation(summary = "Download Centers Bulk Template", operationId = "getBulkTemplateCenter") + @Operation(summary = "Download Centers Bulk Template", tags = {"Centers"}, operationId = "getBulkTemplateCenter") public Response getCentersTemplate(@QueryParam("officeId") final Long officeId, @QueryParam("staffId") final Long staffId, @QueryParam("dateFormat") final String dateFormat) { return bulkImportWorkbookPopulatorService.getTemplate(GlobalEntityType.CENTERS.toString(), officeId, staffId, dateFormat); @@ -460,7 +463,7 @@ public Response getCentersTemplate(@QueryParam("officeId") final Long officeId, @POST @Path("uploadtemplate") @Consumes(MediaType.MULTIPART_FORM_DATA) - @Operation(summary = "Upload Centers Bulk Template", operationId = "postBulkTemplateCenter") + @Operation(summary = "Upload Centers Bulk Template", tags = {"Centers"}, operationId = "postBulkTemplateCenter") @RequestBody(description = "Upload centers template", content = { @Content(mediaType = MediaType.MULTIPART_FORM_DATA, schema = @Schema(implementation = UploadRequest.class)) }) public String postCentersTemplate(@FormDataParam("file") InputStream uploadedInputStream, diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/GroupsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/GroupsApiResource.java index 72bbbcca8a5..3da4f90f99c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/GroupsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/GroupsApiResource.java @@ -32,7 +32,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -135,7 +138,7 @@ public class GroupsApiResource { @GET @Path("template") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Group Template", operationId = "retrieveTemplateGroup", 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" + @Operation(summary = "Retrieve Group Template", operationId = "retrieveTemplateGroup", tags = {"Groups"}, 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" + "\n\n" + "Field Defaults\n\n" + "Allowed Value Lists\n\n" + "Example Requests:\n\n" + "\n\n" + "groups/template\n\n" + "\n\n" + "groups/template?officeId=2\n\n" + "\n\n" + "groups/template?centerId=1\n\n" + "\n\n" + "groups/template?centerId=1&staffInSelectedOfficeOnly=true") @@ -176,7 +179,7 @@ public String retrieveTemplate(@Context final UriInfo uriInfo, @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Groups", operationId = "retrieveAllGroups", description = "The default implementation of listing Groups returns 200 entries with support for pagination and sorting. Using the parameter limit with description -1 returns all entries.\n\n" + @Operation(summary = "List Groups", operationId = "retrieveAllGroups", tags = {"Groups"}, description = "The default implementation of listing Groups returns 200 entries with support for pagination and sorting. Using the parameter limit with description -1 returns all entries.\n\n" + "Example Requests:\n\n" + "\n\n" + "groups\n\n" + "\n\n" + "groups?fields=name,officeName,joinedDate\n\n" + "\n\n" + "groups?offset=10&limit=50\n\n" + "\n\n" + "groups?orderBy=name&sortOrder=DESC") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = GroupsApiResourceSwagger.GetGroupsResponse.class))) @@ -217,7 +220,7 @@ public String retrieveAll(@Context final UriInfo uriInfo, @GET @Path("{groupId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Group", operationId = "retrieveOneGroup", description = "Retrieve group information.\n\n" + @Operation(summary = "Retrieve a Group", operationId = "retrieveOneGroup", tags = {"Groups"}, description = "Retrieve group information.\n\n" + "Example Requests:\n\n" + "\n\n" + "groups/1\n\n" + "\n\n" + "groups/1?associations=clientMembers") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = GroupsApiResourceSwagger.GetGroupsGroupIdResponse.class))) public String retrieveOne(@Context final UriInfo uriInfo, @PathParam("groupId") @Parameter(description = "groupId") final Long groupId, @@ -317,7 +320,7 @@ public String retrieveOne(@Context final UriInfo uriInfo, @PathParam("groupId") @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create a Group", operationId = "createGroup", description = "Creates a Group\n\n" + @Operation(summary = "Create a Group", operationId = "createGroup", tags = {"Groups"}, description = "Creates a Group\n\n" + "Mandatory Fields: name, officeId, active, activationDate (if active=true)\n\n" + "Optional Fields: externalId, staffId, clientMembers") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = GroupsApiResourceSwagger.PostGroupsRequest.class))) @@ -336,7 +339,7 @@ public String create(@Parameter(hidden = true) final String apiRequestBodyAsJson @Path("{groupId}/command/unassign_staff") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Unassign a Staff", operationId = "unassignLoanOfficerGroup", description = "Allows you to unassign the Staff.\n\n" + @Operation(summary = "Unassign a Staff", operationId = "unassignLoanOfficerGroup", tags = {"Groups"}, description = "Allows you to unassign the Staff.\n\n" + "Mandatory Fields: staffId") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = GroupsApiResourceSwagger.PostGroupsGroupIdCommandUnassignStaffRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = GroupsApiResourceSwagger.PostGroupsGroupIdCommandUnassignStaffResponse.class))) @@ -356,7 +359,7 @@ public String unassignLoanOfficer(@PathParam("groupId") @Parameter(description = @Path("{groupId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update a Group", operationId = "updateGroup", description = "Updates a Group") + @Operation(summary = "Update a Group", operationId = "updateGroup", tags = {"Groups"}, description = "Updates a Group") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = GroupsApiResourceSwagger.PutGroupsGroupIdRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = GroupsApiResourceSwagger.PutGroupsGroupIdResponse.class))) public String update(@PathParam("groupId") @Parameter(description = "groupId") final Long groupId, @@ -373,7 +376,7 @@ public String update(@PathParam("groupId") @Parameter(description = "groupId") f @DELETE @Path("{groupId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Delete a Group", operationId = "deleteGroup", description = "A group can be deleted if it is in pending state and has no associations - clients, loans or savings") + @Operation(summary = "Delete a Group", operationId = "deleteGroup", tags = {"Groups"}, description = "A group can be deleted if it is in pending state and has no associations - clients, loans or savings") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = GroupsApiResourceSwagger.DeleteGroupsGroupIdResponse.class))) public String delete(@PathParam("groupId") @Parameter(description = "groupId") final Long groupId) { @@ -388,7 +391,7 @@ public String delete(@PathParam("groupId") @Parameter(description = "groupId") f @Path("{groupId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Activate a Group | Associate Clients | Disassociate Clients | Transfer Clients across groups | Generate Collection Sheet | Save Collection Sheet | Unassign a Staff | Assign a Staff | Close a Group | Unassign a Role | Update a Role", operationId = "handleCommandsGroup", description = "Activate a Group:\n\n" + @Operation(tags = {"Groups"}, summary = "Activate a Group | Associate Clients | Disassociate Clients | Transfer Clients across groups | Generate Collection Sheet | Save Collection Sheet | Unassign a Staff | Assign a Staff | Close a Group | Unassign a Role | Update a Role", operationId = "handleCommandsGroup", description = "Activate a Group:\n\n" + "Groups can be created in a Pending state. This API exists to enable group activation.\n\n" + "\n\n" + "If the group happens to be already active this API will result in an error.\n\n" + "Mandatory Fields: activationDate\n\n" + "Associate Clients:\n\n" + "This API allows to associate existing clients to a group.\n\n" + "\n\n" @@ -492,7 +495,7 @@ private boolean is(final String commandParam, final String commandValue) { @GET @Path("{groupId}/accounts") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Group accounts overview", operationId = "retrieveAccountsGroup", description = "Retrieves details of all Loan and Savings accounts associated with this group.\n\n" + @Operation(summary = "Retrieve Group accounts overview", operationId = "retrieveAccountsGroup", tags = {"Groups"}, description = "Retrieves details of all Loan and Savings accounts associated with this group.\n\n" + "\n\n" + "Example Requests:\n\n" + "\n\n" + "groups/1/accounts\n\n" + "\n\n" + "\n\n" + "groups/1/accounts?fields=loanAccounts,savingsAccounts,memberLoanAccounts,\n\n" + "memberSavingsAccounts") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = GroupsApiResourceSwagger.GetGroupsGroupIdAccountsResponse.class))) @@ -513,7 +516,7 @@ public String retrieveAccounts(@PathParam("groupId") @Parameter(description = "g @GET @Path("downloadtemplate") @Produces("application/vnd.ms-excel") - @Operation(summary = "Download Groups Bulk Template", operationId = "getBulkTemplateGroup") + @Operation(summary = "Download Groups Bulk Template", tags = {"Groups"}, operationId = "getBulkTemplateGroup") public Response getGroupsTemplate(@QueryParam("officeId") final Long officeId, @QueryParam("staffId") final Long staffId, @QueryParam("dateFormat") final String dateFormat) { return bulkImportWorkbookPopulatorService.getTemplate(GlobalEntityType.GROUPS.toString(), officeId, staffId, dateFormat); @@ -522,7 +525,7 @@ public Response getGroupsTemplate(@QueryParam("officeId") final Long officeId, @ @POST @Path("uploadtemplate") @Consumes(MediaType.MULTIPART_FORM_DATA) - @Operation(summary = "Upload Groups Bulk Template", operationId = "postBulkTemplateGroup") + @Operation(summary = "Upload Groups Bulk Template", tags = {"Groups"}, operationId = "postBulkTemplateGroup") @RequestBody(description = "Upload group template", content = { @Content(mediaType = MediaType.MULTIPART_FORM_DATA, schema = @Schema(implementation = UploadRequest.class)) }) public String postGroupTemplate(@FormDataParam("file") InputStream uploadedInputStream, @@ -536,7 +539,7 @@ public String postGroupTemplate(@FormDataParam("file") InputStream uploadedInput @GET @Path("{groupId}/glimaccounts") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve GLIM Accounts for Group", operationId = "retrieveGlimAccountsGroup") + @Operation(summary = "Retrieve GLIM Accounts for Group", tags = {"Groups"}, operationId = "retrieveGlimAccountsGroup") public String retrieveglimAccounts(@PathParam("groupId") final Long groupId, @QueryParam("parentLoanAccountNo") final String parentLoanAccountNo, @Context final UriInfo uriInfo) { context.authenticatedUser().validateHasReadPermission("GROUP"); @@ -559,7 +562,7 @@ public String retrieveglimAccounts(@PathParam("groupId") final Long groupId, @GET @Path("{groupId}/gsimaccounts") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve GSIM Accounts for Group", operationId = "retrieveGsimAccountsGroup") + @Operation(summary = "Retrieve GSIM Accounts for Group", tags = {"Groups"}, operationId = "retrieveGsimAccountsGroup") public String retrieveGsimAccounts(@PathParam("groupId") final Long groupId, @QueryParam("parentGSIMAccountNo") final String parentGSIMAccountNo, @QueryParam("parentGSIMId") final Long parentGSIMId, @Context final UriInfo uriInfo) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/GroupsLevelApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/GroupsLevelApiResource.java index fbad3bf166b..96790c89067 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/GroupsLevelApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/GroupsLevelApiResource.java @@ -21,7 +21,10 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.GET; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; import java.util.List; @@ -42,7 +45,7 @@ public class GroupsLevelApiResource { @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve All Group Levels", operationId = "retrieveAllGroupLevels") + @Operation(summary = "Retrieve All Group Levels", tags = {"Groups Level"}, operationId = "retrieveAllGroupLevels") public List retrieveAllGroups() { this.context.authenticatedUser().validateHasReadPermission("GROUP"); 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 2df192ebe4a..c28a54b89fc 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 @@ -28,7 +28,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; @@ -64,13 +67,13 @@ public class InterestRateChartSlabsApiResource { @GET @Path("template") - @Operation(summary = "Retrieve Chart Slab Template", operationId = "retrieveTemplateInterestRateChartSlab") + @Operation(summary = "Retrieve Chart Slab Template", tags = {"Interest Rate Slab (A.K.A interest bands)"}, operationId = "retrieveTemplateInterestRateChartSlab") public InterestRateChartSlabData template(@PathParam("chartId") final Long chartId) { return interestRateChartSlabsReadService.retrieveTemplate(); } @GET - @Operation(summary = "Retrieve all Slabs", operationId = "retrieveAllInterestRateChartSlabs", description = "Retrieve list of slabs associated with a chart\n" + @Operation(summary = "Retrieve all Slabs", operationId = "retrieveAllInterestRateChartSlabs", tags = {"Interest Rate Slab (A.K.A interest bands)"}, description = "Retrieve list of slabs associated with a chart\n" + "\n" + "Example Requests:\n" + "\n" + "interestratecharts/1/chartslabs") public List retrieveAll(@PathParam("chartId") final Long chartId) { return interestRateChartSlabsReadService.retrieveAll(chartId); @@ -78,7 +81,7 @@ public List retrieveAll(@PathParam("chartId") final L @GET @Path("{chartSlabId}") - @Operation(summary = "Retrieve a Slab", operationId = "retrieveOneInterestRateChartSlab", description = """ + @Operation(summary = "Retrieve a Slab", operationId = "retrieveOneInterestRateChartSlab", tags = {"Interest Rate Slab (A.K.A interest bands)"}, description = """ Retrieve a slab associated with an Interest rate chart Example Requests: @@ -92,7 +95,7 @@ public InterestRateChartSlabData retrieveOne(@PathParam("chartId") final Long ch @POST @Consumes({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create a Slab", operationId = "createInterestRateChartSlab", description = """ + @Operation(summary = "Create a Slab", operationId = "createInterestRateChartSlab", tags = {"Interest Rate Slab (A.K.A interest bands)"}, description = """ Creates a new interest rate slab for an interest rate chart. Mandatory Fields: @@ -123,7 +126,7 @@ public InterestRateChartSlabsCreateResponse create(@PathParam("chartId") final L @PUT @Path("{chartSlabId}") @Consumes({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update a Slab", operationId = "updateInterestRateChartSlab", description = "It updates the Slab from chart") + @Operation(summary = "Update a Slab", operationId = "updateInterestRateChartSlab", tags = {"Interest Rate Slab (A.K.A interest bands)"}, description = "It updates the Slab from chart") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = InterestRateChartSlabsUpdateResponse.class))) public InterestRateChartSlabsUpdateResponse update(@PathParam("chartId") final Long chartId, @PathParam("chartSlabId") final Long chartSlabId, final InterestRateChartSlabsUpdateRequest request) { @@ -140,7 +143,7 @@ public InterestRateChartSlabsUpdateResponse update(@PathParam("chartId") final L @DELETE @Path("{chartSlabId}") - @Operation(summary = "Delete a Slab", operationId = "deleteInterestRateChartSlab", description = "Delete a Slab from a chart") + @Operation(summary = "Delete a Slab", operationId = "deleteInterestRateChartSlab", tags = {"Interest Rate Slab (A.K.A interest bands)"}, description = "Delete a Slab from a chart") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = InterestRateChartSlabsDeleteResponse.class))) public InterestRateChartSlabsDeleteResponse delete(@PathParam("chartId") final Long chartId, @PathParam("chartSlabId") final Long chartSlabId) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/api/InterestRateChartsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/api/InterestRateChartsApiResource.java index 08639d50c9e..a3a794715c0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/api/InterestRateChartsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/api/InterestRateChartsApiResource.java @@ -30,7 +30,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -66,7 +69,7 @@ public class InterestRateChartsApiResource { @GET @Path("template") - @Operation(summary = "Retrieve Chart Details Template", operationId = "retrieveTemplateInterestRateChart", description = """ + @Operation(summary = "Retrieve Chart Details Template", operationId = "retrieveTemplateInterestRateChart", tags = {"Interest Rate Chart"}, description = """ This is a convenience resource. It can be useful when building maintenance user interface screens for creating a chart. The template data returned consists of any or all of: Field Defaults Allowed Value Lists Example Request: interestratecharts/template """) @@ -76,7 +79,7 @@ public InterestRateChartData template() { } @GET - @Operation(summary = "Retrieve all Charts", operationId = "retrieveAllInterestRateCharts", description = """ + @Operation(summary = "Retrieve all Charts", operationId = "retrieveAllInterestRateCharts", tags = {"Interest Rate Chart"}, description = """ Retrieve list of charts associated with a term deposit product(FD or RD). Example Requests: interestratecharts?productId=1 """) @@ -88,7 +91,7 @@ public Collection retrieveAll(@QueryParam("productId") fi @GET @Path("{chartId}") - @Operation(summary = "Retrieve a Chart", operationId = "retrieveOneInterestRateChart", description = "It retrieves the Interest Rate Chart\n" + @Operation(summary = "Retrieve a Chart", operationId = "retrieveOneInterestRateChart", tags = {"Interest Rate Chart"}, description = "It retrieves the Interest Rate Chart\n" + "Example Requests:\n" + "\n" + "interestratecharts/1") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = InterestRateChartsApiResourceSwagger.GetInterestRateChartsResponse.class))) public InterestRateChartData retrieveOne(@PathParam("chartId") final Long chartId, @@ -104,7 +107,7 @@ public InterestRateChartData retrieveOne(@PathParam("chartId") final Long chartI @POST @Consumes({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create a Chart", operationId = "createInterestRateChart", description = "Creates a new chart which can be attached to a term deposit products (FD or RD).") + @Operation(summary = "Create a Chart", operationId = "createInterestRateChart", tags = {"Interest Rate Chart"}, description = "Creates a new chart which can be attached to a term deposit products (FD or RD).") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = InterestRateChartCreateResponse.class))) public InterestRateChartCreateResponse create(final InterestRateChartCreateRequest request) { @@ -117,7 +120,7 @@ public InterestRateChartCreateResponse create(final InterestRateChartCreateReque @PUT @Path("{chartId}") @Consumes({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update a Chart", operationId = "updateInterestRateChart", description = "It updates the chart") + @Operation(summary = "Update a Chart", operationId = "updateInterestRateChart", tags = {"Interest Rate Chart"}, description = "It updates the chart") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = InterestRateChartUpdateResponse.class))) public InterestRateChartUpdateResponse update(@PathParam("chartId") final Long chartId, final InterestRateChartUpdateRequest request) { request.setId(chartId); @@ -129,7 +132,7 @@ public InterestRateChartUpdateResponse update(@PathParam("chartId") final Long c @DELETE @Path("{chartId}") - @Operation(summary = "Delete a Chart", operationId = "deleteInterestRateChart", description = "It deletes the chart") + @Operation(summary = "Delete a Chart", operationId = "deleteInterestRateChart", tags = {"Interest Rate Chart"}, description = "It deletes the chart") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = InterestRateChartDeleteResponse.class))) public InterestRateChartDeleteResponse delete(@PathParam("chartId") final Long chartId) { final var command = new InterestRateChartDeleteCommand(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/BulkLoansApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/BulkLoansApiResource.java index 57ab91f8ef0..aa172ae9de5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/BulkLoansApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/BulkLoansApiResource.java @@ -22,7 +22,10 @@ import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; import jakarta.ws.rs.core.Context; @@ -80,6 +83,7 @@ public class BulkLoansApiResource { @GET @Path("template") @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Retrieve Loan Reassignment Template", tags = {"Bulk Loans"}, description = "Returns a template for bulk loan reassignment") public String loanReassignmentTemplate(@QueryParam(OFFICE_ID) final Long officeId, @QueryParam(FROM_LOAN_OFFICER_ID) final Long loanOfficerId, @Context final UriInfo uriInfo) { @@ -108,6 +112,7 @@ public String loanReassignmentTemplate(@QueryParam(OFFICE_ID) final Long officeI @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Bulk Loan Reassignment", tags = {"Bulk Loans"}, description = "Assigns loan officers in bulk to loans") public String loanReassignment(final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().assignLoanOfficersInBulk().withJson(apiRequestBodyAsJson).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/InternalLoanInformationApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/InternalLoanInformationApiResource.java index 5b584dfba64..937882a530a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/InternalLoanInformationApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/InternalLoanInformationApiResource.java @@ -20,7 +20,10 @@ import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import jakarta.ws.rs.GET; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Context; @@ -42,6 +45,7 @@ import org.springframework.context.annotation.Profile; import org.springframework.stereotype.Component; +@Tag(name = "Internal Loan Information", description = "Internal loan resources for testing") @Profile(FineractProfiles.TEST) @Component @Path("/v1/internal/loan") @@ -71,6 +75,7 @@ public void afterPropertiesSet() { @Path("{loanId}/audit") @Produces({ MediaType.APPLICATION_JSON }) @SuppressFBWarnings("SLF4J_SIGN_ONLY_FORMAT") + @Operation(summary = "Retrieve Loan Audit Fields", tags = {"Internal Loan Information"}, description = "Returns audit details for a specific loan") public AuditData getLoanAuditFields(@Context final UriInfo uriInfo, @PathParam("loanId") Long loanId) { log.warn("------------------------------------------------------------"); log.warn(" "); @@ -87,6 +92,7 @@ public AuditData getLoanAuditFields(@Context final UriInfo uriInfo, @PathParam(" @Path("{loanId}/transaction/{transactionId}/audit") @Produces({ MediaType.APPLICATION_JSON }) @SuppressFBWarnings("SLF4J_SIGN_ONLY_FORMAT") + @Operation(summary = "Retrieve Loan Transaction Audit Fields", tags = {"Internal Loan Information"}, description = "Returns audit details for a specific loan transaction") public AuditData getLoanTransactionAuditFields(@Context final UriInfo uriInfo, @PathParam("loanId") Long loanId, @PathParam("transactionId") Long transactionId) { log.warn("------------------------------------------------------------"); @@ -104,6 +110,7 @@ public AuditData getLoanTransactionAuditFields(@Context final UriInfo uriInfo, @ @Path("status/{statusId}") @Produces({ MediaType.APPLICATION_JSON }) @SuppressFBWarnings("SLF4J_SIGN_ONLY_FORMAT") + @Operation(summary = "Retrieve Loans by Status", tags = {"Internal Loan Information"}, description = "Returns a list of loan IDs based on the provided status") public List getLoansByStatus(@Context final UriInfo uriInfo, @PathParam("statusId") Integer statusId) { log.warn("------------------------------------------------------------"); log.warn(" "); @@ -118,6 +125,7 @@ public List getLoansByStatus(@Context final UriInfo uriInfo, @PathParam("s @Path("{loanId}/advanced-payment-allocation-rules") @Produces({ MediaType.APPLICATION_JSON }) @SuppressFBWarnings("SLF4J_SIGN_ONLY_FORMAT") + @Operation(summary = "Retrieve Advanced Payment Allocation Rules", tags = {"Internal Loan Information"}, description = "Returns advanced payment allocation rules for a specific loan") public List getAdvancedPaymentAllocationRulesOfLoan(@Context final UriInfo uriInfo, @PathParam("loanId") Long loanId) { log.warn("------------------------------------------------------------"); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanChargesApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanChargesApiResource.java index 1a8200674a1..441fb66625d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanChargesApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanChargesApiResource.java @@ -31,7 +31,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -94,7 +97,7 @@ public class LoanChargesApiResource { @GET @Path("{loanId}/charges") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Loan Charges", description = "It lists all the Loan Charges specific to a Loan \n\n" + "Example Requests:\n" + @Operation(summary = "List Loan Charges", tags = {"Loan Charges"}, description = "It lists all the Loan Charges specific to a Loan \n\n" + "Example Requests:\n" + "\n" + "loans/1/charges\n" + "\n" + "\n" + "loans/1/charges?fields=name,amountOrPercentage") @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = LoanChargesApiResourceSwagger.GetLoansLoanIdChargesChargeIdResponse.class)))) public String retrieveAllLoanCharges(@PathParam("loanId") @Parameter(description = "loanId") final Long loanId, @@ -106,7 +109,7 @@ public String retrieveAllLoanCharges(@PathParam("loanId") @Parameter(description @GET @Path("external-id/{loanExternalId}/charges") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Loan Charges", operationId = "retrieveAllLoanChargesByLoanExternalId", description = "It lists all the Loan Charges specific to a Loan \n\n" + @Operation(summary = "List Loan Charges", operationId = "retrieveAllLoanChargesByLoanExternalId", tags = {"Loan Charges"}, description = "It lists all the Loan Charges specific to a Loan \n\n" + "Example Requests:\n" + "\n" + "loans/1/charges\n" + "\n" + "\n" + "loans/1/charges?fields=name,amountOrPercentage") @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = LoanChargesApiResourceSwagger.GetLoansLoanIdChargesChargeIdResponse.class)))) public String retrieveAllLoanCharges( @@ -119,7 +122,7 @@ public String retrieveAllLoanCharges( @GET @Path("{loanId}/charges/template") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Loan Charges Template", operationId = "retrieveTemplateLoanCharge", 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" + @Operation(summary = "Retrieve Loan Charges Template", operationId = "retrieveTemplateLoanCharge", tags = {"Loan Charges"}, 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" + "loans/1/charges/template\n" + "\n") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoanChargesApiResourceSwagger.GetLoansLoanIdChargesTemplateResponse.class))) public String retrieveTemplate(@PathParam("loanId") @Parameter(description = "loanId") final Long loanId, @@ -131,7 +134,7 @@ public String retrieveTemplate(@PathParam("loanId") @Parameter(description = "lo @GET @Path("external-id/{loanExternalId}/charges/template") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Loan Charges Template", operationId = "retrieveTemplateLoanChargeByLoanExternalId", 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" + @Operation(summary = "Retrieve Loan Charges Template", operationId = "retrieveTemplateLoanChargeByLoanExternalId", tags = {"Loan Charges"}, 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" + "loans/1/charges/template\n" + "\n") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoanChargesApiResourceSwagger.GetLoansLoanIdChargesTemplateResponse.class))) public String retrieveTemplate(@PathParam("loanExternalId") @Parameter(description = "loanExternalId") final String loanExternalId, @@ -143,7 +146,7 @@ public String retrieveTemplate(@PathParam("loanExternalId") @Parameter(descripti @GET @Path("{loanId}/charges/{loanChargeId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Loan Charge", description = "Retrieves Loan Charge according to the Loan ID and Loan Charge ID" + @Operation(summary = "Retrieve a Loan Charge", tags = {"Loan Charges"}, description = "Retrieves Loan Charge according to the Loan ID and Loan Charge ID" + "Example Requests:\n" + "\n" + "/loans/1/charges/1\n" + "\n" + "\n" + "/loans/1/charges/1?fields=name,amountOrPercentage") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoanChargesApiResourceSwagger.GetLoansLoanIdChargesChargeIdResponse.class))) public String retrieveLoanCharge(@PathParam("loanId") @Parameter(description = "loanId") final Long loanId, @@ -155,7 +158,7 @@ public String retrieveLoanCharge(@PathParam("loanId") @Parameter(description = " @GET @Path("{loanId}/charges/external-id/{loanChargeExternalId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Loan Charge", operationId = "retrieveLoanChargeByChargeExternalId", description = "Retrieves Loan Charge according to the Loan ID and Loan Charge External ID" + @Operation(summary = "Retrieve a Loan Charge", operationId = "retrieveLoanChargeByChargeExternalId", tags = {"Loan Charges"}, description = "Retrieves Loan Charge according to the Loan ID and Loan Charge External ID" + "Example Requests:\n" + "\n" + "/loans/1/charges/1\n" + "\n" + "\n" + "/loans/1/charges/external-id/1?fields=name,amountOrPercentage") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoanChargesApiResourceSwagger.GetLoansLoanIdChargesChargeIdResponse.class))) @@ -169,7 +172,7 @@ public String retrieveLoanCharge(@PathParam("loanId") @Parameter(description = " @GET @Path("external-id/{loanExternalId}/charges/{loanChargeId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Loan Charge", operationId = "retrieveLoanChargeByLoanExternalId", description = "Retrieves Loan Charge according to the Loan external ID and Loan Charge ID" + @Operation(summary = "Retrieve a Loan Charge", operationId = "retrieveLoanChargeByLoanExternalId", tags = {"Loan Charges"}, description = "Retrieves Loan Charge according to the Loan external ID and Loan Charge ID" + "Example Requests:\n" + "\n" + "/loans/1/charges/1\n" + "\n" + "\n" + "/loans/1/charges/1?fields=name,amountOrPercentage") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoanChargesApiResourceSwagger.GetLoansLoanIdChargesChargeIdResponse.class))) public String retrieveLoanCharge(@PathParam("loanExternalId") @Parameter(description = "loanExternalId") final String loanExternalId, @@ -181,7 +184,7 @@ public String retrieveLoanCharge(@PathParam("loanExternalId") @Parameter(descrip @GET @Path("external-id/{loanExternalId}/charges/external-id/{loanChargeExternalId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Loan Charge", operationId = "retrieveLoanChargeByLoanAndChargeExternalId", description = "Retrieves Loan Charge according to the Loan External ID and Loan Charge External ID" + @Operation(summary = "Retrieve a Loan Charge", operationId = "retrieveLoanChargeByLoanAndChargeExternalId", tags = {"Loan Charges"}, description = "Retrieves Loan Charge according to the Loan External ID and Loan Charge External ID" + "Example Requests:\n" + "\n" + "/loans/1/charges/1\n" + "\n" + "\n" + "/loans/1/charges/1?fields=name,amountOrPercentage") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoanChargesApiResourceSwagger.GetLoansLoanIdChargesChargeIdResponse.class))) public String retrieveLoanCharge(@PathParam("loanExternalId") @Parameter(description = "loanExternalId") final String loanExternalId, @@ -195,7 +198,7 @@ public String retrieveLoanCharge(@PathParam("loanExternalId") @Parameter(descrip @Path("{loanId}/charges") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create a Loan Charge (no command provided) or Pay a charge (command=pay)", description = "Creates a Loan Charge | Pay a Loan Charge") + @Operation(summary = "Create a Loan Charge (no command provided) or Pay a charge (command=pay)", tags = {"Loan Charges"}, description = "Creates a Loan Charge | Pay a Loan Charge") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = LoanChargesApiResourceSwagger.PostLoansLoanIdChargesRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoanChargesApiResourceSwagger.PostLoansLoanIdChargesResponse.class))) public String executeLoanCharge(@PathParam("loanId") @Parameter(description = "loanId") final Long loanId, @@ -209,7 +212,7 @@ public String executeLoanCharge(@PathParam("loanId") @Parameter(description = "l @Path("external-id/{loanExternalId}/charges") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create a Loan Charge (no command provided) or Pay a charge (command=pay)", operationId = "executeLoanChargeByLoanExternalId", description = "Creates a Loan Charge | Pay a Loan Charge") + @Operation(summary = "Create a Loan Charge (no command provided) or Pay a charge (command=pay)", operationId = "executeLoanChargeByLoanExternalId", tags = {"Loan Charges"}, description = "Creates a Loan Charge | Pay a Loan Charge") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = LoanChargesApiResourceSwagger.PostLoansLoanIdChargesRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoanChargesApiResourceSwagger.PostLoansLoanIdChargesResponse.class))) public String executeLoanCharge(@PathParam("loanExternalId") @Parameter(description = "loanExternalId") final String loanExternalId, @@ -223,7 +226,7 @@ public String executeLoanCharge(@PathParam("loanExternalId") @Parameter(descript @Path("{loanId}/charges/{loanChargeId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Pay / Waive / Adjustment for Loan Charge", operationId = "executeLoanChargeOnExistingCharge", description = "Loan Charge will be paid if the loan is linked with a savings account | Waive Loan Charge | Add Charge Adjustment") + @Operation(summary = "Pay / Waive / Adjustment for Loan Charge", operationId = "executeLoanChargeOnExistingCharge", tags = {"Loan Charges"}, description = "Loan Charge will be paid if the loan is linked with a savings account | Waive Loan Charge | Add Charge Adjustment") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = LoanChargesApiResourceSwagger.PostLoansLoanIdChargesChargeIdRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoanChargesApiResourceSwagger.PostLoansLoanIdChargesChargeIdResponse.class))) public String executeLoanCharge(@PathParam("loanId") @Parameter(description = "loanId") final Long loanId, @@ -238,7 +241,7 @@ public String executeLoanCharge(@PathParam("loanId") @Parameter(description = "l @Path("{loanId}/charges/external-id/{loanChargeExternalId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Pay / Waive / Adjustment for Loan Charge", operationId = "executeLoanChargeByChargeExternalId", description = "Loan Charge will be paid if the loan is linked with a savings account | Waive Loan Charge | Add Charge Adjustment") + @Operation(summary = "Pay / Waive / Adjustment for Loan Charge", operationId = "executeLoanChargeByChargeExternalId", tags = {"Loan Charges"}, description = "Loan Charge will be paid if the loan is linked with a savings account | Waive Loan Charge | Add Charge Adjustment") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = LoanChargesApiResourceSwagger.PostLoansLoanIdChargesChargeIdRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoanChargesApiResourceSwagger.PostLoansLoanIdChargesChargeIdResponse.class))) public String executeLoanCharge(@PathParam("loanId") @Parameter(description = "loanId") final Long loanId, @@ -253,7 +256,7 @@ public String executeLoanCharge(@PathParam("loanId") @Parameter(description = "l @Path("external-id/{loanExternalId}/charges/{loanChargeId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Pay / Waive / Adjustment for Loan Charge", operationId = "executeLoanChargeByLoanExternalIdOnExistingCharge", description = "Loan Charge will be paid if the loan is linked with a savings account | Waive Loan Charge | Add Charge Adjustment") + @Operation(summary = "Pay / Waive / Adjustment for Loan Charge", operationId = "executeLoanChargeByLoanExternalIdOnExistingCharge", tags = {"Loan Charges"}, description = "Loan Charge will be paid if the loan is linked with a savings account | Waive Loan Charge | Add Charge Adjustment") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = LoanChargesApiResourceSwagger.PostLoansLoanIdChargesChargeIdRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoanChargesApiResourceSwagger.PostLoansLoanIdChargesChargeIdResponse.class))) public String executeLoanCharge(@PathParam("loanExternalId") @Parameter(description = "loanExternalId") final String loanExternalId, @@ -268,7 +271,7 @@ public String executeLoanCharge(@PathParam("loanExternalId") @Parameter(descript @Path("external-id/{loanExternalId}/charges/external-id/{loanChargeExternalId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Pay / Waive / Adjustment for Loan Charge", operationId = "executeLoanChargeByLoanAndChargeExternalId", description = "Loan Charge will be paid if the loan is linked with a savings account | Waive Loan Charge | Add Charge Adjustment") + @Operation(summary = "Pay / Waive / Adjustment for Loan Charge", operationId = "executeLoanChargeByLoanAndChargeExternalId", tags = {"Loan Charges"}, description = "Loan Charge will be paid if the loan is linked with a savings account | Waive Loan Charge | Add Charge Adjustment") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = LoanChargesApiResourceSwagger.PostLoansLoanIdChargesChargeIdRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoanChargesApiResourceSwagger.PostLoansLoanIdChargesChargeIdResponse.class))) public String executeLoanCharge(@PathParam("loanExternalId") @Parameter(description = "loanExternalId") final String loanExternalId, @@ -283,7 +286,7 @@ public String executeLoanCharge(@PathParam("loanExternalId") @Parameter(descript @Path("{loanId}/charges/{loanChargeId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update a Loan Charge", description = "Currently Loan Charges may be updated only if the Loan is not yet approved") + @Operation(summary = "Update a Loan Charge", tags = {"Loan Charges"}, description = "Currently Loan Charges may be updated only if the Loan is not yet approved") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = LoanChargesApiResourceSwagger.PutLoansLoanIdChargesChargeIdRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoanChargesApiResourceSwagger.PutLoansLoanIdChargesChargeIdResponse.class))) public String updateLoanCharge(@PathParam("loanId") @Parameter(description = "loanId") final Long loanId, @@ -297,7 +300,7 @@ public String updateLoanCharge(@PathParam("loanId") @Parameter(description = "lo @Path("{loanId}/charges/external-id/{loanChargeExternalId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update a Loan Charge", operationId = "updateLoanChargeByChargeExternalId", description = "Currently Loan Charges may be updated only if the Loan is not yet approved") + @Operation(summary = "Update a Loan Charge", operationId = "updateLoanChargeByChargeExternalId", tags = {"Loan Charges"}, description = "Currently Loan Charges may be updated only if the Loan is not yet approved") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = LoanChargesApiResourceSwagger.PutLoansLoanIdChargesChargeIdRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoanChargesApiResourceSwagger.PutLoansLoanIdChargesChargeIdResponse.class))) public String updateLoanCharge(@PathParam("loanId") @Parameter(description = "loanId") final Long loanId, @@ -311,7 +314,7 @@ public String updateLoanCharge(@PathParam("loanId") @Parameter(description = "lo @Path("external-id/{loanExternalId}/charges/{loanChargeId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update a Loan Charge", operationId = "updateLoanChargeByLoanExternalId", description = "Currently Loan Charges may be updated only if the Loan is not yet approved") + @Operation(summary = "Update a Loan Charge", operationId = "updateLoanChargeByLoanExternalId", tags = {"Loan Charges"}, description = "Currently Loan Charges may be updated only if the Loan is not yet approved") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = LoanChargesApiResourceSwagger.PutLoansLoanIdChargesChargeIdRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoanChargesApiResourceSwagger.PutLoansLoanIdChargesChargeIdResponse.class))) public String updateLoanCharge(@PathParam("loanExternalId") @Parameter(description = "loanExternalId") final String loanExternalId, @@ -325,7 +328,7 @@ public String updateLoanCharge(@PathParam("loanExternalId") @Parameter(descripti @Path("external-id/{loanExternalId}/charges/external-id/{loanChargeExternalId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update a Loan Charge", operationId = "updateLoanChargeByLoanAndChargeExternalId", description = "Currently Loan Charges may be updated only if the Loan is not yet approved") + @Operation(summary = "Update a Loan Charge", operationId = "updateLoanChargeByLoanAndChargeExternalId", tags = {"Loan Charges"}, description = "Currently Loan Charges may be updated only if the Loan is not yet approved") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = LoanChargesApiResourceSwagger.PutLoansLoanIdChargesChargeIdRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoanChargesApiResourceSwagger.PutLoansLoanIdChargesChargeIdResponse.class))) public String updateLoanCharge(@PathParam("loanExternalId") @Parameter(description = "loanExternalId") final String loanExternalId, @@ -338,7 +341,7 @@ public String updateLoanCharge(@PathParam("loanExternalId") @Parameter(descripti @DELETE @Path("{loanId}/charges/{loanChargeId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Delete a Loan Charge", description = "Note: Currently, A Loan Charge may only be removed from Loans that are not yet approved.") + @Operation(summary = "Delete a Loan Charge", tags = {"Loan Charges"}, description = "Note: Currently, A Loan Charge may only be removed from Loans that are not yet approved.") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoanChargesApiResourceSwagger.DeleteLoansLoanIdChargesChargeIdResponse.class))) public String deleteLoanCharge(@PathParam("loanId") @Parameter(description = "loanId") final Long loanId, @PathParam("loanChargeId") @Parameter(description = "loanChargeId") final Long loanChargeId) { @@ -349,7 +352,7 @@ public String deleteLoanCharge(@PathParam("loanId") @Parameter(description = "lo @DELETE @Path("{loanId}/charges/external-id/{loanChargeExternalId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Delete a Loan Charge", operationId = "deleteLoanChargeByChargeExternalId", description = "Note: Currently, A Loan Charge may only be removed from Loans that are not yet approved.") + @Operation(summary = "Delete a Loan Charge", operationId = "deleteLoanChargeByChargeExternalId", tags = {"Loan Charges"}, description = "Note: Currently, A Loan Charge may only be removed from Loans that are not yet approved.") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoanChargesApiResourceSwagger.DeleteLoansLoanIdChargesChargeIdResponse.class))) public String deleteLoanCharge(@PathParam("loanId") @Parameter(description = "loanId") final Long loanId, @PathParam("loanChargeExternalId") @Parameter(description = "loanChargeExternalId") final String loanChargeExternalId) { @@ -360,7 +363,7 @@ public String deleteLoanCharge(@PathParam("loanId") @Parameter(description = "lo @DELETE @Path("external-id/{loanExternalId}/charges/{loanChargeId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Delete a Loan Charge", operationId = "deleteLoanChargeByLoanExternalId", description = "Note: Currently, A Loan Charge may only be removed from Loans that are not yet approved.") + @Operation(summary = "Delete a Loan Charge", operationId = "deleteLoanChargeByLoanExternalId", tags = {"Loan Charges"}, description = "Note: Currently, A Loan Charge may only be removed from Loans that are not yet approved.") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoanChargesApiResourceSwagger.DeleteLoansLoanIdChargesChargeIdResponse.class))) public String deleteLoanCharge(@PathParam("loanExternalId") @Parameter(description = "loanExternalId") final String loanExternalId, @PathParam("loanChargeId") @Parameter(description = "loanChargeId") final Long loanChargeId) { @@ -371,7 +374,7 @@ public String deleteLoanCharge(@PathParam("loanExternalId") @Parameter(descripti @DELETE @Path("external-id/{loanExternalId}/charges/external-id/{loanChargeExternalId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Delete a Loan Charge", operationId = "deleteLoanChargeByLoanAndChargeExternalId", description = "Note: Currently, A Loan Charge may only be removed from Loans that are not yet approved.") + @Operation(summary = "Delete a Loan Charge", operationId = "deleteLoanChargeByLoanAndChargeExternalId", tags = {"Loan Charges"}, description = "Note: Currently, A Loan Charge may only be removed from Loans that are not yet approved.") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoanChargesApiResourceSwagger.DeleteLoansLoanIdChargesChargeIdResponse.class))) public String deleteLoanCharge(@PathParam("loanExternalId") @Parameter(description = "loanExternalId") final String loanExternalId, @PathParam("loanChargeExternalId") @Parameter(description = "loanChargeExternalId") final String loanChargeExternalId) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanDisbursementDetailApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanDisbursementDetailApiResource.java index abfcdc68871..be1e70ef60f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanDisbursementDetailApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanDisbursementDetailApiResource.java @@ -26,7 +26,10 @@ import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Context; @@ -69,6 +72,7 @@ public class LoanDisbursementDetailApiResource { @Path("{disbursementId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Update Loan Disbursement Details", tags = {"Loan Disbursement Details"}, description = "Updates the loan disbursement details") public CommandProcessingResult updateDisbursementDate(@PathParam("loanId") final Long loanId, @PathParam("disbursementId") final Long disbursementId, final String apiRequestBodyAsJson) { @@ -83,6 +87,7 @@ public CommandProcessingResult updateDisbursementDate(@PathParam("loanId") final @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @RequestBody(required = true, content = @Content(schema = @Schema(implementation = LoanDisbursementDetailApiResourceSwagger.PostAddAndDeleteDisbursementDetailRequest.class))) + @Operation(summary = "Add and Delete Disbursement Details", tags = {"Loan Disbursement Details"}, description = "Adds or deletes disbursement details for a loan") public CommandProcessingResult addAndDeleteDisbursementDetail(@PathParam("loanId") final Long loanId, @Parameter(hidden = true) final String apiRequestBodyAsJson) { @@ -95,6 +100,7 @@ public CommandProcessingResult addAndDeleteDisbursementDetail(@PathParam("loanId @GET @Path("{disbursementId}") @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Retrieve Disbursement Details", tags = {"Loan Disbursement Details"}, description = "Returns a specific disbursement detail for a loan") public String retriveDetail(@PathParam("loanId") final Long loanId, @PathParam("disbursementId") final Long disbursementId, @Context final UriInfo uriInfo) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanTransactionsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanTransactionsApiResource.java index 7b00b7514a0..a6ff42e6938 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanTransactionsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanTransactionsApiResource.java @@ -33,7 +33,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -118,7 +121,7 @@ public class LoanTransactionsApiResource { @GET @Path("{loanId}/transactions/template") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Loan Transaction 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" + @Operation(summary = "Retrieve Loan Transaction Template", tags = {"Loan Transactions"}, 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 Requests:\n" + "\n" + "loans/1/transactions/template?command=repayment" + "loans/1/transactions/template?command=merchantIssuedRefund" + "loans/1/transactions/template?command=payoutRefund" + "loans/1/transactions/template?command=goodwillCredit" + "\n" @@ -148,7 +151,7 @@ public String retrieveTransactionTemplate(@PathParam("loanId") @Parameter(descri @GET @Path("external-id/{loanExternalId}/transactions/template") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Loan Transaction Template", operationId = "retrieveTransactionTemplateByLoanExternalId", 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" + @Operation(summary = "Retrieve Loan Transaction Template", tags = {"Loan Transactions"}, operationId = "retrieveTransactionTemplateByLoanExternalId", 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 Requests:\n" + "\n" + "loans/1/transactions/template?command=repayment" + "loans/1/transactions/template?command=merchantIssuedRefund" + "loans/1/transactions/template?command=payoutRefund" + "loans/1/transactions/template?command=goodwillCredit" + "\n" @@ -180,7 +183,7 @@ public String retrieveTransactionTemplate( @GET @Path("{loanId}/transactions/{transactionId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Transaction Details", description = "Retrieves a Transaction Details\n\n" + "Example Request:\n" + "\n" + @Operation(summary = "Retrieve a Transaction Details", tags = {"Loan Transactions"}, description = "Retrieves a Transaction Details\n\n" + "Example Request:\n" + "\n" + "loans/5/transactions/3") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoanTransactionsApiResourceSwagger.GetLoansLoanIdTransactionsTransactionIdResponse.class))) }) @@ -195,7 +198,7 @@ public String retrieveTransaction(@PathParam("loanId") @Parameter(description = @GET @Path("{loanId}/transactions/external-id/{externalTransactionId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Transaction Details", description = "Retrieves a Transaction Details\n\n" + "Example Request:\n" + "\n" + @Operation(summary = "Retrieve a Transaction Details", tags = {"Loan Transactions"}, description = "Retrieves a Transaction Details\n\n" + "Example Request:\n" + "\n" + "loans/5/transactions/external-id/5dd80a7c-ccba-4446-b378-01eb6f53e871") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoanTransactionsApiResourceSwagger.GetLoansLoanIdTransactionsTransactionIdResponse.class))) }) @@ -211,7 +214,7 @@ public String retrieveTransactionByTransactionExternalId( @GET @Path("external-id/{loanExternalId}/transactions/{transactionId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Transaction Details", description = "Retrieves a Transaction Details\n\n" + "Example Request:\n" + "\n" + @Operation(summary = "Retrieve a Transaction Details", tags = {"Loan Transactions"}, description = "Retrieves a Transaction Details\n\n" + "Example Request:\n" + "\n" + "loans/5/transactions/3") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoanTransactionsApiResourceSwagger.GetLoansLoanIdTransactionsTransactionIdResponse.class))) }) @@ -227,7 +230,7 @@ public String retrieveTransactionByLoanExternalIdAndTransactionId( @GET @Path("external-id/{loanExternalId}/transactions/external-id/{externalTransactionId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Transaction Details", description = "Retrieves a Transaction Details\n\n" + "Example Request:\n" + "\n" + @Operation(summary = "Retrieve a Transaction Details", tags = {"Loan Transactions"}, description = "Retrieves a Transaction Details\n\n" + "Example Request:\n" + "\n" + "loans/external-id/7dd80a7c-ycba-a446-t378-91eb6f53e854/transactions/external-id/5dd80a7c-ccba-4446-b378-01eb6f53e871") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoanTransactionsApiResourceSwagger.GetLoansLoanIdTransactionsTransactionIdResponse.class))) }) @@ -243,7 +246,7 @@ public String retrieveTransactionByLoanExternalIdAndTransactionExternalId( @GET @Path("{loanId}/transactions") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Transactions", description = "Retrieves transactions of a loan") + @Operation(summary = "Retrieve Transactions", tags = {"Loan Transactions"}, description = "Retrieves transactions of a loan") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoanTransactionsApiResourceSwagger.GetLoansLoanIdTransactionsResponse.class))) }) public Page retrieveTransactionsByLoanId( @@ -259,7 +262,7 @@ public Page retrieveTransactionsByLoanId( @GET @Path("external-id/{loanExternalId}/transactions") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Transactions", description = "Retrieves transactions of a loan") + @Operation(summary = "Retrieve Transactions", tags = {"Loan Transactions"}, description = "Retrieves transactions of a loan") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoanTransactionsApiResourceSwagger.GetLoansLoanIdTransactionsResponse.class))) }) public Page retrieveTransactionsByExternalLoanId( @@ -276,7 +279,7 @@ public Page retrieveTransactionsByExternalLoanId( @Path("{loanId}/transactions") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Significant Loan Transactions", description = "This API covers the major loan transaction functionality\n\n" + @Operation(summary = "Significant Loan Transactions", tags = {"Loan Transactions"}, description = "This API covers the major loan transaction functionality\n\n" + "Example Requests:\n\n" + "loans/1/transactions?command=repayment" + " | Make a Repayment | \n" + "loans/1/transactions?command=merchantIssuedRefund" + " | Merchant Issued Refund | \n" + "loans/1/transactions?command=payoutRefund" + " | Payout Refund | \n" + "loans/1/transactions?command=goodwillCredit" @@ -304,7 +307,7 @@ public String executeLoanTransaction(@PathParam("loanId") @Parameter(description @Path("external-id/{loanExternalId}/transactions") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Significant Loan Transactions", operationId = "executeLoanTransactionByLoanExternalId", description = "This API covers the major loan transaction functionality\n\n" + @Operation(summary = "Significant Loan Transactions", operationId = "executeLoanTransactionByLoanExternalId", tags = {"Loan Transactions"}, description = "This API covers the major loan transaction functionality\n\n" + "Example Requests:\n\n" + "loans/external-id/7dd80a7c-ycba-a446-t378-91eb6f53e854/transactions?command=repayment" + " | Make a Repayment | \n" + "loans/external-id/7dd80a7c-ycba-a446-t378-91eb6f53e854/transactions?command=merchantIssuedRefund" @@ -340,7 +343,7 @@ public String executeLoanTransaction( @Path("{loanId}/transactions/{transactionId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Adjust a Transaction", description = "Note: there is no need to specify command={transactionType} parameter.\n\n" + @Operation(summary = "Adjust a Transaction", tags = {"Loan Transactions"}, description = "Note: there is no need to specify command={transactionType} parameter.\n\n" + "Mandatory Fields: transactionDate, transactionAmount") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = LoanTransactionsApiResourceSwagger.PostLoansLoanIdTransactionsTransactionIdRequest.class))) @ApiResponses({ @@ -357,7 +360,7 @@ public String adjustLoanTransaction(@PathParam("loanId") @Parameter(description @Path("external-id/{loanExternalId}/transactions/{transactionId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Adjust a Transaction", operationId = "adjustLoanTransactionByLoanExternalId", description = "Note: there is no need to specify command={transactionType} parameter.\n\n" + @Operation(summary = "Adjust a Transaction", operationId = "adjustLoanTransactionByLoanExternalId", tags = {"Loan Transactions"}, description = "Note: there is no need to specify command={transactionType} parameter.\n\n" + "Mandatory Fields: transactionDate, transactionAmount") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = LoanTransactionsApiResourceSwagger.PostLoansLoanIdTransactionsTransactionIdRequest.class))) @ApiResponses({ @@ -375,7 +378,7 @@ public String adjustLoanTransaction( @Path("{loanId}/transactions/external-id/{externalTransactionId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Adjust a Transaction", operationId = "adjustLoanTransactionByTransactionExternalId", description = "Note: there is no need to specify command={transactionType} parameter.\n\n" + @Operation(summary = "Adjust a Transaction", operationId = "adjustLoanTransactionByTransactionExternalId", tags = {"Loan Transactions"}, description = "Note: there is no need to specify command={transactionType} parameter.\n\n" + "Mandatory Fields: transactionDate, transactionAmount") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = LoanTransactionsApiResourceSwagger.PostLoansLoanIdTransactionsTransactionIdRequest.class))) @ApiResponses({ @@ -392,7 +395,7 @@ public String adjustLoanTransaction(@PathParam("loanId") @Parameter(description @Path("external-id/{loanExternalId}/transactions/external-id/{externalTransactionId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Adjust a Transaction", operationId = "adjustLoanTransactionByLoanAndTransactionExternalId", description = "Note: there is no need to specify command={transactionType} parameter.\n\n" + @Operation(summary = "Adjust a Transaction", operationId = "adjustLoanTransactionByLoanAndTransactionExternalId", tags = {"Loan Transactions"}, description = "Note: there is no need to specify command={transactionType} parameter.\n\n" + "Mandatory Fields: transactionDate, transactionAmount") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = LoanTransactionsApiResourceSwagger.PostLoansLoanIdTransactionsTransactionIdRequest.class))) @ApiResponses({ @@ -410,7 +413,7 @@ public String adjustLoanTransaction( @Path("{loanId}/transactions/{transactionId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Undo a Waive Charge Transaction", description = "Undo a Waive Charge Transaction") + @Operation(summary = "Undo a Waive Charge Transaction", tags = {"Loan Transactions"}, description = "Undo a Waive Charge Transaction") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = LoanTransactionsApiResourceSwagger.PutChargeTransactionChangesRequest.class))) @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoanTransactionsApiResourceSwagger.PutChargeTransactionChangesResponse.class))) }) @@ -424,7 +427,7 @@ public String undoWaiveCharge(@PathParam("loanId") @Parameter(description = "loa @Path("external-id/{loanExternalId}/transactions/{transactionId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Undo a Waive Charge Transaction", operationId = "undoWaiveChargeByLoanExternalId", description = "Undo a Waive Charge Transaction") + @Operation(summary = "Undo a Waive Charge Transaction", operationId = "undoWaiveChargeByLoanExternalId", tags = {"Loan Transactions"}, description = "Undo a Waive Charge Transaction") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = LoanTransactionsApiResourceSwagger.PutChargeTransactionChangesRequest.class))) @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoanTransactionsApiResourceSwagger.PutChargeTransactionChangesResponse.class))) }) @@ -439,7 +442,7 @@ public String undoWaiveCharge( @Path("{loanId}/transactions/external-id/{transactionExternalId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Undo a Waive Charge Transaction", operationId = "undoWaiveChargeByTransactionExternalId", description = "Undo a Waive Charge Transaction") + @Operation(summary = "Undo a Waive Charge Transaction", operationId = "undoWaiveChargeByTransactionExternalId", tags = {"Loan Transactions"}, description = "Undo a Waive Charge Transaction") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = LoanTransactionsApiResourceSwagger.PutChargeTransactionChangesRequest.class))) @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoanTransactionsApiResourceSwagger.PutChargeTransactionChangesResponse.class))) }) @@ -453,7 +456,7 @@ public String undoWaiveCharge(@PathParam("loanId") @Parameter(description = "loa @Path("external-id/{loanExternalId}/transactions/external-id/{transactionExternalId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Undo a Waive Charge Transaction", operationId = "undoWaiveChargeByLoanAndTransactionExternalId", description = "Undo a Waive Charge Transaction") + @Operation(summary = "Undo a Waive Charge Transaction", operationId = "undoWaiveChargeByLoanAndTransactionExternalId", tags = {"Loan Transactions"}, description = "Undo a Waive Charge Transaction") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = LoanTransactionsApiResourceSwagger.PutChargeTransactionChangesRequest.class))) @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoanTransactionsApiResourceSwagger.PutChargeTransactionChangesResponse.class))) }) @@ -783,7 +786,7 @@ private Long getResolvedLoanIdWithExistsCheck(final Long loanId, final ExternalI @GET @Path("{loanId}/transactions/reage-preview") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Preview Re-Age Schedule", description = "Generates a preview of the re-aged loan schedule based on the provided parameters without creating any transactions or modifying the loan.") + @Operation(summary = "Preview Re-Age Schedule", tags = {"Loan Transactions"}, description = "Generates a preview of the re-aged loan schedule based on the provided parameters without creating any transactions or modifying the loan.") public LoanScheduleData previewReAgeSchedule(@PathParam("loanId") @Parameter(description = "loanId", required = true) final Long loanId, @Valid @BeanParam final ReAgePreviewRequest reAgePreviewRequest) { this.context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSIONS); @@ -793,7 +796,7 @@ public LoanScheduleData previewReAgeSchedule(@PathParam("loanId") @Parameter(des @GET @Path("external-id/{loanExternalId}/transactions/reage-preview") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Preview Re-Age Schedule", operationId = "previewReAgeScheduleByLoanExternalId", description = "Generates a preview of the re-aged loan schedule based on the provided parameters without creating any transactions or modifying the loan.") + @Operation(summary = "Preview Re-Age Schedule", operationId = "previewReAgeScheduleByLoanExternalId", tags = {"Loan Transactions"}, description = "Generates a preview of the re-aged loan schedule based on the provided parameters without creating any transactions or modifying the loan.") public LoanScheduleData previewReAgeSchedule( @PathParam("loanExternalId") @Parameter(description = "loanExternalId", required = true) final String loanExternalId, @Valid @BeanParam final ReAgePreviewRequest reAgePreviewRequest) { @@ -804,7 +807,7 @@ public LoanScheduleData previewReAgeSchedule( @GET @Path("{loanId}/transactions/reamortization-preview") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Preview Re-Amortized Schedule", description = "Generates a preview of the re-amortized loan schedule based on the provided parameters without creating any transactions or modifying the loan.") + @Operation(summary = "Preview Re-Amortized Schedule", tags = {"Loan Transactions"}, description = "Generates a preview of the re-amortized loan schedule based on the provided parameters without creating any transactions or modifying the loan.") public LoanScheduleData previewReAmortizationSchedule( @PathParam("loanId") @Parameter(description = "loanId", required = true) final Long loanId, @Valid @BeanParam final ReAmortizationPreviewRequest reAmortizationPreviewRequest) { @@ -815,7 +818,7 @@ public LoanScheduleData previewReAmortizationSchedule( @GET @Path("external-id/{loanExternalId}/transactions/reamortization-preview") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Preview Re-amortized Schedule", operationId = "previewReAmortizationScheduleByLoanExternalId", description = "Generates a preview of the re-amortized loan schedule based on the provided parameters without creating any transactions or modifying the loan.") + @Operation(summary = "Preview Re-amortized Schedule", operationId = "previewReAmortizationScheduleByLoanExternalId", tags = {"Loan Transactions"}, description = "Generates a preview of the re-amortized loan schedule based on the provided parameters without creating any transactions or modifying the loan.") public LoanScheduleData previewReAmortizationSchedule( @PathParam("loanExternalId") @Parameter(description = "loanExternalId", required = true) final String loanExternalId, @Valid @BeanParam final ReAmortizationPreviewRequest reAmortizationPreviewRequest) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResource.java index 1d80ff9617a..75964d55169 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResource.java @@ -39,7 +39,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -324,6 +327,7 @@ public class LoansApiResource { @GET @Path("{loanId}/template") @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Retrieve Approval Template", tags = {"Loans"}, description = "Returns a template for loan approval") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoansApiResourceSwagger.GetLoansApprovalTemplateResponse.class))) }) public String retrieveApprovalTemplate(@PathParam("loanId") @Parameter(description = "loanId", required = true) final Long loanId, @@ -335,7 +339,7 @@ public String retrieveApprovalTemplate(@PathParam("loanId") @Parameter(descripti @GET @Path("template") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Loan 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" + @Operation(summary = "Retrieve Loan Details Template", tags = {"Loans"}, 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 Requests:\n" + "\n" + "loans/template?templateType=individual&clientId=1\n" + "\n" + "\n" + "loans/template?templateType=individual&clientId=1&productId=1") @@ -461,7 +465,7 @@ private Collection getAccountLinkingOptions(final LoanAcco @GET @Path("{loanId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Loan", description = "Note: template=true parameter doesn't apply to this resource." + @Operation(summary = "Retrieve a Loan", tags = {"Loans"}, description = "Note: template=true parameter doesn't apply to this resource." + "Example Requests:\n" + "\n" + "loans/1\n" + "\n" + "\n" + "loans/1?fields=id,principal,annualInterestRate\n" + "\n" + "\n" + "loans/1?associations=all\n" + "\n" + "loans/1?associations=all&exclude=guarantors\n" + "\n" + "\n" + "loans/1?fields=id,principal,annualInterestRate&associations=repaymentSchedule,transactions") @@ -479,7 +483,7 @@ public String retrieveLoan(@PathParam("loanId") @Parameter(description = "loanId @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Loans", operationId = "retrieveAllLoans", description = "The list capability of loans can support pagination and sorting.\n" + @Operation(summary = "List Loans", operationId = "retrieveAllLoans", tags = {"Loans"}, description = "The list capability of loans can support pagination and sorting.\n" + "Example Requests:\n" + "\n" + "loans\n" + "\n" + "loans?fields=accountNo\n" + "\n" + "loans?offset=10&limit=50\n" + "\n" + "loans?orderBy=accountNo&sortOrder=DESC") @ApiResponses({ @@ -550,7 +554,7 @@ public String retrieveAll(@Context final UriInfo uriInfo, @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Calculate loan repayment schedule | Submit a new Loan Application", description = "It calculates the loan repayment Schedule\n" + @Operation(summary = "Calculate loan repayment schedule | Submit a new Loan Application", tags = {"Loans"}, description = "It calculates the loan repayment Schedule\n" + "Submits a new loan application\n" + "Mandatory Fields: clientId, productId, principal, loanTermFrequency, loanTermFrequencyType, loanType, numberOfRepayments, repaymentEvery, repaymentFrequencyType, interestRatePerPeriod, amortizationType, interestType, interestCalculationPeriodType, transactionProcessingStrategyCode, expectedDisbursementDate, submittedOnDate, loanType\n" + "Optional Fields: graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, linkAccountId, allowPartialPeriodInterestCalculation, fixedEmiAmount, maxOutstandingLoanBalance, disbursementData, graceOnArrearsAgeing, createStandingInstructionAtDisbursement (requires linkedAccountId if set to true)\n" @@ -585,7 +589,7 @@ public String calculateLoanScheduleOrSubmitLoanApplication( @Path("{loanId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Modify a loan application", description = "Loan application can only be modified when in 'Submitted and pending approval' state. Once the application is approved, the details cannot be changed using this method.") + @Operation(summary = "Modify a loan application", tags = {"Loans"}, description = "Loan application can only be modified when in 'Submitted and pending approval' state. Once the application is approved, the details cannot be changed using this method.") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = LoansApiResourceSwagger.PutLoansLoanIdRequest.class))) @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoansApiResourceSwagger.PutLoansLoanIdResponse.class))) }) @@ -598,7 +602,7 @@ public String modifyLoanApplication(@PathParam("loanId") @Parameter(description @DELETE @Path("{loanId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Delete a Loan Application", description = "Note: Only loans in \"Submitted and awaiting approval\" status can be deleted.") + @Operation(summary = "Delete a Loan Application", tags = {"Loans"}, description = "Note: Only loans in \"Submitted and awaiting approval\" status can be deleted.") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoansApiResourceSwagger.DeleteLoansLoanIdResponse.class))) }) public String deleteLoanApplication(@PathParam("loanId") @Parameter(description = "loanId", required = true) final Long loanId) { @@ -609,7 +613,7 @@ public String deleteLoanApplication(@PathParam("loanId") @Parameter(description @Path("{loanId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Approve Loan Application | Recover Loan Guarantee | Undo Loan Application Approval | Assign a Loan Officer | Unassign a Loan Officer | Reject Loan Application | Applicant Withdraws from Loan Application | Disburse Loan Disburse Loan To Savings Account | Undo Loan Disbursal", description = "Approve Loan Application:\n" + @Operation(tags = {"Loans"}, summary = "Approve Loan Application | Recover Loan Guarantee | Undo Loan Application Approval | Assign a Loan Officer | Unassign a Loan Officer | Reject Loan Application | Applicant Withdraws from Loan Application | Disburse Loan Disburse Loan To Savings Account | Undo Loan Disbursal", description = "Approve Loan Application:\n" + "Mandatory Fields: approvedOnDate\n" + "Optional Fields: approvedLoanAmount and expectedDisbursementDate\n" + "Approves the loan application\n\n" + "Recover Loan Guarantee:\n" + "Recovers the loan guarantee\n\n" + "Undo Loan Application Approval:\n" + "Undoes the Loan Application Approval\n\n" + "Assign a Loan Officer:\n" @@ -633,6 +637,7 @@ public String stateTransitions(@PathParam("loanId") @Parameter(description = "lo @GET @Path("downloadtemplate") @Produces("application/vnd.ms-excel") + @Operation(summary = "Download Loan Template", tags = {"Loans"}, description = "Returns a template for bulk loan import in Excel format") public Response getLoansTemplate(@QueryParam("officeId") final Long officeId, @QueryParam("staffId") final Long staffId, @QueryParam("dateFormat") final String dateFormat) { return bulkImportWorkbookPopulatorService.getTemplate(GlobalEntityType.LOANS.toString(), officeId, staffId, dateFormat); @@ -641,6 +646,7 @@ public Response getLoansTemplate(@QueryParam("officeId") final Long officeId, @Q @GET @Path("glimAccount/{glimId}") @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Retrieve GLIM Repayment Template", tags = {"Loans"}, description = "Returns a repayment template for a specific GLIM account") public String getGlimRepaymentTemplate(@PathParam("glimId") final Long glimId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSIONS); Collection glimRepaymentTemplate = this.glimAccountInfoReadPlatformService.findglimRepaymentTemplate(glimId); @@ -652,7 +658,7 @@ public String getGlimRepaymentTemplate(@PathParam("glimId") final Long glimId, @ @Path("glimAccount/{glimId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Approve GLIM Application | Undo GLIM Application Approval | Reject GLIM Application | Disburse Loan Disburse Loan To Savings Account | Undo Loan Disbursal", description = "Approve GLIM Application:\n" + @Operation(tags = {"Loans"}, summary = "Approve GLIM Application | Undo GLIM Application Approval | Reject GLIM Application | Disburse Loan Disburse Loan To Savings Account | Undo Loan Disbursal", description = "Approve GLIM Application:\n" + "Mandatory Fields: approvedOnDate\n" + "Optional Fields: approvedLoanAmount and expectedDisbursementDate\n" + "Approves the GLIM application\n\n" + "Undo GLIM Application Approval:\n" + "Undoes the GLIM Application Approval\n\n" + "Reject GLIM Application:\n" + "Mandatory Fields: rejectedOnDate\n" + "Allows you to reject the GLIM application\n\n" @@ -694,6 +700,7 @@ public String glimStateTransitions(@PathParam("glimId") final Long glimId, @Quer @GET @Path("repayments/downloadtemplate") @Produces("application/vnd.ms-excel") + @Operation(summary = "Download Loan Repayment Template", tags = {"Loans"}, description = "Returns a repayment template for loans in Excel format") public Response getLoanRepaymentTemplate(@QueryParam("officeId") final Long officeId, @QueryParam("dateFormat") final String dateFormat) { return bulkImportWorkbookPopulatorService.getTemplate(GlobalEntityType.LOAN_TRANSACTIONS.toString(), officeId, null, dateFormat); @@ -702,6 +709,7 @@ public Response getLoanRepaymentTemplate(@QueryParam("officeId") final Long offi @POST @Path("uploadtemplate") @Consumes(MediaType.MULTIPART_FORM_DATA) + @Operation(summary = "Upload Loan Template", tags = {"Loans"}, description = "Uploads a loan template for processing") @RequestBody(description = "Upload Loan template", content = { @Content(mediaType = MediaType.MULTIPART_FORM_DATA, schema = @Schema(implementation = UploadRequest.class)) }) public String postLoanTemplate(@FormDataParam("file") InputStream uploadedInputStream, @@ -715,6 +723,7 @@ public String postLoanTemplate(@FormDataParam("file") InputStream uploadedInputS @POST @Path("repayments/uploadtemplate") @Consumes(MediaType.MULTIPART_FORM_DATA) + @Operation(summary = "Upload Loan Repayment Template", tags = {"Loans"}, description = "Uploads a loan repayment template for processing") @RequestBody(description = "Upload Loan repayments template", content = { @Content(mediaType = MediaType.MULTIPART_FORM_DATA, schema = @Schema(implementation = UploadRequest.class)) }) public String postLoanRepaymentTemplate(@FormDataParam("file") InputStream uploadedInputStream, @@ -728,7 +737,7 @@ public String postLoanRepaymentTemplate(@FormDataParam("file") InputStream uploa @GET @Path("{loanId}/delinquencytags") @Produces(MediaType.APPLICATION_JSON) - @Operation(summary = "Retrieve the Loan Delinquency Tag history using the Loan Id", description = "") + @Operation(summary = "Retrieve the Loan Delinquency Tag history using the Loan Id", tags = {"Loans"}, description = "") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = DelinquencyApiResourceSwagger.GetDelinquencyTagHistoryResponse.class)))) }) public String getDelinquencyTagHistory(@PathParam("loanId") @Parameter(description = "loanId", required = true) final Long loanId, @@ -740,7 +749,7 @@ public String getDelinquencyTagHistory(@PathParam("loanId") @Parameter(descripti @GET @Path("external-id/{loanExternalId}/template") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Loan Approval Template", operationId = "retrieveApprovalTemplateByExternalId") + @Operation(summary = "Retrieve Loan Approval Template", tags = {"Loans"}, operationId = "retrieveApprovalTemplateByExternalId") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoansApiResourceSwagger.GetLoansApprovalTemplateResponse.class))) }) public String retrieveApprovalTemplate( @@ -753,7 +762,7 @@ public String retrieveApprovalTemplate( @GET @Path("external-id/{loanExternalId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Loan", operationId = "retrieveLoanByExternalId", description = "Note: template=true parameter doesn't apply to this resource." + @Operation(summary = "Retrieve a Loan", operationId = "retrieveLoanByExternalId", tags = {"Loans"}, description = "Note: template=true parameter doesn't apply to this resource." + "Example Requests:\n" + "\n" + "loans/external-id/7dd80a7c-ycba-a446-t378-91eb6f53e854\n" + "\n" + "\n" + "loans/external-id/7dd80a7c-ycba-a446-t378-91eb6f53e854?fields=id,principal,annualInterestRate\n" + "\n" + "\n" + "loans/external-id/7dd80a7c-ycba-a446-t378-91eb6f53e854?associations=all\n" + "\n" @@ -776,7 +785,7 @@ public String retrieveLoan( @Path("external-id/{loanExternalId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Modify a loan application", operationId = "modifyLoanApplicationByExternalId", description = "Loan application can only be modified when in 'Submitted and pending approval' state. Once the application is approved, the details cannot be changed using this method.") + @Operation(summary = "Modify a loan application", operationId = "modifyLoanApplicationByExternalId", tags = {"Loans"}, description = "Loan application can only be modified when in 'Submitted and pending approval' state. Once the application is approved, the details cannot be changed using this method.") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = LoansApiResourceSwagger.PutLoansLoanIdRequest.class))) @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoansApiResourceSwagger.PutLoansLoanIdResponse.class))) }) @@ -790,7 +799,7 @@ public String modifyLoanApplication( @DELETE @Path("external-id/{loanExternalId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Delete a Loan Application", operationId = "deleteLoanApplicationByExternalId", description = "Note: Only loans in \"Submitted and awaiting approval\" status can be deleted.") + @Operation(summary = "Delete a Loan Application", operationId = "deleteLoanApplicationByExternalId", tags = {"Loans"}, description = "Note: Only loans in \"Submitted and awaiting approval\" status can be deleted.") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoansApiResourceSwagger.DeleteLoansLoanIdResponse.class))) }) public String deleteLoanApplication( @@ -802,7 +811,7 @@ public String deleteLoanApplication( @Path("external-id/{loanExternalId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Approve Loan Application | Recover Loan Guarantee | Undo Loan Application Approval | Assign a Loan Officer | Unassign a Loan Officer | Reject Loan Application | Applicant Withdraws from Loan Application | Disburse Loan Disburse Loan To Savings Account | Undo Loan Disbursal", operationId = "stateTransitionsByExternalId", description = "Approve Loan Application:\n" + @Operation(tags = {"Loans"}, summary = "Approve Loan Application | Recover Loan Guarantee | Undo Loan Application Approval | Assign a Loan Officer | Unassign a Loan Officer | Reject Loan Application | Applicant Withdraws from Loan Application | Disburse Loan Disburse Loan To Savings Account | Undo Loan Disbursal", operationId = "stateTransitionsByExternalId", description = "Approve Loan Application:\n" + "Mandatory Fields: approvedOnDate\n" + "Optional Fields: approvedLoanAmount and expectedDisbursementDate\n" + "Approves the loan application\n\n" + "Recover Loan Guarantee:\n" + "Recovers the loan guarantee\n\n" + "Undo Loan Application Approval:\n" + "Undoes the Loan Application Approval\n\n" + "Assign a Loan Officer:\n" @@ -827,7 +836,7 @@ public String stateTransitions( @GET @Path("external-id/{loanExternalId}/delinquencytags") @Produces(MediaType.APPLICATION_JSON) - @Operation(summary = "Retrieve the Loan Delinquency Tag history using the Loan Id", operationId = "getDelinquencyTagHistoryByExternalId", description = "") + @Operation(summary = "Retrieve the Loan Delinquency Tag history using the Loan Id", tags = {"Loans"}, operationId = "getDelinquencyTagHistoryByExternalId", description = "") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = DelinquencyApiResourceSwagger.GetDelinquencyTagHistoryResponse.class)))) }) public String getDelinquencyTagHistory( @@ -839,7 +848,7 @@ public String getDelinquencyTagHistory( @GET @Path("{loanId}/delinquency-actions") @Produces(MediaType.APPLICATION_JSON) - @Operation(summary = "Retrieve delinquency actions related to the loan", description = "") + @Operation(summary = "Retrieve delinquency actions related to the loan", tags = {"Loans"}, description = "") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = DelinquencyApiResourceSwagger.GetDelinquencyActionsResponse.class)))) }) public String getLoanDelinquencyActions(@PathParam("loanId") @Parameter(description = "loanId", required = true) final Long loanId, @@ -850,7 +859,7 @@ public String getLoanDelinquencyActions(@PathParam("loanId") @Parameter(descript @GET @Path("external-id/{loanExternalId}/delinquency-actions") @Produces(MediaType.APPLICATION_JSON) - @Operation(summary = "Retrieve delinquency actions related to the loan", operationId = "getLoanDelinquencyActionsByExternalId", description = "") + @Operation(summary = "Retrieve delinquency actions related to the loan", tags = {"Loans"}, operationId = "getLoanDelinquencyActionsByExternalId", description = "") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = DelinquencyApiResourceSwagger.GetDelinquencyActionsResponse.class)))) }) public String getLoanDelinquencyActions( @@ -863,7 +872,7 @@ public String getLoanDelinquencyActions( @Path("{loanId}/delinquency-actions") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) - @Operation(summary = "Adds a new delinquency action for a loan", description = "") + @Operation(summary = "Adds a new delinquency action for a loan", tags = {"Loans"}, description = "") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = DelinquencyApiResourceSwagger.PostLoansDelinquencyActionRequest.class))) @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = DelinquencyApiResourceSwagger.PostLoansDelinquencyActionResponse.class))) }) @@ -876,7 +885,7 @@ public String createLoanDelinquencyAction(@PathParam("loanId") @Parameter(descri @Path("external-id/{loanExternalId}/delinquency-actions") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) - @Operation(summary = "Adds a new delinquency action for a loan", operationId = "createLoanDelinquencyActionByExternalId", description = "") + @Operation(summary = "Adds a new delinquency action for a loan", operationId = "createLoanDelinquencyActionByExternalId", tags = {"Loans"}, description = "") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = DelinquencyApiResourceSwagger.PostLoansDelinquencyActionRequest.class))) @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = DelinquencyApiResourceSwagger.PostLoansDelinquencyActionResponse.class))) }) @@ -890,7 +899,7 @@ public String createLoanDelinquencyAction( @Path("{loanId}/approved-amount") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) - @Operation(summary = "Modifies the approved amount of the loan", description = "") + @Operation(summary = "Modifies the approved amount of the loan", tags = {"Loans"}, description = "") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = LoansApiResourceSwagger.PutLoansApprovedAmountRequest.class))) @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoansApiResourceSwagger.PutLoansApprovedAmountResponse.class))) }) @@ -904,7 +913,7 @@ public CommandProcessingResult modifyLoanApprovedAmount( @Path("external-id/{loanExternalId}/approved-amount") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) - @Operation(summary = "Modifies the approved amount of the loan", description = "") + @Operation(summary = "Modifies the approved amount of the loan", tags = {"Loans"}, description = "") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = LoansApiResourceSwagger.PutLoansApprovedAmountRequest.class))) @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoansApiResourceSwagger.PutLoansApprovedAmountResponse.class))) }) @@ -917,7 +926,7 @@ public CommandProcessingResult modifyLoanApprovedAmount( @GET @Path("{loanId}/approved-amount") @Produces(MediaType.APPLICATION_JSON) - @Operation(summary = "Collects and returns the approved amount modification history for a given loan", description = "") + @Operation(summary = "Collects and returns the approved amount modification history for a given loan", tags = {"Loans"}, description = "") public List getLoanApprovedAmountHistory( @PathParam("loanId") @Parameter(description = "loanId", required = true) final Long loanId, @Context final UriInfo uriInfo) { return getLoanApprovedAmountHistory(loanId, ExternalId.empty()); @@ -926,7 +935,7 @@ public List getLoanApprovedAmountHistory( @GET @Path("external-id/{loanExternalId}/approved-amount") @Produces(MediaType.APPLICATION_JSON) - @Operation(summary = "Collects and returns the approved amount modification history for a given loan", description = "") + @Operation(summary = "Collects and returns the approved amount modification history for a given loan", tags = {"Loans"}, description = "") public List getLoanApprovedAmountHistory( @PathParam("loanExternalId") @Parameter(description = "loanExternalId", required = true) final String loanExternalId, @Context final UriInfo uriInfo) { @@ -937,7 +946,7 @@ public List getLoanApprovedAmountHistory( @Path("{loanId}/available-disbursement-amount") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) - @Operation(summary = "Modifies the available disbursement amount of the loan", description = "Modifies the available disbursement amount of the loan, this indirectly modifies the approved amount that can be disbursed on the loan") + @Operation(summary = "Modifies the available disbursement amount of the loan", tags = {"Loans"}, description = "Modifies the available disbursement amount of the loan, this indirectly modifies the approved amount that can be disbursed on the loan") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = LoansApiResourceSwagger.PutLoansAvailableDisbursementAmountRequest.class))) @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoansApiResourceSwagger.PutLoansAvailableDisbursementAmountResponse.class))) }) @@ -951,7 +960,7 @@ public CommandProcessingResult modifyLoanAvailableDisbursementAmount( @Path("external-id/{loanExternalId}/available-disbursement-amount") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) - @Operation(summary = "Modifies the available disbursement amount of the loan", operationId = "modifyLoanAvailableDisbursementAmountByExternalId", description = "Modifies the available disbursement amount of the loan, this indirectly modifies the approved amount that can be disbursed on the loan") + @Operation(summary = "Modifies the available disbursement amount of the loan", tags = {"Loans"}, operationId = "modifyLoanAvailableDisbursementAmountByExternalId", description = "Modifies the available disbursement amount of the loan, this indirectly modifies the approved amount that can be disbursed on the loan") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = LoansApiResourceSwagger.PutLoansAvailableDisbursementAmountRequest.class))) @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoansApiResourceSwagger.PutLoansAvailableDisbursementAmountResponse.class))) }) diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/pointintime/LoansPointInTimeApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/pointintime/LoansPointInTimeApiResource.java index d0799a55e48..224363f406c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/pointintime/LoansPointInTimeApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/pointintime/LoansPointInTimeApiResource.java @@ -23,7 +23,10 @@ import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; 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 95155bb011f..7c83e305c9e 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 @@ -27,7 +27,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/api/LoanProductsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/api/LoanProductsApiResource.java index 262ea5f43df..c6e28788833 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/api/LoanProductsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/api/LoanProductsApiResource.java @@ -31,7 +31,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -175,7 +178,7 @@ public class LoanProductsApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create a Loan Product", operationId = "createLoanProduct", description = "Depending of the Accounting Rule (accountingRule) selected, additional fields with details of the appropriate Ledger Account identifiers would need to be passed in.\n" + @Operation(summary = "Create a Loan Product", operationId = "createLoanProduct", tags = {"Loan Products"}, description = "Depending of the Accounting Rule (accountingRule) selected, additional fields with details of the appropriate Ledger Account identifiers would need to be passed in.\n" + "\n" + "Refer MifosX Accounting Specs Draft for more details regarding the significance of the selected accounting rule\n\n" + "Mandatory Fields: name, shortName, currencyCode, digitsAfterDecimal, inMultiplesOf, principal, numberOfRepayments, repaymentEvery, repaymentFrequencyType, interestRatePerPeriod, interestRateFrequencyType, amortizationType, interestType, interestCalculationPeriodType, transactionProcessingStrategyCode, accountingRule, isInterestRecalculationEnabled, daysInYearType, daysInMonthType\n\n" + "Optional Fields: inArrearsTolerance, graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, graceOnArrearsAgeing, charges, paymentChannelToFundSourceMappings, feeToIncomeAccountMappings, penaltyToIncomeAccountMappings, chargeOffReasonToExpenseAccountMappings, includeInBorrowerCycle, useBorrowerCycle,principalVariationsForBorrowerCycle, numberOfRepaymentVariationsForBorrowerCycle, interestRateVariationsForBorrowerCycle, multiDisburseLoan,maxTrancheCount, outstandingLoanBalance,overdueDaysForNPA,holdGuaranteeFunds, principalThresholdForLastInstalment, accountMovesOutOfNPAOnlyOnArrearsCompletion, canDefineInstallmentAmount, installmentAmountInMultiplesOf, allowAttributeOverrides, allowPartialPeriodInterestCalculation,dueDaysForRepaymentEvent,overDueDaysForRepaymentEvent,enableDownPayment,disbursedAmountPercentageDownPayment,enableAutoRepaymentForDownPayment,repaymentStartDateType,enableBuyDownFee\n\n" @@ -202,7 +205,7 @@ public String createLoanProduct(@Parameter(hidden = true) final String apiReques @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Loan Products", operationId = "retrieveAllLoanProducts", description = "Lists Loan Products\n\n" + @Operation(summary = "List Loan Products", operationId = "retrieveAllLoanProducts", tags = {"Loan Products"}, description = "Lists Loan Products\n\n" + "Example Requests:\n" + "\n" + "loanproducts\n" + "\n" + "\n" + "loanproducts?fields=name,description,interestRateFrequencyType,amortizationType") @ApiResponses({ @@ -227,7 +230,7 @@ public String retrieveAllLoanProducts(@Context final UriInfo uriInfo) { @GET @Path("template") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(operationId = "retrieveTemplateLoanProduct", summary = "Retrieve Loan Product 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" + @Operation(operationId = "retrieveTemplateLoanProduct", summary = "Retrieve Loan Product Details Template", tags = {"Loan Products"}, 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" + "loanproducts/template") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoanProductsApiResourceSwagger.GetLoanProductsTemplateResponse.class))) }) @@ -254,7 +257,7 @@ public String retrieveTemplate(@Context final UriInfo uriInfo, @GET @Path("{productId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Loan Product", operationId = "retrieveOneLoanProduct", description = "Retrieves a Loan Product\n\n" + @Operation(summary = "Retrieve a Loan Product", operationId = "retrieveOneLoanProduct", tags = {"Loan Products"}, description = "Retrieves a Loan Product\n\n" + "Example Requests:\n" + "\n" + "loanproducts/1\n" + "\n" + "\n" + "loanproducts/1?template=true\n" + "\n" + "\n" + "loanproducts/1?fields=name,description,numberOfRepayments") @ApiResponses({ @@ -271,7 +274,7 @@ public String retrieveLoanProductDetails(@PathParam("productId") @Parameter(desc @Path("{productId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update a Loan Product", operationId = "updateLoanProduct", description = "Updates a Loan Product") + @Operation(summary = "Update a Loan Product", operationId = "updateLoanProduct", tags = {"Loan Products"}, description = "Updates a Loan Product") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = LoanProductsApiResourceSwagger.PutLoanProductsProductIdRequest.class))) @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoanProductsApiResourceSwagger.PutLoanProductsProductIdResponse.class))) }) @@ -284,7 +287,7 @@ public String updateLoanProduct(@PathParam("productId") @Parameter(description = @GET @Path("external-id/{externalProductId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(operationId = "retrieveLoanProductDetailsByExternalId", summary = "Retrieve a Loan Product", description = "Retrieves a Loan Product\n\n" + @Operation(operationId = "retrieveLoanProductDetailsByExternalId", summary = "Retrieve a Loan Product", tags = {"Loan Products"}, description = "Retrieves a Loan Product\n\n" + "Example Requests:\n" + "\n" + "loanproducts/external-id/2075e308-d4a8-44d9-8203-f5a947b8c2f4\n" + "\n" + "\n" + "loanproducts/external-id/2075e308-d4a8-44d9-8203-f5a947b8c2f4?template=true\n" + "\n" + "\n" + "loanproducts/external-id/2075e308-d4a8-44d9-8203-f5a947b8c2f4?fields=name,description,numberOfRepayments") @@ -310,7 +313,7 @@ public String retrieveLoanProductDetails( @Path("external-id/{externalProductId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(operationId = "updateLoanProductByExternalId", summary = "Update a Loan Product", description = "Updates a Loan Product") + @Operation(operationId = "updateLoanProductByExternalId", summary = "Update a Loan Product", tags = {"Loan Products"}, description = "Updates a Loan Product") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = LoanProductsApiResourceSwagger.PutLoanProductsProductIdRequest.class))) @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoanProductsApiResourceSwagger.PutLoanProductsProductIdResponse.class))) }) diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/api/ProductMixApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/api/ProductMixApiResource.java index 211a6788c3c..c64710237a1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/api/ProductMixApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/api/ProductMixApiResource.java @@ -25,7 +25,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Context; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/api/MeetingsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/api/MeetingsApiResource.java index b36f631fbff..0be980395a7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/api/MeetingsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/api/MeetingsApiResource.java @@ -25,7 +25,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -75,7 +78,7 @@ public class MeetingsApiResource { @GET @Path("template") - @Operation(summary = "Retrieve Meeting Template", operationId = "retrieveTemplateMeeting") + @Operation(summary = "Retrieve Meeting Template", tags = {"Meetings"}, operationId = "retrieveTemplateMeeting") public MeetingData template(@PathParam("entityType") final String entityType, @PathParam("entityId") final Long entityId, @QueryParam("calendarId") final Long calendarId) { @@ -109,7 +112,7 @@ public MeetingData template(@PathParam("entityType") final String entityType, @P } @GET - @Operation(summary = "List Meetings", operationId = "retrieveAllMeetings") + @Operation(summary = "List Meetings", tags = {"Meetings"}, operationId = "retrieveAllMeetings") public Collection retrieveMeetings(@PathParam("entityType") final String entityType, @PathParam("entityId") final Long entityId, @QueryParam("limit") final Integer limit) { @@ -119,7 +122,7 @@ public Collection retrieveMeetings(@PathParam("entityType") final S @GET @Path("{meetingId}") - @Operation(summary = "Retrieve a Meeting", operationId = "retrieveOneMeeting") + @Operation(summary = "Retrieve a Meeting", tags = {"Meetings"}, operationId = "retrieveOneMeeting") public MeetingData retrieveMeeting(@PathParam("meetingId") final Long meetingId, @PathParam("entityType") final String entityType, @PathParam("entityId") final Long entityId) { @@ -134,7 +137,7 @@ public MeetingData retrieveMeeting(@PathParam("meetingId") final Long meetingId, @POST @Consumes({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create a Meeting", operationId = "createMeeting") + @Operation(summary = "Create a Meeting", tags = {"Meetings"}, operationId = "createMeeting") public MeetingCreateResponse createMeeting(@PathParam("entityType") final String entityType, @PathParam("entityId") final Long entityId, final MeetingCreateRequest request) { @@ -160,7 +163,7 @@ public MeetingCreateResponse createMeeting(@PathParam("entityType") final String @Path("{meetingId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update a Meeting", operationId = "updateMeeting") + @Operation(summary = "Update a Meeting", tags = {"Meetings"}, operationId = "updateMeeting") public MeetingUpdateResponse updateMeeting(@PathParam("entityType") final String entityType, @PathParam("entityId") final Long entityId, @PathParam("meetingId") final Long meetingId, final MeetingUpdateRequest request) { @@ -185,7 +188,7 @@ public MeetingUpdateResponse updateMeeting(@PathParam("entityType") final String @DELETE @Path("{meetingId}") - @Operation(summary = "Delete a Meeting", operationId = "deleteMeeting") + @Operation(summary = "Delete a Meeting", tags = {"Meetings"}, operationId = "deleteMeeting") public MeetingDeleteResponse deleteMeeting(@PathParam("entityType") final String entityType, @PathParam("entityId") final Long entityId, @PathParam("meetingId") final Long meetingId) { @@ -203,7 +206,7 @@ public MeetingDeleteResponse deleteMeeting(@PathParam("entityType") final String @POST @Path("{meetingId}") @Consumes({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update Meeting Attendance", operationId = "updateMeetingAttendance") + @Operation(summary = "Update Meeting Attendance", tags = {"Meetings"}, operationId = "updateMeetingAttendance") public MeetingAttendanceUpdateResponse updateMeetingAttendance(@PathParam("entityType") final String entityType, @PathParam("entityId") final Long entityId, @PathParam("meetingId") final Long meetingId, @QueryParam("command") final String commandParam, final MeetingAttendanceUpdateRequest request) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/api/NotesApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/api/NotesApiResource.java index 9eefc7c5598..53dc7904718 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/api/NotesApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/api/NotesApiResource.java @@ -26,7 +26,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; @@ -62,7 +65,7 @@ public class NotesApiResource { private final CommandDispatcher dispatcher; @GET - @Operation(summary = "Retrieve a Resource's description", description = """ + @Operation(summary = "Retrieve a Resource's description", tags = {"Notes"}, description = """ Retrieves a resource's notes Note: results are returned in descending createOn order. @@ -85,7 +88,7 @@ public List retrieveNotesByResource(@PathParam("resourceType") final S @GET @Path("{noteId}") - @Operation(summary = "Retrieve a Resource Note", description = """ + @Operation(summary = "Retrieve a Resource Note", tags = {"Notes"}, description = """ Retrieves a resource Note Example Requests: @@ -108,7 +111,7 @@ public NoteData retrieveNote(@PathParam("resourceType") final String resourceTyp @POST @Consumes({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Add a Resource Note", description = """ + @Operation(summary = "Add a Resource Note", tags = {"Notes"}, description = """ Adds a new note to a supported resource. Example Requests: @@ -139,7 +142,7 @@ public NoteCreateResponse addNewNote(@PathParam("resourceType") final String res @PUT @Path("{noteId}") @Consumes({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update a Resource Note", description = """ + @Operation(summary = "Update a Resource Note", tags = {"Notes"}, description = """ Updates a Resource Note """) public NoteUpdateResponse updateNote(@PathParam("resourceType") final String resourceType, @@ -166,7 +169,7 @@ public NoteUpdateResponse updateNote(@PathParam("resourceType") final String res @DELETE @Path("{noteId}") - @Operation(summary = "Delete a Resource Note", description = """ + @Operation(summary = "Delete a Resource Note", tags = {"Notes"}, description = """ Deletes a Resource Note """) public NoteDeleteResponse deleteNote(@PathParam("resourceType") final String resourceType, diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/products/api/ProductsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/products/api/ProductsApiResource.java index 42f4fd2fe60..7982fd5257f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/products/api/ProductsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/products/api/ProductsApiResource.java @@ -30,7 +30,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -70,7 +73,7 @@ public class ProductsApiResource { @GET @Path("template") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Share Product Template", operationId = "retrieveTemplateShareProduct") + @Operation(summary = "Retrieve Share Product Template", tags = {"Products"}, operationId = "retrieveTemplateShareProduct") public String retrieveTemplate(@PathParam("type") @Parameter(description = "type") final String productType, @Context final UriInfo uriInfo) { String serviceName = productType + ProductsApiConstants.READPLATFORM_NAME; @@ -87,7 +90,7 @@ public String retrieveTemplate(@PathParam("type") @Parameter(description = "type @GET @Path("{productId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Share Product", operationId = "retrieveOneShareProduct", description = "Retrieves a Share Product\n\n" + @Operation(summary = "Retrieve a Share Product", operationId = "retrieveOneShareProduct", tags = {"Products"}, description = "Retrieves a Share Product\n\n" + "Example Requests:\n" + "\n" + "products/share/1\n" + "\n" + "\n" + "products/share/1?template=true") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ProductsApiResourceSwagger.GetProductsTypeProductIdResponse.class))) }) @@ -106,7 +109,7 @@ public String retrieveProduct(@PathParam("productId") @Parameter(description = " @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Share Products", operationId = "retrieveAllShareProducts", description = "Lists Share Products\n\n" + @Operation(summary = "List Share Products", operationId = "retrieveAllShareProducts", tags = {"Products"}, description = "Lists Share Products\n\n" + "Mandatory Fields: limit, offset\n\n" + "Example Requests:\n" + "\n" + "shareproducts") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ProductsApiResourceSwagger.GetProductsTypeResponse.class))) }) @@ -127,7 +130,7 @@ public String retrieveAllProducts(@PathParam("type") @Parameter(description = "t @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create a Share Product", operationId = "createShareProduct", description = "Creates a Share Product\n\n" + @Operation(summary = "Create a Share Product", operationId = "createShareProduct", tags = {"Products"}, description = "Creates a Share Product\n\n" + "Mandatory Fields: name, shortName, description, currencyCode, digitsAfterDecimal,inMultiplesOf, locale, totalShares, unitPrice, nominalShares,allowDividendCalculationForInactiveClients,accountingRule\n\n" + "Mandatory Fields for Cash based accounting (accountingRule = 2): shareReferenceId, shareSuspenseId, shareEquityId, incomeFromFeeAccountId\n\n" + "Optional Fields: sharesIssued, minimumShares, maximumShares, minimumActivePeriodForDividends, minimumactiveperiodFrequencyType, lockinPeriodFrequency, lockinPeriodFrequencyType, marketPricePeriods, chargesSelected") @@ -147,7 +150,7 @@ public String createProduct(@PathParam("type") @Parameter(description = "type") @Path("{productId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Handle Share Product commands", operationId = "handleCommandsShareProduct") + @Operation(summary = "Handle Share Product commands", tags = {"Products"}, operationId = "handleCommandsShareProduct") public String handleCommands(@PathParam("type") @Parameter(description = "type") final String productType, @PathParam("productId") @Parameter(description = "productId") final Long productId, @QueryParam("command") @Parameter(description = "command") final String commandParam, @@ -162,7 +165,7 @@ public String handleCommands(@PathParam("type") @Parameter(description = "type") @Path("{productId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update a Share Product", operationId = "updateShareProduct", description = "Updates a Share Product") + @Operation(summary = "Update a Share Product", operationId = "updateShareProduct", tags = {"Products"}, description = "Updates a Share Product") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = ProductsApiResourceSwagger.PutProductsTypeProductIdRequest.class))) @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ProductsApiResourceSwagger.PutProductsTypeProductIdResponse.class))) }) diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/api/RateApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/api/RateApiResource.java index 0782c6e0ef4..e19b1303155 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/api/RateApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/api/RateApiResource.java @@ -25,7 +25,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; @@ -65,7 +68,7 @@ public class RateApiResource { @GET @Path("{rateId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a rate", operationId = "retrieveOneRate") + @Operation(summary = "Retrieve a rate", tags = {"Rate"}, operationId = "retrieveOneRate") public RateData retrieveRate(@PathParam("rateId") Long rateId) { this.context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSIONS); @@ -76,7 +79,7 @@ public RateData retrieveRate(@PathParam("rateId") Long rateId) { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create a rate", operationId = "createRate") + @Operation(summary = "Create a rate", tags = {"Rate"}, operationId = "createRate") public CommandProcessingResult createRate(final RateRequest rateRequest) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createRate().withJson(toApiJsonSerializer.serialize(rateRequest)) .build(); @@ -86,7 +89,7 @@ public CommandProcessingResult createRate(final RateRequest rateRequest) { @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List all rates", operationId = "retrieveAllRates") + @Operation(summary = "List all rates", tags = {"Rate"}, operationId = "retrieveAllRates") public List getAllRates() { this.context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSIONS); @@ -98,7 +101,7 @@ public List getAllRates() { @Path("{rateId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update a rate", operationId = "updateRate") + @Operation(summary = "Update a rate", tags = {"Rate"}, operationId = "updateRate") public CommandProcessingResult updateRate(@PathParam("rateId") Long rateId, final RateRequest rateRequest) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateRate(rateId) .withJson(toApiJsonSerializer.serialize(rateRequest)).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/api/RepaymentWithPostDatedChecksApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/api/RepaymentWithPostDatedChecksApiResource.java index 0b1ad935d9a..963ebac09d2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/api/RepaymentWithPostDatedChecksApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/api/RepaymentWithPostDatedChecksApiResource.java @@ -31,7 +31,10 @@ import jakarta.ws.rs.DELETE; import jakarta.ws.rs.GET; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -63,7 +66,7 @@ public class RepaymentWithPostDatedChecksApiResource { @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Get All Post Dated Checks", description = "Get All Post dated Checks") + @Operation(summary = "Get All Post Dated Checks", tags = {"repayment with post dated checks"}, description = "Get All Post dated Checks") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = PostDatedChecksApiResourceSwagger.GetPostDatedChecks.class)))) }) public String getPostDatedChecks(@PathParam("loanId") @Parameter(description = "loanId") final Long loanId) { @@ -76,7 +79,7 @@ public String getPostDatedChecks(@PathParam("loanId") @Parameter(description = " @GET @Path("{installmentId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Get Post Dated Check", description = "Get Post Dated Check") + @Operation(summary = "Get Post Dated Check", tags = {"repayment with post dated checks"}, description = "Get Post Dated Check") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = PostDatedChecksApiResourceSwagger.GetPostDatedChecks.class)))) }) public String getPostDatedCheck(@PathParam("installmentId") @Parameter(description = "installmentId") final Integer installmentId, @@ -91,7 +94,7 @@ public String getPostDatedCheck(@PathParam("installmentId") @Parameter(descripti @Path("{postDatedCheckId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update Post Dated Check, Bounced Check", description = "Update Post Dated Check, Bounced Check") + @Operation(summary = "Update Post Dated Check, Bounced Check", tags = {"repayment with post dated checks"}, description = "Update Post Dated Check, Bounced Check") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = PostDatedChecksApiResourceSwagger.UpdatePostDatedCheckRequest.class))) @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = PostDatedChecksApiResourceSwagger.UpdatePostDatedCheckResponse.class)))) }) @@ -116,7 +119,7 @@ public String updatePostDatedChecks(@PathParam("postDatedCheckId") @Parameter(de @DELETE @Path("{postDatedCheckId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Delete Post Dated Check", description = "Delete Post Dated Check") + @Operation(summary = "Delete Post Dated Check", tags = {"repayment with post dated checks"}, description = "Delete Post Dated Check") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = PostDatedChecksApiResourceSwagger.DeletePostDatedCheck.class)))) }) public String deletePostDatedCheck(@PathParam("postDatedCheckId") @Parameter(description = "postDatedCheckId") final Long id, diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/DepositAccountOnHoldFundTransactionsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/DepositAccountOnHoldFundTransactionsApiResource.java index f1b48d24489..5d218c4da77 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/DepositAccountOnHoldFundTransactionsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/DepositAccountOnHoldFundTransactionsApiResource.java @@ -21,7 +21,10 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.GET; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -55,7 +58,7 @@ public class DepositAccountOnHoldFundTransactionsApiResource { @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve deposit account on hold fund transactions", operationId = "retrieveAllDepositAccountOnHoldFundTransactions") + @Operation(summary = "Retrieve deposit account on hold fund transactions", tags = {"Deposit Account On Hold Fund Transactions"}, operationId = "retrieveAllDepositAccountOnHoldFundTransactions") public String retrieveAll(@PathParam("savingsId") final Long savingsId, @QueryParam("guarantorFundingId") final Long guarantorFundingId, @Context final UriInfo uriInfo, @QueryParam("offset") final Integer offset, @QueryParam("limit") final Integer limit, @QueryParam("orderBy") final String orderBy, @QueryParam("sortOrder") final String sortOrder) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositAccountTransactionsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositAccountTransactionsApiResource.java index 9f0547b940a..515ae5bdbdc 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositAccountTransactionsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositAccountTransactionsApiResource.java @@ -29,7 +29,10 @@ import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -84,7 +87,7 @@ private boolean is(final String commandParam, final String commandValue) { @GET @Path("template") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Fixed Deposit Account Transaction Template", operationId = "retrieveTemplateFixedDepositAccountTransaction") + @Operation(summary = "Retrieve Fixed Deposit Account Transaction Template", tags = {"Fixed Deposit Account Transactions"}, operationId = "retrieveTemplateFixedDepositAccountTransaction") public String retrieveTemplate(@PathParam("fixedDepositAccountId") final Long fixedDepositAccountId, // @QueryParam("command") final String commandParam, @Context final UriInfo uriInfo) { @@ -105,7 +108,7 @@ public String retrieveTemplate(@PathParam("fixedDepositAccountId") final Long fi @GET @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List fixed deposit account transactions", operationId = "retrieveAllFixedDepositAccountTransactions") + @Operation(summary = "List fixed deposit account transactions", tags = {"Fixed Deposit Account Transactions"}, operationId = "retrieveAllFixedDepositAccountTransactions") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = FixedDepositAccountTransactionsApiResourceSwagger.GetFixedDepositAccountsAccountIdTransactionsResponse.class)))) }) public String retrieveAll(@PathParam("fixedDepositAccountId") final Long fixedDepositAccountId, @Context final UriInfo uriInfo) { @@ -119,7 +122,7 @@ public String retrieveAll(@PathParam("fixedDepositAccountId") final Long fixedDe @GET @Path("{transactionId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a fixed deposit account transaction", operationId = "retrieveOneFixedDepositAccountTransaction") + @Operation(summary = "Retrieve a fixed deposit account transaction", tags = {"Fixed Deposit Account Transactions"}, operationId = "retrieveOneFixedDepositAccountTransaction") public String retrieveOne(@PathParam("fixedDepositAccountId") final Long fixedDepositAccountId, @PathParam("transactionId") final Long transactionId, @Context final UriInfo uriInfo) { @@ -138,6 +141,7 @@ public String retrieveOne(@PathParam("fixedDepositAccountId") final Long fixedDe @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Fixed Deposit Account Transactions", tags = {"Fixed Deposit Account Transactions"}, description = "Executes transactions on a fixed deposit account (deposit, withdrawal, interest posting)") public String transaction(@PathParam("fixedDepositAccountId") final Long fixedDepositAccountId, @QueryParam("command") final String commandParam, final String apiRequestBodyAsJson) { @@ -165,7 +169,7 @@ public String transaction(@PathParam("fixedDepositAccountId") final Long fixedDe @Path("{transactionId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Adjust Transaction | Undo transaction", description = "Adjust Transaction:\n\nThis command modifies the given transaction.\n\n" + @Operation(summary = "Adjust Transaction | Undo transaction", tags = {"Fixed Deposit Account Transactions"}, description = "Adjust Transaction:\n\nThis command modifies the given transaction.\n\n" + "Undo transaction:\n\nThis command reverses the given transaction.\n\n" + "Showing request/response for 'Adjust Transaction'") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = FixedDepositAccountTransactionsApiResourceSwagger.PostFixedDepositAccountsFixedDepositAccountIdTransactionsRequest.class))) @ApiResponses({ diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositAccountsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositAccountsApiResource.java index 6742cd46460..2e909051282 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositAccountsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositAccountsApiResource.java @@ -33,7 +33,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -110,7 +113,7 @@ public class FixedDepositAccountsApiResource { @GET @Path("template") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Fixed Deposit Account Template", operationId = "retrieveTemplateFixedDepositAccount", description = """ + @Operation(summary = "Retrieve Fixed Deposit Account Template", tags = {"Fixed Deposit Account"}, operationId = "retrieveTemplateFixedDepositAccount", description = """ This is a convenience resource. It can be useful when building maintenance user interface screens for fixed deposit applications. The template data returned consists of any or all of: @@ -140,7 +143,7 @@ public String template(@QueryParam("clientId") @Parameter(description = "clientI @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Fixed deposit applications/accounts", operationId = "retrieveAllFixedDepositAccounts", description = """ + @Operation(summary = "List Fixed deposit applications/accounts", operationId = "retrieveAllFixedDepositAccounts", tags = {"Fixed Deposit Account"}, description = """ Lists Fixed Deposit Accounts Example Requests: @@ -182,7 +185,7 @@ public String retrieveAll(@Context final UriInfo uriInfo, @QueryParam("paged") @ @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Submit new fixed deposit application", description = """ + @Operation(summary = "Submit new fixed deposit application", tags = {"Fixed Deposit Account"}, description = """ Submits a new fixed deposit application Mandatory Fields: clientId or groupId, productId, submittedOnDate, depositAmount, depositPeriod, depositPeriodFrequencyId @@ -202,7 +205,7 @@ public String submitApplication(@Parameter(hidden = true) final String apiReques @GET @Path("{accountId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a fixed deposit application/account", operationId = "retrieveOneFixedDepositAccount", description = """ + @Operation(summary = "Retrieve a fixed deposit application/account", operationId = "retrieveOneFixedDepositAccount", tags = {"Fixed Deposit Account"}, description = """ Retrieves a fixed deposit application/account Example Requests : @@ -240,6 +243,7 @@ public String retrieveOne(@PathParam("accountId") @Parameter(description = "acco @GET @Path("calculate-fd-interest") @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Calculate Fixed Deposit Interest", tags = {"Fixed Deposit Account"}, description = "Calculates interest for a fixed deposit account based on provided parameters") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = FixedDepositAccountsApiResourceSwagger.CalculateFixedDepositInterestResponse.class))) public String calculateFixedDepositInterest(@Context final UriInfo uriInfo, @QueryParam("principalAmount") @Parameter(description = "BigDecimal principalAmount") final BigDecimal principalAmount, @@ -337,7 +341,7 @@ private FixedDepositAccountData populateTemplateAndAssociations(final Long accou @Path("{accountId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Modify a fixed deposit application", operationId = "updateFixedDepositAccount", description = "Fixed deposit application can only be modified when in 'Submitted and pending approval' state. Once the application is approved, the details cannot be changed using this method. Specific api endpoints will be created to allow change of interest detail such as rate, compounding period, posting period etc") + @Operation(summary = "Modify a fixed deposit application", operationId = "updateFixedDepositAccount", tags = {"Fixed Deposit Account"}, description = "Fixed deposit application can only be modified when in 'Submitted and pending approval' state. Once the application is approved, the details cannot be changed using this method. Specific api endpoints will be created to allow change of interest detail such as rate, compounding period, posting period etc") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = FixedDepositAccountsApiResourceSwagger.PutFixedDepositAccountsAccountIdRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = FixedDepositAccountsApiResourceSwagger.PutFixedDepositAccountsAccountIdResponse.class))) public String update(@PathParam("accountId") @Parameter(description = "accountId") final Long accountId, @@ -355,7 +359,7 @@ public String update(@PathParam("accountId") @Parameter(description = "accountId @Path("{accountId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Approve fixed deposit application | Undo approval fixed deposit application | Reject fixed deposit application | Withdraw fixed deposit application | Activate a fixed deposit account | Close a fixed deposit account | Premature Close a fixed deposit account | Calculate Premature amount on Fixed deposit account | Calculate Interest on Fixed Deposit Account | Post Interest on Fixed Deposit Account", description = "Approve fixed deposit application:\n\n" + @Operation(tags = {"Fixed Deposit Account"}, summary = "Approve fixed deposit application | Undo approval fixed deposit application | Reject fixed deposit application | Withdraw fixed deposit application | Activate a fixed deposit account | Close a fixed deposit account | Premature Close a fixed deposit account | Calculate Premature amount on Fixed deposit account | Calculate Interest on Fixed Deposit Account | Post Interest on Fixed Deposit Account", description = "Approve fixed deposit application:\n\n" + "Approves fixed deposit application so long as its in 'Submitted and pending approval' state.\n\n" + "Undo approval fixed deposit application:\n\n" + "Will move 'approved' fixed deposit application back to 'Submitted and pending approval' state.\n\n" @@ -441,7 +445,7 @@ private boolean is(final String commandParam, final String commandValue) { @DELETE @Path("{accountId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Delete a fixed deposit application", operationId = "deleteFixedDepositAccount", description = "At present we support hard delete of fixed deposit application so long as its in 'Submitted and pending approval' state. One the application is moves past this state, it is not possible to do a 'hard' delete of the application or the account. An API endpoint will be added to close/de-activate the fixed deposit account.") + @Operation(summary = "Delete a fixed deposit application", operationId = "deleteFixedDepositAccount", tags = {"Fixed Deposit Account"}, description = "At present we support hard delete of fixed deposit application so long as its in 'Submitted and pending approval' state. One the application is moves past this state, it is not possible to do a 'hard' delete of the application or the account. An API endpoint will be added to close/de-activate the fixed deposit account.") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = FixedDepositAccountsApiResourceSwagger.DeleteFixedDepositAccountsAccountIdResponse.class))) public String delete(@PathParam("accountId") @Parameter(description = "accountId") final Long accountId) { @@ -455,6 +459,7 @@ public String delete(@PathParam("accountId") @Parameter(description = "accountId @GET @Path("{accountId}/template") @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Retrieve Fixed Deposit Account Closure Template", tags = {"Fixed Deposit Account"}, description = "Returns a template for closing a fixed deposit account") public String accountClosureTemplate(@PathParam("accountId") @Parameter(description = "accountId") final Long accountId, @QueryParam("command") @Parameter(description = "command") final String commandParam, @Context final UriInfo uriInfo) { @@ -471,6 +476,7 @@ public String accountClosureTemplate(@PathParam("accountId") @Parameter(descript @GET @Path("downloadtemplate") @Produces("application/vnd.ms-excel") + @Operation(summary = "Download Fixed Deposit Account Template", tags = {"Fixed Deposit Account"}, description = "Returns a template for bulk fixed deposit account import in Excel format") public Response getFixedDepositTemplate(@QueryParam("officeId") final Long officeId, @QueryParam("staffId") final Long staffId, @QueryParam("dateFormat") final String dateFormat) { return bulkImportWorkbookPopulatorService.getTemplate(GlobalEntityType.FIXED_DEPOSIT_ACCOUNTS.toString(), officeId, staffId, @@ -480,6 +486,7 @@ public Response getFixedDepositTemplate(@QueryParam("officeId") final Long offic @POST @Path("uploadtemplate") @Consumes(MediaType.MULTIPART_FORM_DATA) + @Operation(summary = "Upload Fixed Deposit Account Template", tags = {"Fixed Deposit Account"}, description = "Uploads a fixed deposit account template for processing") @RequestBody(description = "Upload fixed deposit template", content = { @Content(mediaType = MediaType.MULTIPART_FORM_DATA, schema = @Schema(implementation = UploadRequest.class)) }) public String postFixedDepositTemplate(@FormDataParam("file") InputStream uploadedInputStream, @@ -493,6 +500,7 @@ public String postFixedDepositTemplate(@FormDataParam("file") InputStream upload @GET @Path("transaction/downloadtemplate") @Produces("application/vnd.ms-excel") + @Operation(summary = "Download Fixed Deposit Transaction Template", tags = {"Fixed Deposit Account"}, description = "Returns a template for bulk fixed deposit transaction import in Excel format") public Response getFixedDepositTransactionTemplate(@QueryParam("officeId") final Long officeId, @QueryParam("dateFormat") final String dateFormat) { return bulkImportWorkbookPopulatorService.getTemplate(GlobalEntityType.FIXED_DEPOSIT_TRANSACTIONS.toString(), officeId, null, @@ -502,6 +510,7 @@ public Response getFixedDepositTransactionTemplate(@QueryParam("officeId") final @POST @Path("transaction/uploadtemplate") @Consumes(MediaType.MULTIPART_FORM_DATA) + @Operation(summary = "Upload Fixed Deposit Transaction Template", tags = {"Fixed Deposit Account"}, description = "Uploads a fixed deposit transaction template for processing") @RequestBody(description = "Upload fixed deposit transaction template", content = { @Content(mediaType = MediaType.MULTIPART_FORM_DATA, schema = @Schema(implementation = UploadRequest.class)) }) public String postFixedDepositTransactionTemplate(@FormDataParam("file") InputStream uploadedInputStream, diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositProductsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositProductsApiResource.java index 870cfafc068..9a7491eb032 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositProductsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositProductsApiResource.java @@ -31,7 +31,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Context; @@ -114,7 +117,7 @@ public class FixedDepositProductsApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create a Fixed Deposit Product", operationId = "createFixedDepositProduct", description = """ + @Operation(summary = "Create a Fixed Deposit Product", operationId = "createFixedDepositProduct", tags = {"Fixed Deposit Product"}, description = """ Creates a Fixed Deposit Product Mandatory Fields: name, shortName, description, currencyCode, digitsAfterDecimal,inMultiplesOf, interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType, minDepositTerm, minDepositTermTypeId, accountingRule @@ -139,7 +142,7 @@ public String create(@Parameter(hidden = true) final String apiRequestBodyAsJson @Path("{productId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update a Fixed Deposit Product", operationId = "updateFixedDepositProduct", description = "Updates a Fixed Deposit Product") + @Operation(summary = "Update a Fixed Deposit Product", operationId = "updateFixedDepositProduct", tags = {"Fixed Deposit Product"}, description = "Updates a Fixed Deposit Product") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = FixedDepositProductsApiResourceSwagger.PutFixedDepositProductsProductIdRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = FixedDepositProductsApiResourceSwagger.PutFixedDepositProductsProductIdResponse.class))) public String update(@PathParam("productId") @Parameter(description = "productId") final Long productId, @@ -156,7 +159,7 @@ public String update(@PathParam("productId") @Parameter(description = "productId @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Fixed Deposit Products", operationId = "retrieveAllFixedDepositProducts", description = """ + @Operation(summary = "List Fixed Deposit Products", operationId = "retrieveAllFixedDepositProducts", tags = {"Fixed Deposit Product"}, description = """ Lists Fixed Deposit Products Example Requests: @@ -182,7 +185,7 @@ public String retrieveAll(@Context final UriInfo uriInfo) { @GET @Path("{productId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Fixed Deposit Product", operationId = "retrieveOneFixedDepositProduct", description = """ + @Operation(summary = "Retrieve a Fixed Deposit Product", operationId = "retrieveOneFixedDepositProduct", tags = {"Fixed Deposit Product"}, description = """ Retrieves a Fixed Deposit Product Example Requests: @@ -235,7 +238,7 @@ public String retrieveOne(@PathParam("productId") @Parameter(description = "prod @GET @Path("template") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Fixed Deposit Product Template", operationId = "retrieveTemplateFixedDepositProduct") + @Operation(summary = "Retrieve Fixed Deposit Product Template", tags = {"Fixed Deposit Product"}, operationId = "retrieveTemplateFixedDepositProduct") public String retrieveTemplate(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(DepositsApiConstants.FIXED_DEPOSIT_PRODUCT_RESOURCE_NAME); @@ -335,7 +338,7 @@ private FixedDepositProductData handleTemplateRelatedData(final FixedDepositProd @DELETE @Path("{productId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Delete a Fixed Deposit Product", operationId = "deleteFixedDepositProduct", description = "Deletes a Fixed Deposit Product") + @Operation(summary = "Delete a Fixed Deposit Product", operationId = "deleteFixedDepositProduct", tags = {"Fixed Deposit Product"}, description = "Deletes a Fixed Deposit Product") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = FixedDepositProductsApiResourceSwagger.DeleteFixedDepositProductsProductIdResponse.class))) public String delete(@PathParam("productId") @Parameter(description = "productId") final Long productId) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/InternalSavingsAccountInformationApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/InternalSavingsAccountInformationApiResource.java index e897eff1f60..5c9e7e420dc 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/InternalSavingsAccountInformationApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/InternalSavingsAccountInformationApiResource.java @@ -18,9 +18,14 @@ */ package org.apache.fineract.portfolio.savings.api; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import jakarta.ws.rs.GET; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Context; @@ -36,6 +41,7 @@ import org.springframework.context.annotation.Profile; import org.springframework.stereotype.Component; +@Tag(name = "Internal Savings Account Information", description = "Internal savings account resources for testing") @Profile(FineractProfiles.TEST) @Component @Path("/v1/internal/savingsaccounts") @@ -63,6 +69,7 @@ public void afterPropertiesSet() { @Path("status/{statusId}") @Produces({ MediaType.APPLICATION_JSON }) @SuppressFBWarnings("SLF4J_SIGN_ONLY_FORMAT") + @Operation(summary = "Retrieve internal savings account details", tags = {"Internal Savings Account Information"}) public List getSavingsAccountsByStatus(@Context final UriInfo uriInfo, @PathParam("statusId") Integer statusId) { log.warn("------------------------------------------------------------"); log.warn(" "); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositAccountTransactionsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositAccountTransactionsApiResource.java index e834e454a6f..591795dcd77 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositAccountTransactionsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositAccountTransactionsApiResource.java @@ -29,7 +29,10 @@ import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -86,7 +89,7 @@ private boolean is(final String commandParam, final String commandValue) { @GET @Path("template") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Recurring Deposit Account Transaction Template", operationId = "retrieveTemplateRecurringDepositAccountTransaction", 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" + @Operation(summary = "Retrieve Recurring Deposit Account Transaction Template", operationId = "retrieveTemplateRecurringDepositAccountTransaction", tags = {"Recurring Deposit Account Transactions"}, 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 Requests:\n" + "\n" + "recurringdepositaccounts/1/transactions/template?command=deposit\n" + "\n" + "recurringdepositaccounts/1/transactions/template?command=withdrawal") @@ -129,7 +132,7 @@ public String retrieveTemplate( @GET @Path("{transactionId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Recurring Deposit Account Transaction", operationId = "retrieveOneRecurringDepositAccountTransaction", description = "Retrieves Recurring Deposit Account Transaction\n\n" + @Operation(summary = "Retrieve Recurring Deposit Account Transaction", operationId = "retrieveOneRecurringDepositAccountTransaction", tags = {"Recurring Deposit Account Transactions"}, description = "Retrieves Recurring Deposit Account Transaction\n\n" + "Example Requests:\n" + "\n" + "recurringdepositaccounts/1/transactions/1") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = RecurringDepositAccountTransactionsApiResourceSwagger.GetRecurringDepositAccountsRecurringDepositAccountIdTransactionsTransactionIdResponse.class))) }) @@ -153,7 +156,7 @@ public String retrieveOne( @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Deposit Transaction | Withdrawal Transaction", operationId = "transactionRecurringDepositAccountTransaction", description = "Deposit Transaction:\n\n" + @Operation(summary = "Deposit Transaction | Withdrawal Transaction", operationId = "transactionRecurringDepositAccountTransaction", tags = {"Recurring Deposit Account Transactions"}, description = "Deposit Transaction:\n\n" + "Used for a deposit transaction\n\n" + "Withdrawal Transaction:\n\n" + "Used for a Withdrawal Transaction\n\n" + "Showing request/response for Deposit Transaction") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = RecurringDepositAccountTransactionsApiResourceSwagger.PostRecurringDepositAccountsRecurringDepositAccountIdTransactionsRequest.class))) @@ -188,7 +191,7 @@ public String transaction( @Path("{transactionId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Adjust Transaction | Undo transaction", description = "Adjust Transaction:\n\n" + @Operation(summary = "Adjust Transaction | Undo transaction", tags = {"Recurring Deposit Account Transactions"}, description = "Adjust Transaction:\n\n" + "This command modifies the given transaction.\n\n" + "Undo transaction:\n\n" + "This command reverses the given transaction.\n\n" + "Showing request/response for 'Adjust Transaction'") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = RecurringDepositAccountTransactionsApiResourceSwagger.PostRecurringDepositAccountsRecurringDepositAccountIdTransactionsRequest.class))) diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositAccountsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositAccountsApiResource.java index 32a17390cfd..4e442f5cddc 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositAccountsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositAccountsApiResource.java @@ -34,7 +34,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -104,7 +107,7 @@ public class RecurringDepositAccountsApiResource { @GET @Path("template") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve recurring Deposit Account Template", operationId = "retrieveTemplateRecurringDepositAccount", description = "This is a convenience resource. It can be useful when building maintenance user interface screens for recurring deposit applications. The template data returned consists of any or all of:\n" + @Operation(summary = "Retrieve recurring Deposit Account Template", operationId = "retrieveTemplateRecurringDepositAccount", tags = {"Recurring Deposit Account"}, description = "This is a convenience resource. It can be useful when building maintenance user interface screens for recurring deposit applications. The template data returned consists of any or all of:\n" + "\n" + "Field Defaults\n" + "Allowed Value Lists\n\n" + "Example Requests:\n" + "\n" + "recurringdepositaccounts/template?clientId=1\n" + "\n" + "\n" + "recurringdepositaccounts/template?clientId=1&productId=1") @ApiResponses({ @@ -127,7 +130,7 @@ public String template(@QueryParam("clientId") @Parameter(description = "clientI @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Recurring deposit applications/accounts", operationId = "retrieveAllRecurringDepositAccounts", description = "Lists Recurring deposit applications/accounts\n\n" + @Operation(summary = "List Recurring deposit applications/accounts", operationId = "retrieveAllRecurringDepositAccounts", tags = {"Recurring Deposit Account"}, description = "Lists Recurring deposit applications/accounts\n\n" + "Example Requests:\n" + "\n" + "recurringdepositaccounts\n" + "\n" + "\n" + "recurringdepositaccounts?fields=name") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = RecurringDepositAccountsApiResourceSwagger.GetRecurringDepositAccountsResponse.class)))) }) @@ -161,7 +164,7 @@ public String retrieveAll(@Context final UriInfo uriInfo, @QueryParam("paged") @ @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Submit new recurring deposit application", operationId = "submitApplicationRecurringDepositAccount", description = "Submits new recurring deposit application\n\n" + @Operation(summary = "Submit new recurring deposit application", operationId = "submitApplicationRecurringDepositAccount", tags = {"Recurring Deposit Account"}, description = "Submits new recurring deposit application\n\n" + "Mandatory Fields: clientId or groupId, productId, submittedOnDate, depositAmount, depositPeriod, depositPeriodFrequencyId\n\n" + "Optional Fields: accountNo, externalId, fieldOfficerId,linkAccountId(if provided initial deposit amount will be collected from this account),transferInterestToSavings(By enabling this flag all interest postings will be transferred to linked saving account )\n\n" + "Inherited from Product (if not provided): interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType, lockinPeriodFrequency, lockinPeriodFrequencyType, preClosurePenalApplicable, preClosurePenalInterest, preClosurePenalInterestOnTypeId, charts, withHoldTax") @@ -181,7 +184,7 @@ public String submitApplication(@Parameter(hidden = true) final String apiReques @GET @Path("{accountId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a recurring deposit application/account", operationId = "retrieveOneRecurringDepositAccount", description = "Retrieves a recurring deposit application/account\n\n" + @Operation(summary = "Retrieve a recurring deposit application/account", operationId = "retrieveOneRecurringDepositAccount", tags = {"Recurring Deposit Account"}, description = "Retrieves a recurring deposit application/account\n\n" + "Example Requests :\n" + "\n" + "recurringdepositaccounts/1\n" + "\n" + "\n" + "recurringdepositaccounts/1?associations=all") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = RecurringDepositAccountsApiResourceSwagger.GetRecurringDepositAccountsAccountIdResponse.class))) }) @@ -258,7 +261,7 @@ private RecurringDepositAccountData populateTemplateAndAssociations(final Long a @Path("{accountId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Modify a recurring deposit application", operationId = "updateRecurringDepositAccount", description = "Recurring deposit application can only be modified when in 'Submitted and pending approval' state. Once the application is approved, the details cannot be changed using this method. Specific api endpoints will be created to allow change of interest detail such as rate, compounding period, posting period etc") + @Operation(summary = "Modify a recurring deposit application", operationId = "updateRecurringDepositAccount", tags = {"Recurring Deposit Account"}, description = "Recurring deposit application can only be modified when in 'Submitted and pending approval' state. Once the application is approved, the details cannot be changed using this method. Specific api endpoints will be created to allow change of interest detail such as rate, compounding period, posting period etc") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = RecurringDepositAccountsApiResourceSwagger.PutRecurringDepositAccountsAccountIdRequest.class))) @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = RecurringDepositAccountsApiResourceSwagger.PutRecurringDepositAccountsAccountIdResponse.class))) }) @@ -277,7 +280,7 @@ public String update(@PathParam("accountId") @Parameter(description = "accountId @Path("{accountId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Approve recurring deposit application | Undo approval recurring deposit application | Reject recurring deposit application | Withdraw recurring deposit application | Activate a recurring deposit account | Update the recommended deposit amount for a recurring deposit account | Close a recurring deposit account | Premature Close a recurring deposit account | Calculate Premature amount on Recurring deposit account | Calculate Interest on recurring Deposit Account | Post Interest on recurring Deposit Account", description = "Approve recurring deposit application:\n\n" + @Operation(tags = {"Recurring Deposit Account"}, summary = "Approve recurring deposit application | Undo approval recurring deposit application | Reject recurring deposit application | Withdraw recurring deposit application | Activate a recurring deposit account | Update the recommended deposit amount for a recurring deposit account | Close a recurring deposit account | Premature Close a recurring deposit account | Calculate Premature amount on Recurring deposit account | Calculate Interest on recurring Deposit Account | Post Interest on recurring Deposit Account", description = "Approve recurring deposit application:\n\n" + "Approves recurring deposit application so long as its in 'Submitted and pending approval' state.\n\n" + "Undo approval recurring deposit application:\n\n" + "Will move 'approved' recurring deposit application back to 'Submitted and pending approval' state.\n\n" @@ -373,7 +376,7 @@ private boolean is(final String commandParam, final String commandValue) { @DELETE @Path("{accountId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Delete a recurring deposit application", operationId = "deleteRecurringDepositAccount", description = "At present we support hard delete of recurring deposit application so long as its in 'Submitted and pending approval' state. One the application is moves past this state, it is not possible to do a 'hard' delete of the application or the account. An API endpoint will be added to close/de-activate the recurring deposit account.") + @Operation(summary = "Delete a recurring deposit application", operationId = "deleteRecurringDepositAccount", tags = {"Recurring Deposit Account"}, description = "At present we support hard delete of recurring deposit application so long as its in 'Submitted and pending approval' state. One the application is moves past this state, it is not possible to do a 'hard' delete of the application or the account. An API endpoint will be added to close/de-activate the recurring deposit account.") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = RecurringDepositAccountsApiResourceSwagger.DeleteRecurringDepositAccountsResponse.class))) }) public String delete(@PathParam("accountId") @Parameter(description = "accountId") final Long accountId) { @@ -388,7 +391,7 @@ public String delete(@PathParam("accountId") @Parameter(description = "accountId @GET @Path("{accountId}/template") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve recurring deposit account closure template", operationId = "accountClosureTemplateRecurringDepositAccount") + @Operation(summary = "Retrieve recurring deposit account closure template", tags = {"Recurring Deposit Account"}, operationId = "accountClosureTemplateRecurringDepositAccount") public String accountClosureTemplate(@PathParam("accountId") @Parameter(description = "accountId") final Long accountId, @QueryParam("command") @Parameter(description = "command") final String commandParam, @Context final UriInfo uriInfo) { @@ -408,6 +411,7 @@ public String accountClosureTemplate(@PathParam("accountId") @Parameter(descript @GET @Path("downloadtemplate") @Produces("application/vnd.ms-excel") + @Operation(summary = "Download Recurring Deposit Account Template", tags = {"Recurring Deposit Account"}, description = "Returns a template for bulk recurring deposit account import in Excel format") public Response getRecurringDepositTemplate(@QueryParam("officeId") final Long officeId, @QueryParam("staffId") final Long staffId, @QueryParam("dateFormat") final String dateFormat) { return bulkImportWorkbookPopulatorService.getTemplate(GlobalEntityType.RECURRING_DEPOSIT_ACCOUNTS.toString(), officeId, staffId, @@ -419,6 +423,7 @@ public Response getRecurringDepositTemplate(@QueryParam("officeId") final Long o @Consumes(MediaType.MULTIPART_FORM_DATA) @RequestBody(description = "Upload recurring deposit template", content = { @Content(mediaType = MediaType.MULTIPART_FORM_DATA, schema = @Schema(implementation = UploadRequest.class)) }) + @Operation(summary = "Upload Recurring Deposit Account Template", tags = {"Recurring Deposit Account"}, description = "Uploads a recurring deposit account template for processing") public String postRecurringDepositTemplate(@FormDataParam("file") InputStream uploadedInputStream, @FormDataParam("file") FormDataContentDisposition fileDetail, @FormDataParam("locale") final String locale, @FormDataParam("dateFormat") final String dateFormat) { @@ -430,6 +435,7 @@ public String postRecurringDepositTemplate(@FormDataParam("file") InputStream up @GET @Path("transactions/downloadtemplate") @Produces("application/vnd.ms-excel") + @Operation(summary = "Download Recurring Deposit Transaction Template", tags = {"Recurring Deposit Account"}, description = "Returns a template for bulk recurring deposit transaction import in Excel format") public Response getRecurringDepositTransactionTemplate(@QueryParam("officeId") final Long officeId, @QueryParam("dateFormat") final String dateFormat) { return bulkImportWorkbookPopulatorService.getTemplate(GlobalEntityType.RECURRING_DEPOSIT_ACCOUNTS_TRANSACTIONS.toString(), officeId, @@ -441,6 +447,7 @@ public Response getRecurringDepositTransactionTemplate(@QueryParam("officeId") f @Consumes(MediaType.MULTIPART_FORM_DATA) @RequestBody(description = "Upload recurring deposit transactions template", content = { @Content(mediaType = MediaType.MULTIPART_FORM_DATA, schema = @Schema(implementation = UploadRequest.class)) }) + @Operation(summary = "Upload Recurring Deposit Transaction Template", tags = {"Recurring Deposit Account"}, description = "Uploads a recurring deposit transaction template for processing") public String postRecurringDepositTransactionsTemplate(@FormDataParam("file") InputStream uploadedInputStream, @FormDataParam("file") FormDataContentDisposition fileDetail, @FormDataParam("locale") final String locale, @FormDataParam("dateFormat") final String dateFormat) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositProductsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositProductsApiResource.java index 4347c2fc677..93e82c74b22 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositProductsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositProductsApiResource.java @@ -32,7 +32,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Context; @@ -114,7 +117,7 @@ public class RecurringDepositProductsApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create a Recurring Deposit Product", operationId = "createRecurringDepositProduct", description = "Creates a Recurring Deposit Product\n\n" + @Operation(summary = "Create a Recurring Deposit Product", operationId = "createRecurringDepositProduct", tags = {"Recurring Deposit Product"}, description = "Creates a Recurring Deposit Product\n\n" + "Mandatory Fields: name, shortName, description, currencyCode, digitsAfterDecimal,inMultiplesOf, interestCompoundingPeriodType, interestPostingPeriodType, interestCalculationType, interestCalculationDaysInYearType, minDepositTerm, minDepositTermTypeId, accountingRule, depositAmount, charts\n\n" + "Mandatory Fields for Cash based accounting (accountingRule = 2): savingsReferenceAccountId, savingsControlAccountId, interestOnSavingsAccountId, incomeFromFeeAccountId, transfersInSuspenseAccountId, incomeFromPenaltyAccountId\n\n" + "Optional Fields: lockinPeriodFrequency, lockinPeriodFrequencyType, maxDepositTerm, maxDepositTermTypeId, inMultiplesOfDepositTerm, inMultiplesOfDepositTermTypeId, preClosurePenalApplicable, preClosurePenalInterest, preClosurePenalInterestOnTypeId, feeToIncomeAccountMappings, penaltyToIncomeAccountMappings, charges, minDepositAmount, maxDepositAmount, withHoldTax, taxGroupId") @@ -135,7 +138,7 @@ public String create(@Parameter(hidden = true) final String apiRequestBodyAsJson @Path("{productId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update a Recurring Deposit Product", operationId = "updateRecurringDepositProduct", description = "Updates a Recurring Deposit Product") + @Operation(summary = "Update a Recurring Deposit Product", operationId = "updateRecurringDepositProduct", tags = {"Recurring Deposit Product"}, description = "Updates a Recurring Deposit Product") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = RecurringDepositProductsApiResourceSwagger.PutRecurringDepositProductsRequest.class))) @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = RecurringDepositProductsApiResourceSwagger.PutRecurringDepositProductsResponse.class))) }) @@ -153,7 +156,7 @@ public String update(@PathParam("productId") @Parameter(description = "productId @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Recuring Deposit Products", operationId = "retrieveAllRecurringDepositProducts", description = "Lists Recuring Deposit Products\n\n" + @Operation(summary = "List Recuring Deposit Products", operationId = "retrieveAllRecurringDepositProducts", tags = {"Recurring Deposit Product"}, description = "Lists Recuring Deposit Products\n\n" + "Example Requests:\n" + "\n" + "recurringdepositproducts\n" + "\n" + "\n" + "recurringdepositproducts?fields=name") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = RecurringDepositProductsApiResourceSwagger.GetRecurringDepositProductsResponse.class)))) }) @@ -173,7 +176,7 @@ public String retrieveAll(@Context final UriInfo uriInfo) { @GET @Path("{productId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Recurring Deposit Product", operationId = "retrieveOneRecurringDepositProduct", description = "Retrieves a Recurring Deposit Product\n\n" + @Operation(summary = "Retrieve a Recurring Deposit Product", operationId = "retrieveOneRecurringDepositProduct", tags = {"Recurring Deposit Product"}, description = "Retrieves a Recurring Deposit Product\n\n" + "Example Requests:\n" + "\n" + "recurringdepositproducts/1\n" + "\n" + "\n" + "recurringdepositproducts/1?template=true\n" + "\n" + "\n" + "recurringdepositproducts/1?fields=name,description") @ApiResponses({ @@ -218,7 +221,7 @@ public String retrieveOne(@PathParam("productId") @Parameter(description = "prod @GET @Path("template") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Recurring Deposit Product Template", operationId = "retrieveTemplateRecurringDepositProduct") + @Operation(summary = "Retrieve Recurring Deposit Product Template", tags = {"Recurring Deposit Product"}, operationId = "retrieveTemplateRecurringDepositProduct") public String retrieveTemplate(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(DepositsApiConstants.RECURRING_DEPOSIT_PRODUCT_RESOURCE_NAME); @@ -314,7 +317,7 @@ private RecurringDepositProductData handleTemplateRelatedData(final RecurringDep @DELETE @Path("{productId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Delete a Recurring Deposit Product", operationId = "deleteRecurringDepositProduct", description = "Deletes a Recurring Deposit Product") + @Operation(summary = "Delete a Recurring Deposit Product", operationId = "deleteRecurringDepositProduct", tags = {"Recurring Deposit Product"}, description = "Deletes a Recurring Deposit Product") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = RecurringDepositProductsApiResourceSwagger.DeleteRecurringDepositProductsProductIdResponse.class))) }) public String delete(@PathParam("productId") @Parameter(description = "productId") final Long productId) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountChargesApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountChargesApiResource.java index d3e6aa58370..38ec562ae83 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountChargesApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountChargesApiResource.java @@ -38,7 +38,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -84,7 +87,7 @@ private boolean is(final String commandParam, final String commandValue) { @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Savings Charges", description = "Lists Savings Charges\n\n" + "Example Requests:\n" + "\n" + @Operation(summary = "List Savings Charges", tags = {"Savings Charges"}, description = "Lists Savings Charges\n\n" + "Example Requests:\n" + "\n" + "savingsaccounts/1/charges\n" + "\n" + "savingsaccounts/1/charges?chargeStatus=all\n" + "\n" + "savingsaccounts/1/charges?chargeStatus=inactive\n" + "\n" + "savingsaccounts/1/charges?chargeStatus=active\n" + "\n" + "savingsaccounts/1/charges?fields=name,amountOrPercentage") @@ -112,7 +115,7 @@ public String retrieveAllSavingsAccountCharges( @GET @Path("template") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Savings Charges Template", operationId = "retrieveTemplateSavingsAccountCharge", 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" + @Operation(summary = "Retrieve Savings Charges Template", operationId = "retrieveTemplateSavingsAccountCharge", tags = {"Savings Charges"}, 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" + "savingsaccounts/1/charges/template") @ApiResponses({ @@ -134,7 +137,7 @@ public String retrieveTemplate(@PathParam("savingsAccountId") @Parameter(descrip @GET @Path("{savingsAccountChargeId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Savings account Charge", description = "Retrieves a Savings account Charge\n\n" + "Example Requests:\n" + @Operation(summary = "Retrieve a Savings account Charge", tags = {"Savings Charges"}, description = "Retrieves a Savings account Charge\n\n" + "Example Requests:\n" + "\n" + "/savingsaccounts/1/charges/5\n" + "\n" + "\n" + "/savingsaccounts/1/charges/5?fields=name,amountOrPercentage") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SavingsAccountChargesApiResourceSwagger.GetSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse.class))) }) @@ -156,7 +159,7 @@ public String retrieveSavingsAccountCharge( @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create a Savings account Charge", description = "Creates a Savings account Charge\n\n" + @Operation(summary = "Create a Savings account Charge", tags = {"Savings Charges"}, description = "Creates a Savings account Charge\n\n" + "Mandatory Fields for Savings account Charges: chargeId, amount\n\n" + "chargeId, amount, dueDate, dateFormat, locale\n\n" + "chargeId, amount, feeOnMonthDay, monthDayFormat, locale") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = SavingsAccountChargesApiResourceSwagger.PostSavingsAccountsSavingsAccountIdChargesRequest.class))) @@ -178,7 +181,7 @@ public String addSavingsAccountCharge( @Path("{savingsAccountChargeId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update a Savings account Charge", description = "Currently Savings account Charges may be updated only if the Savings account is not yet approved.") + @Operation(summary = "Update a Savings account Charge", tags = {"Savings Charges"}, description = "Currently Savings account Charges may be updated only if the Savings account is not yet approved.") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = SavingsAccountChargesApiResourceSwagger.PutSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdRequest.class))) @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SavingsAccountChargesApiResourceSwagger.PutSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse.class))) }) @@ -199,7 +202,7 @@ public String updateSavingsAccountCharge( @Path("{savingsAccountChargeId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Pay a Savings account Charge | Waive off a Savings account Charge | Inactivate a Savings account Charge", description = "Pay a Savings account Charge:\n\n" + @Operation(summary = "Pay a Savings account Charge | Waive off a Savings account Charge | Inactivate a Savings account Charge", tags = {"Savings Charges"}, description = "Pay a Savings account Charge:\n\n" + "An active charge will be paid when savings account is active and having sufficient balance.\n\n" + "Waive off a Savings account Charge:\n\n" + "Outstanding charge amount will be waived off.\n\n" + "Inactivate a Savings account Charge:\n\n" @@ -247,7 +250,7 @@ public String payOrWaiveSavingsAccountCharge( @DELETE @Path("{savingsAccountChargeId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Delete a Savings account Charge", description = "Note: Currently, A Savings account Charge may only be removed from Savings that are not yet approved.") + @Operation(summary = "Delete a Savings account Charge", tags = {"Savings Charges"}, description = "Note: Currently, A Savings account Charge may only be removed from Savings that are not yet approved.") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SavingsAccountChargesApiResourceSwagger.DeleteSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse.class))) }) public String deleteSavingsAccountCharge( diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountTransactionsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountTransactionsApiResource.java index 84fd6896124..3014e7a037d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountTransactionsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountTransactionsApiResource.java @@ -30,7 +30,10 @@ import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -84,7 +87,7 @@ public class SavingsAccountTransactionsApiResource { @GET @Path("template") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a savings account transaction template", operationId = "retrieveTemplateSavingsAccountTransaction") + @Operation(summary = "Retrieve a savings account transaction template", tags = {"Savings Account Transactions"}, operationId = "retrieveTemplateSavingsAccountTransaction") public String retrieveTemplate(@PathParam("savingsId") final Long savingsId, // @QueryParam("command") final String commandParam, @Context final UriInfo uriInfo) { @@ -106,7 +109,7 @@ public String retrieveTemplate(@PathParam("savingsId") final Long savingsId, @GET @Path("{transactionId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a savings account transaction", operationId = "retrieveOneSavingsAccountTransaction") + @Operation(summary = "Retrieve a savings account transaction", tags = {"Savings Account Transactions"}, operationId = "retrieveOneSavingsAccountTransaction") public String retrieveOne(@PathParam("savingsId") final Long savingsId, @PathParam("transactionId") final Long transactionId, @Context final UriInfo uriInfo) { @@ -126,7 +129,7 @@ public String retrieveOne(@PathParam("savingsId") final Long savingsId, @PathPar @GET @Path("search") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Search Savings Account Transactions") + @Operation(tags = {"Savings Account Transactions"}, summary = "Search Savings Account Transactions") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SavingsAccountTransactionsApiResourceSwagger.SavingsAccountTransactionsSearchResponse.class))) public String searchTransactions(@PathParam("savingsId") @Parameter(description = "savings account id") final Long savingsId, @QueryParam("fromDate") @Parameter(description = "minimum value date (inclusive)", example = "2023-08-08") final String fromDate, @@ -158,7 +161,7 @@ public String searchTransactions(@PathParam("savingsId") @Parameter(description @Path("query") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Advanced search Savings Account Transactions", operationId = "advancedQuerySavingsAccountTransactions") + @Operation(summary = "Advanced search Savings Account Transactions", tags = {"Savings Account Transactions"}, operationId = "advancedQuerySavingsAccountTransactions") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = List.class))) public String advancedQuery(@PathParam("savingsId") @Parameter(description = "savingsId") final Long savingsId, PagedLocalRequest queryRequest, @Context final UriInfo uriInfo) { @@ -169,7 +172,7 @@ public String advancedQuery(@PathParam("savingsId") @Parameter(description = "sa @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create a savings account transaction", operationId = "createSavingsAccountTransaction") + @Operation(summary = "Create a savings account transaction", tags = {"Savings Account Transactions"}, operationId = "createSavingsAccountTransaction") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = SavingsAccountTransactionsApiResourceSwagger.PostSavingsAccountTransactionsRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SavingsAccountTransactionsApiResourceSwagger.PostSavingsAccountTransactionsResponse.class))) public String transaction(@PathParam("savingsId") final Long savingsId, @QueryParam("command") final String commandParam, @@ -195,7 +198,7 @@ public String transaction(@PathParam("savingsId") final Long savingsId, @QueryPa @Path("{transactionId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Undo/Reverse/Modify/Release Amount transaction API", operationId = "adjustSavingsAccountTransaction", description = "Undo/Reverse/Modify/Release Amount transaction API\n\n" + @Operation(summary = "Undo/Reverse/Modify/Release Amount transaction API", operationId = "adjustSavingsAccountTransaction", tags = {"Savings Account Transactions"}, description = "Undo/Reverse/Modify/Release Amount transaction API\n\n" + "Example Requests:\n" + "\n" + "\n" + "savingsaccounts/{savingsId}/transactions/{transactionId}?command=reverse\n" + "\n" + "Accepted command = undo, reverse, modify, releaseAmount") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = SavingsAccountTransactionsApiResourceSwagger.PostSavingsAccountBulkReversalTransactionsRequest.class))) diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountsApiResource.java index 66805d08f6c..5d7e9d6169c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountsApiResource.java @@ -31,7 +31,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -98,7 +101,7 @@ public class SavingsAccountsApiResource { @GET @Path("template") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Savings Account Template", operationId = "retrieveSavingsAccountTemplate", 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" + @Operation(summary = "Retrieve Savings Account Template", operationId = "retrieveSavingsAccountTemplate", tags = {"Savings Account"}, 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 Requests:\n" + "\n" + "savingsaccounts/template?clientId=1\n" + "\n" + "\n" + "savingsaccounts/template?clientId=1&productId=1") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SavingsAccountsApiResourceSwagger.GetSavingsAccountsTemplateResponse.class))) @@ -119,7 +122,7 @@ public String template(@QueryParam("clientId") @Parameter(description = "clientI @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List savings applications/accounts", operationId = "retrieveAllSavingsAccounts", description = "Lists savings applications/accounts\n\n" + @Operation(summary = "List savings applications/accounts", operationId = "retrieveAllSavingsAccounts", tags = {"Savings Account"}, description = "Lists savings applications/accounts\n\n" + "Example Requests:\n" + "\n" + "savingsaccounts\n" + "\n" + "\n" + "savingsaccounts?fields=name") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SavingsAccountsApiResourceSwagger.GetSavingsAccountsResponse.class))) public String retrieveAll(@Context final UriInfo uriInfo, @@ -147,7 +150,7 @@ public String retrieveAll(@Context final UriInfo uriInfo, @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Submit new savings application", operationId = "submitSavingsApplication", description = "Submits new savings application\n\n" + @Operation(summary = "Submit new savings application", operationId = "submitSavingsApplication", tags = {"Savings Account"}, description = "Submits new savings application\n\n" + "Mandatory Fields: clientId or groupId, productId, submittedOnDate\n\n" + "Optional Fields: accountNo, externalId, fieldOfficerId\n\n" + "Inherited from Product (if not provided): nominalAnnualInterestRate, interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType, minRequiredOpeningBalance, lockinPeriodFrequency, lockinPeriodFrequencyType, withdrawalFeeForTransfers, allowOverdraft, overdraftLimit, withHoldTax\n\n" @@ -167,6 +170,7 @@ public String submitApplication(@Parameter(hidden = true) final String apiReques @Path("/gsim") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Submit GSIM Application", tags = {"Savings Account"}, description = "Submits a new GSIM application") public String submitGSIMApplication(final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().createGSIMAccount().withJson(apiRequestBodyAsJson).build(); @@ -179,7 +183,7 @@ public String submitGSIMApplication(final String apiRequestBodyAsJson) { @GET @Path("{accountId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a savings account", operationId = "retrieveSavingsAccount") + @Operation(summary = "Retrieve a savings account", tags = {"Savings Account"}, operationId = "retrieveSavingsAccount") public SavingsAccountData retrieveOne(@PathParam("accountId") final Long accountId, @DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") final boolean staffInSelectedOfficeOnly, @DefaultValue("all") @QueryParam("chargeStatus") final String chargeStatus, @@ -191,7 +195,7 @@ public SavingsAccountData retrieveOne(@PathParam("accountId") final Long account @GET @Path("/external-id/{externalId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a savings account by external ID", operationId = "retrieveSavingsAccountByExternalId") + @Operation(summary = "Retrieve a savings account by external ID", tags = {"Savings Account"}, operationId = "retrieveSavingsAccountByExternalId") public SavingsAccountData retrieveOne(@PathParam("externalId") final String externalId, @DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") final boolean staffInSelectedOfficeOnly, @DefaultValue("all") @QueryParam("chargeStatus") final String chargeStatus, @@ -204,7 +208,7 @@ public SavingsAccountData retrieveOne(@PathParam("externalId") final String exte @Path("{accountId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Modify a savings application | Modify savings account withhold tax applicability", operationId = "updateSavingsAccount", description = "Modify a savings application:\n\n" + @Operation(summary = "Modify a savings application | Modify savings account withhold tax applicability", tags = {"Savings Account"},operationId = "updateSavingsAccount", description = "Modify a savings application:\n\n" + "Savings application can only be modified when in 'Submitted and pending approval' state. Once the application is approved, the details cannot be changed using this method. Specific api endpoints will be created to allow change of interest detail such as rate, compounding period, posting period etc\n\n" + "Modify savings account withhold tax applicability:\n\n" + "Savings application's withhold tax can be modified when in 'Active' state. Once the application is activated, can modify the account withhold tax to post tax or vice-versa" @@ -222,7 +226,7 @@ public String update(@PathParam("accountId") @Parameter(description = "accountId @Path("/external-id/{externalId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Modify a savings application | Modify savings account withhold tax applicability by externalId", operationId = "updateSavingsAccountByExternalId", description = "Modify a savings application by externalId:\n\n" + @Operation(tags = {"Savings Account"}, summary = "Modify a savings application | Modify savings account withhold tax applicability by externalId", operationId = "updateSavingsAccountByExternalId", description = "Modify a savings application by externalId:\n\n" + "Savings application can only be modified when in 'Submitted and pending approval' state. Once the application is approved, the details cannot be changed using this method. Specific api endpoints will be created to allow change of interest detail such as rate, compounding period, posting period etc\n\n" + "Modify savings account withhold tax applicability:\n\n" + "Savings application's withhold tax can be modified when in 'Active' state. Once the application is activated, can modify the account withhold tax to post tax or vice-versa" @@ -240,6 +244,7 @@ public String update(@PathParam("externalId") @Parameter(description = "external @Path("/gsim/{parentAccountId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Update GSIM Application", tags = {"Savings Account"}, description = "Updates a GSIM application") public String updateGsim(@PathParam("parentAccountId") final Long parentAccountId, final String apiRequestBodyAsJson) { final CommandWrapper commandRequest = new CommandWrapperBuilder().updateGSIMAccount(parentAccountId).withJson(apiRequestBodyAsJson) .build(); @@ -253,6 +258,7 @@ public String updateGsim(@PathParam("parentAccountId") final Long parentAccountI @Path("/gsimcommands/{parentAccountId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) + @Operation(summary = "Handle GSIM Commands", tags = {"Savings Account"}, description = "Executes specific commands on a GSIM account (e.g., approve, reject)") public String handleGSIMCommands(@PathParam("parentAccountId") final Long parentAccountId, @QueryParam("command") final String commandParam, final String apiRequestBodyAsJson) { @@ -308,7 +314,7 @@ public String handleGSIMCommands(@PathParam("parentAccountId") final Long parent @Path("{accountId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Approve savings application | Undo approval savings application | Assign Savings Officer | Unassign Savings Officer | Reject savings application | Withdraw savings application | Activate a savings account | Close a savings account | Calculate Interest on Savings Account | Post Interest on Savings Account | Block Savings Account | Unblock Savings Account | Block Savings Account Credit transactions | Unblock Savings Account Credit transactions | Block Savings Account Debit transactions | Unblock Savings Account debit transactions", description = "Approve savings application:\n\n" + @Operation(tags = {"Savings Account"}, summary = "Approve savings application | Undo approval savings application | Assign Savings Officer | Unassign Savings Officer | Reject savings application | Withdraw savings application | Activate a savings account | Close a savings account | Calculate Interest on Savings Account | Post Interest on Savings Account | Block Savings Account | Unblock Savings Account | Block Savings Account Credit transactions | Unblock Savings Account Credit transactions | Block Savings Account Debit transactions | Unblock Savings Account debit transactions", description = "Approve savings application:\n\n" + "Approves savings application so long as its in 'Submitted and pending approval' state.\n\n" + "Undo approval savings application:\n\n" + "Will move 'approved' savings application back to 'Submitted and pending approval' state.\n\n" + "Assign Savings Officer:\n\n" @@ -353,7 +359,7 @@ public String handleCommands(@PathParam("accountId") @Parameter(description = "a @Path("/external-id/{externalId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Approve savings application | Undo approval savings application | Assign Savings Officer | Unassign Savings Officer | Reject savings application | Withdraw savings application | Activate a savings account | Close a savings account | Calculate Interest on Savings Account | Post Interest on Savings Account | Block Savings Account | Unblock Savings Account | Block Savings Account Credit transactions | Unblock Savings Account Credit transactions | Block Savings Account Debit transactions | Unblock Savings Account debit transactions", description = "Approve savings application:\n\n" + @Operation(tags = {"Savings Account"}, summary = "Approve savings application | Undo approval savings application | Assign Savings Officer | Unassign Savings Officer | Reject savings application | Withdraw savings application | Activate a savings account | Close a savings account | Calculate Interest on Savings Account | Post Interest on Savings Account | Block Savings Account | Unblock Savings Account | Block Savings Account Credit transactions | Unblock Savings Account Credit transactions | Block Savings Account Debit transactions | Unblock Savings Account debit transactions", description = "Approve savings application:\n\n" + "Approves savings application so long as its in 'Submitted and pending approval' state.\n\n" + "Undo approval savings application:\n\n" + "Will move 'approved' savings application back to 'Submitted and pending approval' state.\n\n" + "Assign Savings Officer:\n\n" @@ -401,7 +407,7 @@ private boolean is(final String commandParam, final String commandValue) { @DELETE @Path("{accountId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Delete a savings application", operationId = "deleteSavingsAccount", description = "At present we support hard delete of savings application so long as its in 'Submitted and pending approval' state. One the application is moves past this state, it is not possible to do a 'hard' delete of the application or the account. An API endpoint will be added to close/de-activate the savings account.") + @Operation(summary = "Delete a savings application", operationId = "deleteSavingsAccount", tags = {"Savings Account"}, description = "At present we support hard delete of savings application so long as its in 'Submitted and pending approval' state. One the application is moves past this state, it is not possible to do a 'hard' delete of the application or the account. An API endpoint will be added to close/de-activate the savings account.") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SavingsAccountsApiResourceSwagger.DeleteSavingsAccountsAccountIdResponse.class))) public String delete(@PathParam("accountId") @Parameter(description = "accountId") final Long accountId) { @@ -411,7 +417,7 @@ public String delete(@PathParam("accountId") @Parameter(description = "accountId @DELETE @Path("/external-id/{externalId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Delete a savings application by externalId", operationId = "deleteSavingsAccountByExternalId", description = "At present we support hard delete of savings application so long as its in 'Submitted and pending approval' state. One the application is moves past this state, it is not possible to do a 'hard' delete of the application or the account. An API endpoint will be added to close/de-activate the savings account.") + @Operation(summary = "Delete a savings application by externalId", tags = {"Savings Account"}, operationId = "deleteSavingsAccountByExternalId", description = "At present we support hard delete of savings application so long as its in 'Submitted and pending approval' state. One the application is moves past this state, it is not possible to do a 'hard' delete of the application or the account. An API endpoint will be added to close/de-activate the savings account.") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SavingsAccountsApiResourceSwagger.DeleteSavingsAccountsAccountIdResponse.class))) public String delete(@PathParam("externalId") @Parameter(description = "externalId") final String externalId) { @@ -421,6 +427,7 @@ public String delete(@PathParam("externalId") @Parameter(description = "external @GET @Path("downloadtemplate") @Produces("application/vnd.ms-excel") + @Operation(summary = "Download Savings Account Template", tags = {"Savings Account"}, description = "Returns a template for bulk savings account import in Excel format") public Response getSavingsTemplate(@QueryParam("officeId") final Long officeId, @QueryParam("staffId") final Long staffId, @QueryParam("dateFormat") final String dateFormat) { return bulkImportWorkbookPopulatorService.getTemplate(GlobalEntityType.SAVINGS_ACCOUNT.toString(), officeId, staffId, dateFormat); @@ -431,6 +438,7 @@ public Response getSavingsTemplate(@QueryParam("officeId") final Long officeId, @Consumes(MediaType.MULTIPART_FORM_DATA) @RequestBody(description = "Upload savings template", content = { @Content(mediaType = MediaType.MULTIPART_FORM_DATA, schema = @Schema(implementation = UploadRequest.class)) }) + @Operation(summary = "Upload Savings Account Template", tags = {"Savings Account"}, description = "Uploads a savings account template for processing") public String postSavingsTemplate(@FormDataParam("file") InputStream uploadedInputStream, @FormDataParam("file") FormDataContentDisposition fileDetail, @FormDataParam("locale") final String locale, @FormDataParam("dateFormat") final String dateFormat) { @@ -442,6 +450,7 @@ public String postSavingsTemplate(@FormDataParam("file") InputStream uploadedInp @GET @Path("transactions/downloadtemplate") @Produces("application/vnd.ms-excel") + @Operation(summary = "Download savings transaction template", description = "Downloads an Excel template for bulk savings transaction imports based on office ID and date format.", tags = {"Savings Account"}) public Response getSavingsTransactionTemplate(@QueryParam("officeId") final Long officeId, @QueryParam("dateFormat") final String dateFormat) { return bulkImportWorkbookPopulatorService.getTemplate(GlobalEntityType.SAVINGS_TRANSACTIONS.toString(), officeId, null, dateFormat); @@ -452,6 +461,8 @@ public Response getSavingsTransactionTemplate(@QueryParam("officeId") final Long @Consumes(MediaType.MULTIPART_FORM_DATA) @RequestBody(description = "Upload savings transaction template", content = { @Content(mediaType = MediaType.MULTIPART_FORM_DATA, schema = @Schema(implementation = UploadRequest.class)) }) + @Operation(summary = "Upload savings transaction template", description = "Uploads a filled Excel template to process multiple savings transactions simultaneously.", tags = {"Savings Account"} +) public String postSavingsTransactionTemplate(@FormDataParam("file") InputStream uploadedInputStream, @FormDataParam("file") FormDataContentDisposition fileDetail, @FormDataParam("locale") final String locale, @FormDataParam("dateFormat") final String dateFormat) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsProductsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsProductsApiResource.java index a0ceb51a91f..ecb8bc97a5a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsProductsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsProductsApiResource.java @@ -31,7 +31,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Context; @@ -103,7 +106,7 @@ public class SavingsProductsApiResource { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create a Savings Product", operationId = "createSavingsProduct", description = "Creates a Savings Product\n\n" + @Operation(summary = "Create a Savings Product", operationId = "createSavingsProduct", tags = {"Savings Product"}, description = "Creates a Savings Product\n\n" + "Mandatory Fields: name, shortName, description, currencyCode, digitsAfterDecimal,inMultiplesOf, nominalAnnualInterestRate, interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType,accountingRule\n\n" + "Mandatory Fields for Cash based accounting (accountingRule = 2): savingsReferenceAccountId, savingsControlAccountId, interestOnSavingsAccountId, incomeFromFeeAccountId, transfersInSuspenseAccountId, incomeFromPenaltyAccountId\n\n" + "Optional Fields: minRequiredOpeningBalance, lockinPeriodFrequency, lockinPeriodFrequencyType, withdrawalFeeForTransfers, paymentChannelToFundSourceMappings, feeToIncomeAccountMappings, penaltyToIncomeAccountMappings, charges, allowOverdraft, overdraftLimit, minBalanceForInterestCalculation,withHoldTax,taxGroupId,accountMapping, lienAllowed, maxAllowedLienLimit") @@ -122,7 +125,7 @@ public String create(@Parameter(hidden = true) final String apiRequestBodyAsJson @Path("{productId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update a Savings Product", operationId = "updateSavingsProduct", description = "Updates a Savings Product") + @Operation(summary = "Update a Savings Product", operationId = "updateSavingsProduct", tags = {"Savings Product"}, description = "Updates a Savings Product") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = SavingsProductsApiResourceSwagger.PutSavingsProductsProductIdRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SavingsProductsApiResourceSwagger.PutSavingsProductsProductIdResponse.class))) public String update(@PathParam("productId") @Parameter(description = "productId") final Long productId, @@ -139,7 +142,7 @@ public String update(@PathParam("productId") @Parameter(description = "productId @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Savings Products", operationId = "retrieveAllSavingsProducts", description = "Lists Savings Products\n\n" + @Operation(summary = "List Savings Products", operationId = "retrieveAllSavingsProducts", tags = {"Savings Product"}, description = "Lists Savings Products\n\n" + "Example Requests:\n" + "\n" + "savingsproducts\n" + "\n" + "savingsproducts?fields=name") @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = SavingsProductsApiResourceSwagger.GetSavingsProductsResponse.class)))) public String retrieveAll(@Context final UriInfo uriInfo) { @@ -155,7 +158,7 @@ public String retrieveAll(@Context final UriInfo uriInfo) { @GET @Path("{productId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Savings Product", operationId = "retrieveOneSavingsProduct", description = "Retrieves a Savings Product\n\n" + @Operation(summary = "Retrieve a Savings Product", operationId = "retrieveOneSavingsProduct", tags = {"Savings Product"}, description = "Retrieves a Savings Product\n\n" + "Example Requests:\n" + "\n" + "savingsproducts/1\n" + "\n" + "savingsproducts/1?template=true\n" + "\n" + "savingsproducts/1?fields=name,description") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SavingsProductsApiResourceSwagger.GetSavingsProductsProductIdResponse.class))) @@ -196,7 +199,7 @@ public String retrieveOne(@PathParam("productId") @Parameter(description = "prod @GET @Path("template") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve Savings Product Template", operationId = "retrieveTemplateSavingsProduct", 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" + @Operation(summary = "Retrieve Savings Product Template", operationId = "retrieveTemplateSavingsProduct", tags = {"Savings Product"}, 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" + "Account Mapping:\n" + "\n" + "savingsproducts/template") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SavingsProductsApiResourceSwagger.GetSavingsProductsTemplateResponse.class))) @@ -287,7 +290,7 @@ private SavingsProductData handleTemplateRelatedData(final SavingsProductData sa @DELETE @Path("{productId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Delete a Savings Product", operationId = "deleteSavingsProduct", description = "Deletes a Savings Product") + @Operation(summary = "Delete a Savings Product", operationId = "deleteSavingsProduct", tags = {"Savings Product"}, description = "Deletes a Savings Product") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SavingsProductsApiResourceSwagger.DeleteSavingsProductsProductIdResponse.class))) public String delete(@PathParam("productId") @Parameter(description = "productId") final Long productId) { 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 078ae74b181..2769e0f4725 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 @@ -30,7 +30,10 @@ import jakarta.ws.rs.DefaultValue; import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; import jakarta.ws.rs.core.MediaType; @@ -56,7 +59,7 @@ public class SearchApiResource { @GET @Path("/template") - @Operation(summary = "Retrive Adhoc Search query template", description = """ + @Operation(summary = "Retrive Adhoc Search query template", tags = {"Search API"}, description = """ Mandatory Fields search?query=000000001 @@ -67,7 +70,7 @@ public AdHocSearchQueryData retrieveAdHocSearchQueryTemplate() { } @GET - @Operation(summary = "Search Resources", description = """ + @Operation(summary = "Search Resources", tags = {"Search API"}, description = """ Example Requests: search?query=000000001 @@ -92,7 +95,7 @@ public List searchData(@QueryParam("query") @Parameter(description = @POST @Path("/advance") @Consumes({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Adhoc query search", description = """ + @Operation(summary = "Adhoc query search", tags = {"Search API"}, description = """ AdHocQuery search has more search options, it is a POST request, \ it uses request body to send search parameters 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 924ac532f84..ea381acaa43 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 @@ -25,7 +25,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -66,7 +69,7 @@ public class ShareDividendApiResource { @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List all share dividends", operationId = "retrieveAllShareDividends") + @Operation(summary = "List all share dividends", tags = {"Self Dividend"}, operationId = "retrieveAllShareDividends") public String retrieveAll(@PathParam("productId") final Long productId, @QueryParam("offset") final Integer offset, @QueryParam("limit") final Integer limit, @QueryParam("orderBy") final String orderBy, @QueryParam("sortOrder") final String sortOrder, @QueryParam("status") final Integer status) { @@ -84,7 +87,7 @@ public String retrieveAll(@PathParam("productId") final Long productId, @QueryPa @GET @Path("{dividendId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a share dividend", operationId = "retrieveOneShareDividend") + @Operation(summary = "Retrieve a share dividend", tags = {"Self Dividend"}, operationId = "retrieveOneShareDividend") 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, @@ -104,7 +107,7 @@ public String retrieveDividendDetails(@PathParam("dividendId") final Long divide @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create a share dividend", operationId = "createShareDividend") + @Operation(summary = "Create a share dividend", tags = {"Self Dividend"}, operationId = "createShareDividend") public String createDividendDetail(@PathParam("productId") final Long productId, final String apiRequestBodyAsJson) { this.platformSecurityContext.authenticatedUser(); CommandWrapper commandWrapper = new CommandWrapperBuilder().createShareProductDividendPayoutCommand(productId) @@ -117,7 +120,7 @@ public String createDividendDetail(@PathParam("productId") final Long productId, @Path("{dividendId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update a share dividend", operationId = "updateShareDividend") + @Operation(summary = "Update a share dividend", tags = {"Self Dividend"}, operationId = "updateShareDividend") public String updateDividendDetail(@PathParam("productId") final Long productId, @PathParam("dividendId") final Long dividendId, @QueryParam("command") final String commandParam, final String apiRequestBodyAsJson) { CommandWrapper commandWrapper; @@ -135,7 +138,7 @@ public String updateDividendDetail(@PathParam("productId") final Long productId, @DELETE @Path("{dividendId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Delete a share dividend", operationId = "deleteShareDividend") + @Operation(summary = "Delete a share dividend", tags = {"Self Dividend"}, operationId = "deleteShareDividend") public String deleteDividendDetail(@PathParam("productId") final Long productId, @PathParam("dividendId") final Long dividendId) { this.platformSecurityContext.authenticatedUser(); final CommandWrapper commandWrapper = new CommandWrapperBuilder().deleteShareProductDividendPayoutCommand(productId, dividendId) 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 12f17760e7d..54478c03e0e 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 @@ -28,7 +28,10 @@ import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; @@ -60,7 +63,7 @@ public class LookupTableApiResource { @GET @Produces({ MediaType.APPLICATION_JSON }) @Transactional - @Operation(summary = "List all Lookup Table entries", description = "List all Lookup Table entries for a survey.") + @Operation(summary = "List all Lookup Table entries", tags = {"SPM API - LookUp Table"}, description = "List all Lookup Table entries for a survey.") @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(); @@ -80,7 +83,7 @@ public List fetchLookupTables(@PathParam("surveyId") @Parameter @Path("/{key}") @Produces({ MediaType.APPLICATION_JSON }) @Transactional - @Operation(summary = "Retrieve a Lookup Table entry", description = "Retrieve a Lookup Table entry for a survey.") + @Operation(summary = "Retrieve a Lookup Table entry", tags = {"SPM API - LookUp Table"}, description = "Retrieve a Lookup Table entry for a survey.") @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) { @@ -101,7 +104,7 @@ public LookupTableData findLookupTable(@PathParam("surveyId") @Parameter(descrip @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @Transactional - @Operation(summary = "Create a Lookup Table entry", description = "Add a new entry to a survey.\n" + "\n" + "Mandatory Fields\n" + @Operation(summary = "Create a Lookup Table entry", tags = {"SPM API - LookUp Table"}, description = "Add a new entry to a survey.\n" + "\n" + "Mandatory Fields\n" + "key, score, validFrom, validTo") @ApiResponse(responseCode = "200", description = "OK") public void createLookupTable(@PathParam("surveyId") @Parameter(description = "Enter surveyId") final Long surveyId, 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 20ef3015e29..ddbe937dc34 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 @@ -29,7 +29,10 @@ import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; @@ -65,7 +68,7 @@ public class ScorecardApiResource { @Path("{surveyId}") @Produces({ MediaType.APPLICATION_JSON }) @Transactional - @Operation(summary = "List all Scorecard entries", description = "List all Scorecard entries for a survey.") + @Operation(summary = "List all Scorecard entries", tags = {"Score Card"}, description = "List all Scorecard entries for a survey.") @ApiResponses({ @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) { @@ -79,7 +82,7 @@ public List findBySurvey(@PathParam("surveyId") @Parameter(descri @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @Transactional - @Operation(summary = "Create a Scorecard entry", description = "Add a new entry to a survey.\n" + "\n" + "Mandatory Fields\n" + @Operation(summary = "Create a Scorecard entry", tags = {"Score Card"}, description = "Add a new entry to a survey.\n" + "\n" + "Mandatory Fields\n" + "clientId, createdOn, questionId, responseId, staffId") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK") }) public void createScorecard(@PathParam("surveyId") @Parameter(description = "Enter surveyId") final Long surveyId, @@ -94,6 +97,7 @@ public void createScorecard(@PathParam("surveyId") @Parameter(description = "Ent @Path("{surveyId}/clients/{clientId}") @Produces({ MediaType.APPLICATION_JSON }) @Transactional + @Operation(summary = "Find Scorecard by Survey and Client", description = "Returns a list of scorecard entries for a specific survey and client.", tags = {"Score Card"}) public List findBySurveyAndClient(@PathParam("surveyId") @Parameter(description = "Enter surveyId") final Long surveyId, @PathParam("clientId") @Parameter(description = "Enter clientId") final Long clientId) { this.securityContext.authenticatedUser(); @@ -107,6 +111,7 @@ public List findBySurveyAndClient(@PathParam("surveyId") @Paramet @Path("clients/{clientId}") @Produces({ MediaType.APPLICATION_JSON }) @Transactional + @Operation(summary = "Find Scorecard by Client", description = "Returns a list of scorecard entries for a specific client.", tags = {"Score Card"}) public List findByClient(@PathParam("clientId") final Long clientId) { this.securityContext.authenticatedUser(); this.clientRepositoryWrapper.findOneWithNotFoundDetection(clientId); 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 0b352cf269e..50af2be5bcf 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 @@ -31,7 +31,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -61,7 +64,7 @@ public class SpmApiResource { @GET @Produces({ MediaType.APPLICATION_JSON }) @Transactional - @Operation(summary = "List all Surveys", operationId = "fetchAllSurveys", description = "") + @Operation(summary = "List all Surveys", operationId = "fetchAllSurveys", tags = {"Spm-Surveys"}, description = "") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = SurveyData.class)))) }) public List fetchAllSurveys(@QueryParam("isActive") final Boolean isActive) { @@ -85,7 +88,7 @@ public List fetchAllSurveys(@QueryParam("isActive") final Boolean is @Path("/{id}") @Produces({ MediaType.APPLICATION_JSON }) @Transactional - @Operation(summary = "Retrieve a Survey", description = "") + @Operation(summary = "Retrieve a Survey", tags = {"Spm-Surveys"}, description = "") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SurveyData.class))) }) public SurveyData findSurvey(@PathParam("id") @Parameter(description = "Enter id") final Long id) { @@ -98,7 +101,7 @@ public SurveyData findSurvey(@PathParam("id") @Parameter(description = "Enter id @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @Transactional - @Operation(summary = "Create a Survey", description = "Adds a new survey to collect client related data.\n" + "\n" + @Operation(summary = "Create a Survey", tags = {"Spm-Surveys"}, description = "Adds a new survey to collect client related data.\n" + "\n" + "Mandatory Fields\n" + "\n" + "countryCode, key, name, questions, responses, sequenceNo, text, description") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK") }) public String createSurvey(@Parameter(description = "Create survey") final SurveyData surveyData) { @@ -114,6 +117,7 @@ public String createSurvey(@Parameter(description = "Create survey") final Surve @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @Transactional + @Operation(summary = "Edit a Survey", description = "Updates the details of an existing survey.", tags = {"Spm-Surveys"}) public String editSurvey(@PathParam("id") final Long id, final SurveyData surveyData) { this.securityContext.authenticatedUser(); final Survey surveyToUpdate = this.spmService.findById(id); @@ -127,7 +131,7 @@ public String editSurvey(@PathParam("id") final Long id, final SurveyData survey @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) @Transactional - @Operation(summary = "Deactivate Survey", description = "") + @Operation(summary = "Deactivate Survey", tags = {"Spm-Surveys"}, description = "") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK") }) public void activateOrDeactivateSurvey(@PathParam("id") final Long id, @QueryParam("command") final String command) { this.securityContext.authenticatedUser(); 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 771173315a4..bd8cb5442cb 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 @@ -32,7 +32,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -91,7 +94,7 @@ public class TemplatesApiResource { private final PortfolioCommandSourceWritePlatformService commandsSourceWritePlatformService; @GET - @Operation(summary = "Retrieve all UGDs", description = "Example Requests:\n" + "\n" + "templates\n" + "\n" + @Operation(summary = "Retrieve all UGDs", tags = {"User Generated Documents"}, description = "Example Requests:\n" + "\n" + "templates\n" + "\n" + "It is also possible to get specific UGDs by entity and type:\n" + "\n" + "templates?type=0&entity=0\n" + "[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") @@ -118,7 +121,7 @@ public String retrieveAll(@DefaultValue("-1") @QueryParam("typeId") @Parameter(d @GET @Path(PARAM_TEMPLATE) - @Operation(summary = "Retrieve UGD Details Template", description = "This is a convenience resource. It can be useful when building maintenance user interface screens for UGDs. The UGD data returned consists of any or all of:\n" + @Operation(summary = "Retrieve UGD Details Template", tags = {"User Generated Documents"}, description = "This is a convenience resource. It can be useful when building maintenance user interface screens for UGDs. The UGD data returned consists of any or all of:\n" + "\n" + "ARGUMENTS\n" + "name String entity String type String text String optional mappers Mapper optional\n" + "Example Request:\n" + "\n" + "templates/template") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TemplatesApiResourcesSwagger.GetTemplatesTemplateResponse.class))) @@ -134,7 +137,7 @@ public String template(@Context final UriInfo uriInfo) { @POST @Consumes({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Add a UGD", description = "Adds a new UGD.\n" + "\n" + "Mandatory Fields\n" + "name\n\n\n\n" + @Operation(summary = "Add a UGD", tags = {"User Generated Documents"}, description = "Adds a new UGD.\n" + "\n" + "Mandatory Fields\n" + "name\n\n\n\n" + "Example Requests:\n" + "\n" + "templates/1") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = TemplatesApiResourcesSwagger.PostTemplatesRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TemplatesApiResourcesSwagger.PostTemplatesResponse.class))) @@ -148,7 +151,7 @@ public String createTemplate(@Parameter(hidden = true) final String apiRequestBo @GET @Path("{templateId}") - @Operation(summary = "Retrieve a UGD", description = "Example Requests:\n" + "\n" + "templates/1") + @Operation(summary = "Retrieve a UGD", tags = {"User Generated Documents"}, description = "Example Requests:\n" + "\n" + "templates/1") @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) { @@ -163,6 +166,7 @@ public String retrieveOne(@PathParam("templateId") @Parameter(description = "tem @GET @Path("{templateId}/template") + @Operation(summary = "Retrieve a UGD template", description = "Returns the template details for a specific user generated document.", tags = {"User Generated Documents"}) public String getTemplateByTemplate(@PathParam("templateId") final Long templateId, @Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSION); @@ -176,7 +180,7 @@ public String getTemplateByTemplate(@PathParam("templateId") final Long template @PUT @Path("{templateId}") @Consumes({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update a UGD", description = "") + @Operation(summary = "Update a UGD", tags = {"User Generated Documents"}, description = "") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = TemplatesApiResourcesSwagger.PutTemplatesTemplateIdRequest.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, @@ -191,7 +195,7 @@ public String saveTemplate(@PathParam("templateId") @Parameter(description = "te @DELETE @Path("{templateId}") - @Operation(summary = "Delete a UGD", description = "") + @Operation(summary = "Delete a UGD", tags = {"User Generated Documents"}, description = "") @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TemplatesApiResourcesSwagger.DeleteTemplatesTemplateIdResponse.class))) public String deleteTemplate(@PathParam("templateId") @Parameter(description = "templateId") final Long templateId) { @@ -206,6 +210,7 @@ public String deleteTemplate(@PathParam("templateId") @Parameter(description = " @Path("{templateId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.TEXT_HTML }) + @Operation(summary = "Merge a UGD template", description = "Merges a specific user generated document template with provided data to generate a document.", tags = {"User Generated Documents"}) public String mergeTemplate(@PathParam("templateId") final Long templateId, @Context final UriInfo uriInfo, final String apiRequestBodyAsJson) throws IOException { 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 588f0730cb2..c214d3e803a 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 @@ -30,7 +30,10 @@ import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Context; import jakarta.ws.rs.core.MediaType; @@ -67,6 +70,7 @@ public class PasswordPreferencesApiResource { @Produces({ MediaType.APPLICATION_JSON }) @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = PasswordPreferencesApiResourceSwagger.GetPasswordPreferencesTemplateResponse.class))) }) + @Operation(summary = "List Password Preferences", description = "Returns the password policies and their current status (active/inactive).", tags = {"Password preferences"}) public String retrieve(@Context final UriInfo uriInfo) { this.context.authenticatedUser().validateHasReadPermission(PasswordPreferencesApiConstants.ENTITY_NAME); @@ -82,7 +86,7 @@ public String retrieve(@Context final UriInfo uriInfo) { @PUT @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update password preferences", description = "") + @Operation(summary = "Update password preferences", tags = {"Password preferences"}, description = "") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = PasswordPreferencesApiResourceSwagger.PutPasswordPreferencesTemplateRequest.class))) @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK") }) public String update(@Parameter(hidden = true) final String apiRequestBodyAsJson) { @@ -100,7 +104,7 @@ public String update(@Parameter(hidden = true) final String apiRequestBodyAsJson @GET @Path("/template") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Application Password validation policies", description = "ARGUMENTS\n" + "Example Requests:\n" + "\n" + @Operation(summary = "List Application Password validation policies", tags = {"Password preferences"}, description = "ARGUMENTS\n" + "Example Requests:\n" + "\n" + "passwordpreferences") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = PasswordPreferencesApiResourceSwagger.GetPasswordPreferencesTemplateResponse.class)))) }) 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 bd8b2354829..42828e95975 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 @@ -30,7 +30,10 @@ import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Context; import jakarta.ws.rs.core.MediaType; @@ -72,7 +75,7 @@ public class PermissionsApiResource { @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Application Permissions", description = "ARGUMENTS\n" + @Operation(summary = "List Application Permissions", tags = {"Permissions"}, description = "ARGUMENTS\n" + "makerCheckerableoptional, Values are true, false. Default is false.\n" + "If makerCheckerable=false or not supplied then a list of application permissions is returned. The \"selected\" attribute is always true in this case.\n" + "\n" @@ -100,7 +103,7 @@ public String retrieveAllPermissions(@Context final UriInfo uriInfo) { @PUT @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Enable/Disable Permissions for Maker Checker", description = "") + @Operation(summary = "Enable/Disable Permissions for Maker Checker", tags = {"Permissions"}, description = "") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = PermissionsApiResourceSwagger.PutPermissionsRequest.class))) @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CommandProcessingResult.class))) }) 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 65e1df03229..3374ac38930 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 @@ -33,7 +33,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -97,7 +100,7 @@ public class RolesApiResource { @GET @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "List Roles", description = "Example Requests:\n" + "\n" + "roles\n" + "\n" + "\n" + "roles?fields=name") + @Operation(summary = "List Roles", tags = {"Roles"}, description = "Example Requests:\n" + "\n" + "roles\n" + "\n" + "\n" + "roles?fields=name") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = RolesApiResourceSwagger.GetRolesResponse.class)))) }) public String retrieveAllRoles(@Context final UriInfo uriInfo) { @@ -113,7 +116,7 @@ public String retrieveAllRoles(@Context final UriInfo uriInfo) { @POST @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Create a New Role", description = "Mandatory Fields\n" + "name, description") + @Operation(summary = "Create a New Role", tags = {"Roles"}, description = "Mandatory Fields\n" + "name, description") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = RolesApiResourceSwagger.PostRolesRequest.class))) @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = RolesApiResourceSwagger.PostRolesResponse.class))) }) @@ -132,7 +135,7 @@ public String createRole(@Parameter(hidden = true) final String apiRequestBodyAs @GET @Path("{roleId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Role", description = "Example Requests:\n" + "\n" + "roles/1\n" + "\n" + "\n" + "roles/1?fields=name") + @Operation(summary = "Retrieve a Role", tags = {"Roles"}, description = "Example Requests:\n" + "\n" + "roles/1\n" + "\n" + "\n" + "roles/1?fields=name") @ApiResponses({ @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) { @@ -158,7 +161,7 @@ public String retrieveRole(@PathParam("roleId") @Parameter(description = "roleId @Path("{roleId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Enable Role | Disable Role", description = "Description : Enable role in case role is disabled. | Disable the role in case role is not associated with any users.\n\n\n\n" + @Operation(summary = "Enable Role | Disable Role", tags = {"Roles"}, description = "Description : Enable role in case role is disabled. | Disable the role in case role is not associated with any users.\n\n\n\n" + "\n\n" + "Example Request: https://DomainName/api/v1/roles/{roleId}?command=enable" + "\n\n\n\n" + "\n\n" + "https://DomainName/api/v1/roles/{roleId}?command=disable") @Parameters({ @Parameter(description = "No Request Body", name = "No Request Body") }) @@ -186,7 +189,7 @@ public String actionsOnRoles(@PathParam("roleId") @Parameter(description = "role @Path("{roleId}") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update a Role", description = "") + @Operation(summary = "Update a Role", tags = {"Roles"}, description = "") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = RolesApiResourceSwagger.PutRolesRoleIdRequest.class))) @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = RolesApiResourceSwagger.PutRolesRoleIdResponse.class))) }) @@ -206,7 +209,7 @@ public String updateRole(@PathParam("roleId") @Parameter(description = "roleId") @GET @Path("{roleId}/permissions") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Retrieve a Role's Permissions", description = "Example Requests:\n" + "\n" + "roles/1/permissions") + @Operation(summary = "Retrieve a Role's Permissions", tags = {"Roles"}, description = "Example Requests:\n" + "\n" + "roles/1/permissions") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = RolesApiResourceSwagger.GetRolesRoleIdPermissionsResponse.class))) }) public String retrieveRolePermissions(@PathParam("roleId") @Parameter(description = "roleId") final Long roleId, @@ -226,7 +229,7 @@ public String retrieveRolePermissions(@PathParam("roleId") @Parameter(descriptio @Path("{roleId}/permissions") @Consumes({ MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Update a Role's Permissions", description = "") + @Operation(summary = "Update a Role's Permissions", tags = {"Roles"}, description = "") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = RolesApiResourceSwagger.PutRolesRoleIdPermissionsRequest.class))) @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = RolesApiResourceSwagger.PutRolesRoleIdPermissionsResponse.class))) }) @@ -252,7 +255,7 @@ public String updateRolePermissions(@PathParam("roleId") @Parameter(description @DELETE @Path("{roleId}") @Produces({ MediaType.APPLICATION_JSON }) - @Operation(summary = "Delete a Role", description = "Description : Delete the role in case role is not associated with any users.") + @Operation(summary = "Delete a Role", tags = {"Roles"}, description = "Description : Delete the role in case role is not associated with any users.") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = RolesApiResourceSwagger.DeleteRolesRoleIdResponse.class))) }) public String deleteRole(@PathParam("roleId") @Parameter(description = "roleId") final Long roleId) { 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 513c71ac87a..595267f09cc 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 @@ -32,7 +32,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; @@ -90,7 +93,7 @@ public class UsersApiResource { private final BulkImportWorkbookService bulkImportWorkbookService; @GET - @Operation(summary = "Retrieve list of users", operationId = "retrieveAllUsers", description = "Example Requests:\n" + "\n" + "users\n" + @Operation(summary = "Retrieve list of users", operationId = "retrieveAllUsers", tags = {"Users"}, description = "Example Requests:\n" + "\n" + "users\n" + "\n" + "\n" + "users?fields=id,username,email,officeName") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = UsersApiResourceSwagger.GetUsersResponse.class)))) }) @@ -107,7 +110,7 @@ public String retrieveAll(@Context final UriInfo uriInfo) { @GET @Path("{userId}") - @Operation(summary = "Retrieve a User", operationId = "retrieveOneUser", description = "Example Requests:\n" + "\n" + "users/1\n" + "\n" + @Operation(summary = "Retrieve a User", operationId = "retrieveOneUser", tags = {"Users"}, 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 = "OK", content = @Content(schema = @Schema(implementation = UsersApiResourceSwagger.GetUsersUserIdResponse.class))) }) @@ -129,7 +132,7 @@ public String retrieveOne(@PathParam("userId") @Parameter(description = "userId" @GET @Path("template") - @Operation(summary = "Retrieve User Details Template", operationId = "retrieveTemplateUser", 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" + @Operation(summary = "Retrieve User Details Template", operationId = "retrieveTemplateUser", tags = {"Users"}, 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 = "OK", content = @Content(schema = @Schema(implementation = UsersApiResourceSwagger.GetUsersTemplateResponse.class))) }) @@ -145,7 +148,7 @@ public String template(@Context final UriInfo uriInfo) { } @POST - @Operation(summary = "Create a User", operationId = "createUser", description = "Adds new application user.\n" + "\n" + @Operation(summary = "Create a User", operationId = "createUser", tags = {"Users"}, description = "Adds new application user.\n" + "\n" + "Note: Password information is not required (or processed). Password details at present are auto-generated and then sent to the email account given (which is why it can take a few seconds to complete).\n" + "\n" + "Mandatory Fields: \n" + "username, firstname, lastname, email, officeId, roles, sendPasswordToEmail\n" + "\n" + "Optional Fields: \n" + "staffId,passwordNeverExpires,isLoginRetriesEnabled") @@ -168,7 +171,7 @@ public String create(@Parameter(hidden = true) final String apiRequestBodyAsJson @PUT @Path("{userId}") - @Operation(summary = "Update a User", operationId = "updateUser", description = "Updates the user") + @Operation(summary = "Update a User", operationId = "updateUser", tags = {"Users"}, description = "Updates the user") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = UsersApiResourceSwagger.PutUsersUserIdRequest.class))) @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = UsersApiResourceSwagger.PutUsersUserIdResponse.class))) }) @@ -189,7 +192,7 @@ public String update(@PathParam("userId") @Parameter(description = "userId") fin @POST @Path("{userId}/pwd") - @Operation(summary = "Change the password of a User", operationId = "changePasswordUser", description = "When updating a password you must provide the repeatPassword parameter also.") + @Operation(summary = "Change the password of a User", operationId = "changePasswordUser", tags = {"Users"}, description = "When updating a password you must provide the repeatPassword parameter also.") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = UsersApiResourceSwagger.ChangePwdUsersUserIdRequest.class))) @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = UsersApiResourceSwagger.ChangePwdUsersUserIdResponse.class))) }) @@ -210,7 +213,7 @@ public String changePassword(@PathParam("userId") @Parameter(description = "user @DELETE @Path("{userId}") - @Operation(summary = "Delete a User", operationId = "deleteUser", description = "Removes the user and the associated roles and permissions.") + @Operation(summary = "Delete a User", operationId = "deleteUser", tags = {"Users"}, description = "Removes the user and the associated roles and permissions.") @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = UsersApiResourceSwagger.DeleteUsersUserIdResponse.class))) }) @Produces({ MediaType.APPLICATION_JSON }) @@ -228,6 +231,7 @@ public String delete(@PathParam("userId") @Parameter(description = "userId") fin @GET @Path("downloadtemplate") @Produces("application/vnd.ms-excel") + @Operation(summary = "Download users template", description = "Returns an Excel template for bulk importing users.", tags = {"Users"}) public Response getUserTemplate(@QueryParam("officeId") final Long officeId, @QueryParam("staffId") final Long staffId, @QueryParam("dateFormat") final String dateFormat) { return bulkImportWorkbookPopulatorService.getTemplate(GlobalEntityType.USERS.toString(), officeId, staffId, dateFormat); @@ -238,6 +242,8 @@ public Response getUserTemplate(@QueryParam("officeId") final Long officeId, @Qu @Consumes(MediaType.MULTIPART_FORM_DATA) @RequestBody(description = "Upload users template", content = { @Content(mediaType = MediaType.MULTIPART_FORM_DATA, schema = @Schema(implementation = UploadRequest.class)) }) + @Operation(summary = "Upload users template", description = "Uploads a filled Excel template to create multiple users in bulk.", + tags = {"Users"}) public String postUsersTemplate(@FormDataParam("file") InputStream uploadedInputStream, @FormDataParam("file") FormDataContentDisposition fileDetail, @FormDataParam("locale") final String locale, @FormDataParam("dateFormat") final String dateFormat) { diff --git a/fineract-provider/src/test/java/org/apache/fineract/infrastructure/core/config/ApiVerificationTest.java b/fineract-provider/src/test/java/org/apache/fineract/infrastructure/core/config/ApiVerificationTest.java index 28557197050..141d7672dfa 100644 --- a/fineract-provider/src/test/java/org/apache/fineract/infrastructure/core/config/ApiVerificationTest.java +++ b/fineract-provider/src/test/java/org/apache/fineract/infrastructure/core/config/ApiVerificationTest.java @@ -18,7 +18,10 @@ */ package org.apache.fineract.infrastructure.core.config; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import java.util.Set; import java.util.stream.Collectors; import org.apache.fineract.AbstractSpringTest; diff --git a/fineract-rates/src/main/java/org/apache/fineract/portfolio/floatingrates/api/FloatingRatesApiResource.java b/fineract-rates/src/main/java/org/apache/fineract/portfolio/floatingrates/api/FloatingRatesApiResource.java index de75e85029d..1414f089e0f 100644 --- a/fineract-rates/src/main/java/org/apache/fineract/portfolio/floatingrates/api/FloatingRatesApiResource.java +++ b/fineract-rates/src/main/java/org/apache/fineract/portfolio/floatingrates/api/FloatingRatesApiResource.java @@ -30,7 +30,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; diff --git a/fineract-security/src/main/java/org/apache/fineract/infrastructure/security/api/AuthenticationApiResource.java b/fineract-security/src/main/java/org/apache/fineract/infrastructure/security/api/AuthenticationApiResource.java index 0c466ecd676..66c83d75d8b 100644 --- a/fineract-security/src/main/java/org/apache/fineract/infrastructure/security/api/AuthenticationApiResource.java +++ b/fineract-security/src/main/java/org/apache/fineract/infrastructure/security/api/AuthenticationApiResource.java @@ -28,7 +28,10 @@ import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Consumes; import jakarta.ws.rs.POST; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; import java.nio.charset.StandardCharsets; diff --git a/fineract-security/src/main/java/org/apache/fineract/infrastructure/security/api/TwoFactorApiResource.java b/fineract-security/src/main/java/org/apache/fineract/infrastructure/security/api/TwoFactorApiResource.java index 1ea8a2e6fb2..7597f624d52 100644 --- a/fineract-security/src/main/java/org/apache/fineract/infrastructure/security/api/TwoFactorApiResource.java +++ b/fineract-security/src/main/java/org/apache/fineract/infrastructure/security/api/TwoFactorApiResource.java @@ -22,7 +22,10 @@ import jakarta.ws.rs.DefaultValue; import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; import jakarta.ws.rs.core.Context; diff --git a/fineract-security/src/main/java/org/apache/fineract/infrastructure/security/api/TwoFactorConfigurationApiResource.java b/fineract-security/src/main/java/org/apache/fineract/infrastructure/security/api/TwoFactorConfigurationApiResource.java index 9745a3e26cb..aa265aaf0d9 100644 --- a/fineract-security/src/main/java/org/apache/fineract/infrastructure/security/api/TwoFactorConfigurationApiResource.java +++ b/fineract-security/src/main/java/org/apache/fineract/infrastructure/security/api/TwoFactorConfigurationApiResource.java @@ -21,7 +21,10 @@ import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; import java.util.Map; diff --git a/fineract-security/src/main/java/org/apache/fineract/infrastructure/security/api/UserDetailsApiResource.java b/fineract-security/src/main/java/org/apache/fineract/infrastructure/security/api/UserDetailsApiResource.java index 3d65b3dc48b..d8084a2c1cc 100644 --- a/fineract-security/src/main/java/org/apache/fineract/infrastructure/security/api/UserDetailsApiResource.java +++ b/fineract-security/src/main/java/org/apache/fineract/infrastructure/security/api/UserDetailsApiResource.java @@ -24,7 +24,10 @@ import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.GET; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; import java.util.ArrayList; diff --git a/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/api/TaxComponentApiResource.java b/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/api/TaxComponentApiResource.java index 11e6fe2abd7..07b9b143eb5 100644 --- a/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/api/TaxComponentApiResource.java +++ b/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/api/TaxComponentApiResource.java @@ -31,7 +31,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; diff --git a/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/api/TaxGroupApiResource.java b/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/api/TaxGroupApiResource.java index 4e72ae98bb3..d272964dbe2 100644 --- a/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/api/TaxGroupApiResource.java +++ b/fineract-tax/src/main/java/org/apache/fineract/portfolio/tax/api/TaxGroupApiResource.java @@ -30,7 +30,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Context; diff --git a/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/api/InternalWorkingCapitalLoanApiResource.java b/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/api/InternalWorkingCapitalLoanApiResource.java index 5fd94e16a69..309d13d747c 100644 --- a/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/api/InternalWorkingCapitalLoanApiResource.java +++ b/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/api/InternalWorkingCapitalLoanApiResource.java @@ -26,7 +26,10 @@ import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Consumes; import jakarta.ws.rs.POST; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; diff --git a/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/api/WorkingCapitalLoanAmortizationScheduleApiResource.java b/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/api/WorkingCapitalLoanAmortizationScheduleApiResource.java index 23efa5538f0..f504ad66b20 100644 --- a/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/api/WorkingCapitalLoanAmortizationScheduleApiResource.java +++ b/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/api/WorkingCapitalLoanAmortizationScheduleApiResource.java @@ -26,7 +26,10 @@ import io.swagger.v3.oas.annotations.responses.ApiResponses; import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.GET; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; diff --git a/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/api/WorkingCapitalLoanApiResource.java b/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/api/WorkingCapitalLoanApiResource.java index 47f2362eb2a..bcad4be1f06 100644 --- a/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/api/WorkingCapitalLoanApiResource.java +++ b/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/api/WorkingCapitalLoanApiResource.java @@ -32,7 +32,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; diff --git a/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/api/WorkingCapitalLoanBreachScheduleApiResource.java b/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/api/WorkingCapitalLoanBreachScheduleApiResource.java index 0afcf6545bf..f64ba267ed3 100644 --- a/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/api/WorkingCapitalLoanBreachScheduleApiResource.java +++ b/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/api/WorkingCapitalLoanBreachScheduleApiResource.java @@ -23,7 +23,10 @@ import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; diff --git a/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/api/WorkingCapitalLoanDelinquencyActionApiResource.java b/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/api/WorkingCapitalLoanDelinquencyActionApiResource.java index cf17b5724be..d09a0bf368e 100644 --- a/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/api/WorkingCapitalLoanDelinquencyActionApiResource.java +++ b/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/api/WorkingCapitalLoanDelinquencyActionApiResource.java @@ -30,7 +30,10 @@ import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; diff --git a/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/api/WorkingCapitalLoanDelinquencyRangeScheduleApiResource.java b/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/api/WorkingCapitalLoanDelinquencyRangeScheduleApiResource.java index 1fe9c530dbb..568c5e6afb4 100644 --- a/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/api/WorkingCapitalLoanDelinquencyRangeScheduleApiResource.java +++ b/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/api/WorkingCapitalLoanDelinquencyRangeScheduleApiResource.java @@ -28,7 +28,10 @@ import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; diff --git a/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/api/WorkingCapitalLoanTransactionsApiResource.java b/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/api/WorkingCapitalLoanTransactionsApiResource.java index 3298392bd12..a6e27e3873e 100644 --- a/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/api/WorkingCapitalLoanTransactionsApiResource.java +++ b/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloan/api/WorkingCapitalLoanTransactionsApiResource.java @@ -29,7 +29,10 @@ import jakarta.ws.rs.Consumes; import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; diff --git a/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloanbreach/api/WorkingCapitalBreachApiResource.java b/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloanbreach/api/WorkingCapitalBreachApiResource.java index cc6b5182373..6515781becb 100644 --- a/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloanbreach/api/WorkingCapitalBreachApiResource.java +++ b/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloanbreach/api/WorkingCapitalBreachApiResource.java @@ -30,7 +30,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.MediaType; diff --git a/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloanproduct/api/WorkingCapitalLoanProductApiResource.java b/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloanproduct/api/WorkingCapitalLoanProductApiResource.java index 25ccfe8b4b4..30807b73bdc 100644 --- a/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloanproduct/api/WorkingCapitalLoanProductApiResource.java +++ b/fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloanproduct/api/WorkingCapitalLoanProductApiResource.java @@ -32,7 +32,10 @@ import jakarta.ws.rs.GET; import jakarta.ws.rs.POST; import jakarta.ws.rs.PUT; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.ws.rs.Path; + import jakarta.ws.rs.PathParam; import jakarta.ws.rs.Produces; import jakarta.ws.rs.core.Context;