FINERACT-2421: Refractor - remove ApiResponses annotations (Phase 7)
This commit is contained in:
+15
-31
@@ -25,7 +25,6 @@ import io.swagger.v3.oas.annotations.media.Content;
|
|||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.ws.rs.Consumes;
|
import jakarta.ws.rs.Consumes;
|
||||||
import jakarta.ws.rs.DELETE;
|
import jakarta.ws.rs.DELETE;
|
||||||
@@ -77,8 +76,7 @@ public class TellerApiResource {
|
|||||||
@Consumes({ MediaType.TEXT_HTML, MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.TEXT_HTML, MediaType.APPLICATION_JSON })
|
||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
@Operation(summary = "List all tellers", description = "Retrieves list tellers")
|
@Operation(summary = "List all tellers", description = "Retrieves list tellers")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = TellerApiResourceSwagger.GetTellersResponse.class))))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = TellerApiResourceSwagger.GetTellersResponse.class)))) })
|
|
||||||
public Collection<TellerData> getTellerData(@QueryParam("officeId") @Parameter(description = "officeId") final Long officeId) {
|
public Collection<TellerData> getTellerData(@QueryParam("officeId") @Parameter(description = "officeId") final Long officeId) {
|
||||||
return readPlatformService.getTellers(officeId);
|
return readPlatformService.getTellers(officeId);
|
||||||
}
|
}
|
||||||
@@ -88,8 +86,7 @@ public class TellerApiResource {
|
|||||||
@Consumes({ MediaType.TEXT_HTML, MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.TEXT_HTML, MediaType.APPLICATION_JSON })
|
||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
@Operation(summary = "Retrieve tellers", description = "")
|
@Operation(summary = "Retrieve tellers", description = "")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.GetTellersResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.GetTellersResponse.class))) })
|
|
||||||
public TellerData findTeller(@PathParam("tellerId") @Parameter(description = "tellerId") final Long tellerId) {
|
public TellerData findTeller(@PathParam("tellerId") @Parameter(description = "tellerId") final Long tellerId) {
|
||||||
return readPlatformService.findTeller(tellerId);
|
return readPlatformService.findTeller(tellerId);
|
||||||
}
|
}
|
||||||
@@ -103,8 +100,7 @@ public class TellerApiResource {
|
|||||||
Optional Fields
|
Optional Fields
|
||||||
End Date""")
|
End Date""")
|
||||||
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PostTellersRequest.class)))
|
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PostTellersRequest.class)))
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PostTellersResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PostTellersResponse.class))) })
|
|
||||||
public CommandProcessingResult createTeller(@Parameter(hidden = true) TellerRequest tellerData) {
|
public CommandProcessingResult createTeller(@Parameter(hidden = true) TellerRequest tellerData) {
|
||||||
final CommandWrapper request = new CommandWrapperBuilder().createTeller().withJson(apiJsonSerializer.serialize(tellerData)).build();
|
final CommandWrapper request = new CommandWrapperBuilder().createTeller().withJson(apiJsonSerializer.serialize(tellerData)).build();
|
||||||
|
|
||||||
@@ -117,8 +113,7 @@ public class TellerApiResource {
|
|||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
@Operation(summary = "Update teller", description = "")
|
@Operation(summary = "Update teller", description = "")
|
||||||
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PutTellersRequest.class)))
|
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PutTellersRequest.class)))
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PutTellersResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PutTellersResponse.class))) })
|
|
||||||
public CommandProcessingResult updateTeller(@PathParam("tellerId") @Parameter(description = "tellerId") final Long tellerId,
|
public CommandProcessingResult updateTeller(@PathParam("tellerId") @Parameter(description = "tellerId") final Long tellerId,
|
||||||
@Parameter(hidden = true) TellerRequest tellerData) {
|
@Parameter(hidden = true) TellerRequest tellerData) {
|
||||||
final CommandWrapper request = new CommandWrapperBuilder().updateTeller(tellerId).withJson(apiJsonSerializer.serialize(tellerData))
|
final CommandWrapper request = new CommandWrapperBuilder().updateTeller(tellerId).withJson(apiJsonSerializer.serialize(tellerData))
|
||||||
@@ -141,8 +136,7 @@ public class TellerApiResource {
|
|||||||
@Consumes({ MediaType.TEXT_HTML, MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.TEXT_HTML, MediaType.APPLICATION_JSON })
|
||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
@Operation(summary = "List Cashiers", description = "")
|
@Operation(summary = "List Cashiers", description = "")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.GetTellersTellerIdCashiersResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.GetTellersTellerIdCashiersResponse.class))) })
|
|
||||||
public CashiersForTeller getCashierData(@PathParam("tellerId") @Parameter(description = "tellerId") final Long tellerId,
|
public CashiersForTeller getCashierData(@PathParam("tellerId") @Parameter(description = "tellerId") final Long tellerId,
|
||||||
@QueryParam("fromdate") @Parameter(description = "fromdate") final String fromDateStr,
|
@QueryParam("fromdate") @Parameter(description = "fromdate") final String fromDateStr,
|
||||||
@QueryParam("todate") @Parameter(description = "todate") final String toDateStr) {
|
@QueryParam("todate") @Parameter(description = "todate") final String toDateStr) {
|
||||||
@@ -162,8 +156,7 @@ public class TellerApiResource {
|
|||||||
@Consumes({ MediaType.TEXT_HTML, MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.TEXT_HTML, MediaType.APPLICATION_JSON })
|
||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
@Operation(summary = "Retrieve a cashier", description = "")
|
@Operation(summary = "Retrieve a cashier", description = "")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.GetTellersTellerIdCashiersCashierIdResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.GetTellersTellerIdCashiersCashierIdResponse.class))) })
|
|
||||||
public CashierData findCashierData(@PathParam("tellerId") @Parameter(description = "tellerId") final Long tellerId,
|
public CashierData findCashierData(@PathParam("tellerId") @Parameter(description = "tellerId") final Long tellerId,
|
||||||
@PathParam("cashierId") @Parameter(description = "cashierId") final Long cashierId) {
|
@PathParam("cashierId") @Parameter(description = "cashierId") final Long cashierId) {
|
||||||
return readPlatformService.findCashier(cashierId);
|
return readPlatformService.findCashier(cashierId);
|
||||||
@@ -174,8 +167,7 @@ public class TellerApiResource {
|
|||||||
@Consumes({ MediaType.TEXT_HTML, MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.TEXT_HTML, MediaType.APPLICATION_JSON })
|
||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
@Operation(summary = "Find Cashiers", description = "")
|
@Operation(summary = "Find Cashiers", description = "")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.GetTellersTellerIdCashiersTemplateResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.GetTellersTellerIdCashiersTemplateResponse.class))) })
|
|
||||||
public CashierData getCashierTemplate(@PathParam("tellerId") @Parameter(description = "tellerId") final Long tellerId) {
|
public CashierData getCashierTemplate(@PathParam("tellerId") @Parameter(description = "tellerId") final Long tellerId) {
|
||||||
|
|
||||||
final TellerData teller = this.readPlatformService.findTeller(tellerId);
|
final TellerData teller = this.readPlatformService.findTeller(tellerId);
|
||||||
@@ -197,8 +189,7 @@ public class TellerApiResource {
|
|||||||
Optional Fields:\s
|
Optional Fields:\s
|
||||||
Description/Notes""")
|
Description/Notes""")
|
||||||
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PostTellersTellerIdCashiersRequest.class)))
|
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PostTellersTellerIdCashiersRequest.class)))
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PostTellersTellerIdCashiersResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PostTellersTellerIdCashiersResponse.class))) })
|
|
||||||
public CommandProcessingResult createCashier(@PathParam("tellerId") @Parameter(description = "tellerId") final Long tellerId,
|
public CommandProcessingResult createCashier(@PathParam("tellerId") @Parameter(description = "tellerId") final Long tellerId,
|
||||||
@Parameter(hidden = true) final CashierRequest cashierData) {
|
@Parameter(hidden = true) final CashierRequest cashierData) {
|
||||||
final CommandWrapper request = new CommandWrapperBuilder().allocateTeller(tellerId)
|
final CommandWrapper request = new CommandWrapperBuilder().allocateTeller(tellerId)
|
||||||
@@ -213,8 +204,7 @@ public class TellerApiResource {
|
|||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
@Operation(summary = "Update Cashier", description = "")
|
@Operation(summary = "Update Cashier", description = "")
|
||||||
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PutTellersTellerIdCashiersCashierIdRequest.class)))
|
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PutTellersTellerIdCashiersCashierIdRequest.class)))
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PutTellersTellerIdCashiersCashierIdResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PutTellersTellerIdCashiersCashierIdResponse.class))) })
|
|
||||||
public CommandProcessingResult updateCashier(@PathParam("tellerId") @Parameter(description = "tellerId") final Long tellerId,
|
public CommandProcessingResult updateCashier(@PathParam("tellerId") @Parameter(description = "tellerId") final Long tellerId,
|
||||||
@PathParam("cashierId") @Parameter(description = "cashierId") final Long cashierId,
|
@PathParam("cashierId") @Parameter(description = "cashierId") final Long cashierId,
|
||||||
@Parameter(hidden = true) final CashierRequest cashierDate) {
|
@Parameter(hidden = true) final CashierRequest cashierDate) {
|
||||||
@@ -230,8 +220,7 @@ public class TellerApiResource {
|
|||||||
@Consumes({ MediaType.TEXT_HTML, MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.TEXT_HTML, MediaType.APPLICATION_JSON })
|
||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
@Operation(summary = "Delete Cashier", description = "")
|
@Operation(summary = "Delete Cashier", description = "")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.DeleteTellersTellerIdCashiersCashierIdResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.DeleteTellersTellerIdCashiersCashierIdResponse.class))) })
|
|
||||||
public CommandProcessingResult deleteCashier(@PathParam("tellerId") @Parameter(description = "tellerId") final Long tellerId,
|
public CommandProcessingResult deleteCashier(@PathParam("tellerId") @Parameter(description = "tellerId") final Long tellerId,
|
||||||
@PathParam("cashierId") @Parameter(description = "cashierId") final Long cashierId) {
|
@PathParam("cashierId") @Parameter(description = "cashierId") final Long cashierId) {
|
||||||
final CommandWrapper request = new CommandWrapperBuilder().deleteAllocationTeller(tellerId, cashierId).build();
|
final CommandWrapper request = new CommandWrapperBuilder().deleteAllocationTeller(tellerId, cashierId).build();
|
||||||
@@ -246,8 +235,7 @@ public class TellerApiResource {
|
|||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
@Operation(summary = "Allocate Cash To Cashier", description = "Mandatory Fields: \n" + "Date, Amount, Currency, Notes/Comments")
|
@Operation(summary = "Allocate Cash To Cashier", description = "Mandatory Fields: \n" + "Date, Amount, Currency, Notes/Comments")
|
||||||
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PostTellersTellerIdCashiersCashierIdAllocateRequest.class)))
|
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PostTellersTellerIdCashiersCashierIdAllocateRequest.class)))
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PostTellersTellerIdCashiersCashierIdAllocateResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PostTellersTellerIdCashiersCashierIdAllocateResponse.class))) })
|
|
||||||
public CommandProcessingResult allocateCashToCashier(@PathParam("tellerId") @Parameter(description = "tellerId") final Long tellerId,
|
public CommandProcessingResult allocateCashToCashier(@PathParam("tellerId") @Parameter(description = "tellerId") final Long tellerId,
|
||||||
@PathParam("cashierId") @Parameter(description = "cashierId") final Long cashierId,
|
@PathParam("cashierId") @Parameter(description = "cashierId") final Long cashierId,
|
||||||
@Parameter(hidden = true) CashierTransactionRequest cashierTxnData) {
|
@Parameter(hidden = true) CashierTransactionRequest cashierTxnData) {
|
||||||
@@ -264,8 +252,7 @@ public class TellerApiResource {
|
|||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
@Operation(summary = "Settle Cash From Cashier", description = "Mandatory Fields\n" + "Date, Amount, Currency, Notes/Comments")
|
@Operation(summary = "Settle Cash From Cashier", description = "Mandatory Fields\n" + "Date, Amount, Currency, Notes/Comments")
|
||||||
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PostTellersTellerIdCashiersCashierIdSettleRequest.class)))
|
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PostTellersTellerIdCashiersCashierIdSettleRequest.class)))
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PostTellersTellerIdCashiersCashierIdSettleResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.PostTellersTellerIdCashiersCashierIdSettleResponse.class))) })
|
|
||||||
public CommandProcessingResult settleCashFromCashier(@PathParam("tellerId") @Parameter(description = "tellerId") final Long tellerId,
|
public CommandProcessingResult settleCashFromCashier(@PathParam("tellerId") @Parameter(description = "tellerId") final Long tellerId,
|
||||||
@PathParam("cashierId") @Parameter(description = "cashierId") final Long cashierId,
|
@PathParam("cashierId") @Parameter(description = "cashierId") final Long cashierId,
|
||||||
@Parameter(hidden = true) CashierTransactionRequest cashierTxnData) {
|
@Parameter(hidden = true) CashierTransactionRequest cashierTxnData) {
|
||||||
@@ -280,8 +267,7 @@ public class TellerApiResource {
|
|||||||
@Consumes({ MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.APPLICATION_JSON })
|
||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
@Operation(summary = "Retrieve Cashier Transactions", description = "")
|
@Operation(summary = "Retrieve Cashier Transactions", description = "")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.GetTellersTellerIdCashiersCashiersIdTransactionsResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.GetTellersTellerIdCashiersCashiersIdTransactionsResponse.class))) })
|
|
||||||
public Page<CashierTransactionData> getTransactionsForCashier(
|
public Page<CashierTransactionData> getTransactionsForCashier(
|
||||||
@PathParam("tellerId") @Parameter(description = "tellerId") final Long tellerId,
|
@PathParam("tellerId") @Parameter(description = "tellerId") final Long tellerId,
|
||||||
@PathParam("cashierId") @Parameter(description = "cashierId") final Long cashierId,
|
@PathParam("cashierId") @Parameter(description = "cashierId") final Long cashierId,
|
||||||
@@ -301,8 +287,7 @@ public class TellerApiResource {
|
|||||||
@Consumes({ MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.APPLICATION_JSON })
|
||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
@Operation(summary = "Retrieve Transactions With Summary For Cashier", description = "")
|
@Operation(summary = "Retrieve Transactions With Summary For Cashier", description = "")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.GetTellersTellerIdCashiersCashiersIdSummaryAndTransactionsResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.GetTellersTellerIdCashiersCashiersIdSummaryAndTransactionsResponse.class))) })
|
|
||||||
public CashierTransactionsWithSummaryData getTransactionsWithSummaryForCashier(
|
public CashierTransactionsWithSummaryData getTransactionsWithSummaryForCashier(
|
||||||
@PathParam("tellerId") @Parameter(description = "tellerId") final Long tellerId,
|
@PathParam("tellerId") @Parameter(description = "tellerId") final Long tellerId,
|
||||||
@PathParam("cashierId") @Parameter(description = "cashierId") final Long cashierId,
|
@PathParam("cashierId") @Parameter(description = "cashierId") final Long cashierId,
|
||||||
@@ -324,8 +309,7 @@ public class TellerApiResource {
|
|||||||
@Consumes({ MediaType.TEXT_HTML, MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.TEXT_HTML, MediaType.APPLICATION_JSON })
|
||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
@Operation(summary = "Retrieve Cashier Transaction Template", description = "")
|
@Operation(summary = "Retrieve Cashier Transaction Template", description = "")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.GetTellersTellerIdCashiersCashiersIdTransactionsTemplateResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = TellerApiResourceSwagger.GetTellersTellerIdCashiersCashiersIdTransactionsTemplateResponse.class))) })
|
|
||||||
public CashierTransactionData getCashierTxnTemplate(@PathParam("tellerId") @Parameter(description = "tellerId") final Long tellerId,
|
public CashierTransactionData getCashierTxnTemplate(@PathParam("tellerId") @Parameter(description = "tellerId") final Long tellerId,
|
||||||
@PathParam("cashierId") @Parameter(description = "cashierId") final Long cashierId) {
|
@PathParam("cashierId") @Parameter(description = "cashierId") final Long cashierId) {
|
||||||
|
|
||||||
|
|||||||
+3
-7
@@ -24,7 +24,6 @@ import io.swagger.v3.oas.annotations.media.Content;
|
|||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.ws.rs.Consumes;
|
import jakarta.ws.rs.Consumes;
|
||||||
import jakarta.ws.rs.DELETE;
|
import jakarta.ws.rs.DELETE;
|
||||||
@@ -90,8 +89,7 @@ public class PaymentTypeApiResource {
|
|||||||
@Operation(summary = "Create a Payment Type", description = "Creates a new Payment type\n\n" + "Mandatory Fields: name\n\n"
|
@Operation(summary = "Create a Payment Type", description = "Creates a new Payment type\n\n" + "Mandatory Fields: name\n\n"
|
||||||
+ "Optional Fields: Description, isCashPayment,Position")
|
+ "Optional Fields: Description, isCashPayment,Position")
|
||||||
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = PaymentTypeRequest.class)))
|
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = PaymentTypeRequest.class)))
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = PaymentTypeApiResourceSwagger.PostPaymentTypesResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = PaymentTypeApiResourceSwagger.PostPaymentTypesResponse.class))) })
|
|
||||||
public CommandProcessingResult createPaymentType(@Parameter(hidden = true) PaymentTypeRequest paymentTypeRequest) {
|
public CommandProcessingResult createPaymentType(@Parameter(hidden = true) PaymentTypeRequest paymentTypeRequest) {
|
||||||
|
|
||||||
final CommandWrapper commandRequest = new CommandWrapperBuilder().createPaymentType()
|
final CommandWrapper commandRequest = new CommandWrapperBuilder().createPaymentType()
|
||||||
@@ -107,8 +105,7 @@ public class PaymentTypeApiResource {
|
|||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Update a Payment Type", description = "Updates a Payment Type")
|
@Operation(summary = "Update a Payment Type", description = "Updates a Payment Type")
|
||||||
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = PaymentTypeApiResourceSwagger.PutPaymentTypesPaymentTypeIdRequest.class)))
|
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = PaymentTypeApiResourceSwagger.PutPaymentTypesPaymentTypeIdRequest.class)))
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = PaymentTypeApiResourceSwagger.PutPaymentTypesPaymentTypeIdResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = PaymentTypeApiResourceSwagger.PutPaymentTypesPaymentTypeIdResponse.class))) })
|
|
||||||
public CommandProcessingResult updatePaymentType(
|
public CommandProcessingResult updatePaymentType(
|
||||||
@PathParam("paymentTypeId") @Parameter(description = "paymentTypeId") final Long paymentTypeId,
|
@PathParam("paymentTypeId") @Parameter(description = "paymentTypeId") final Long paymentTypeId,
|
||||||
@Parameter(hidden = true) final String apiRequestBodyAsJson) {
|
@Parameter(hidden = true) final String apiRequestBodyAsJson) {
|
||||||
@@ -125,8 +122,7 @@ public class PaymentTypeApiResource {
|
|||||||
@Consumes({ MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.APPLICATION_JSON })
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Delete a Payment Type", description = "Deletes payment type")
|
@Operation(summary = "Delete a Payment Type", description = "Deletes payment type")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = PaymentTypeApiResourceSwagger.DeletePaymentTypesPaymentTypeIdResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = PaymentTypeApiResourceSwagger.DeletePaymentTypesPaymentTypeIdResponse.class))) })
|
|
||||||
public CommandProcessingResult deleteCode(
|
public CommandProcessingResult deleteCode(
|
||||||
@PathParam("paymentTypeId") @Parameter(description = "paymentTypeId") final Long paymentTypeId) {
|
@PathParam("paymentTypeId") @Parameter(description = "paymentTypeId") final Long paymentTypeId) {
|
||||||
|
|
||||||
|
|||||||
+5
-11
@@ -24,7 +24,6 @@ import io.swagger.v3.oas.annotations.media.Content;
|
|||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.ws.rs.Consumes;
|
import jakarta.ws.rs.Consumes;
|
||||||
import jakarta.ws.rs.GET;
|
import jakarta.ws.rs.GET;
|
||||||
@@ -76,8 +75,7 @@ public class RescheduleLoansApiResource {
|
|||||||
@Consumes({ MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.APPLICATION_JSON })
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Retrieve all reschedule loan reasons", description = "Retrieve all reschedule loan reasons as a template")
|
@Operation(summary = "Retrieve all reschedule loan reasons", description = "Retrieve all reschedule loan reasons as a template")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = RescheduleLoansApiResourceSwagger.GetRescheduleReasonsTemplateResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = RescheduleLoansApiResourceSwagger.GetRescheduleReasonsTemplateResponse.class))) })
|
|
||||||
public String retrieveTemplate(@Context final UriInfo uriInfo) {
|
public String retrieveTemplate(@Context final UriInfo uriInfo) {
|
||||||
|
|
||||||
this.platformSecurityContext.authenticatedUser().validateHasReadPermission(RescheduleLoansApiConstants.ENTITY_NAME);
|
this.platformSecurityContext.authenticatedUser().validateHasReadPermission(RescheduleLoansApiConstants.ENTITY_NAME);
|
||||||
@@ -94,8 +92,7 @@ public class RescheduleLoansApiResource {
|
|||||||
@Consumes({ MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.APPLICATION_JSON })
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Retrieve loan reschedule request by schedule id", description = "Retrieve loan reschedule request by schedule id")
|
@Operation(summary = "Retrieve loan reschedule request by schedule id", description = "Retrieve loan reschedule request by schedule id")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = RescheduleLoansApiResourceSwagger.GetLoanRescheduleRequestResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = RescheduleLoansApiResourceSwagger.GetLoanRescheduleRequestResponse.class))) })
|
|
||||||
public String readLoanRescheduleRequest(@Context final UriInfo uriInfo, @PathParam("scheduleId") final Long scheduleId,
|
public String readLoanRescheduleRequest(@Context final UriInfo uriInfo, @PathParam("scheduleId") final Long scheduleId,
|
||||||
@QueryParam("command") final String command) {
|
@QueryParam("command") final String command) {
|
||||||
this.platformSecurityContext.authenticatedUser().validateHasReadPermission(RescheduleLoansApiConstants.ENTITY_NAME);
|
this.platformSecurityContext.authenticatedUser().validateHasReadPermission(RescheduleLoansApiConstants.ENTITY_NAME);
|
||||||
@@ -119,8 +116,7 @@ public class RescheduleLoansApiResource {
|
|||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Create loan reschedule request", description = "Create a loan reschedule request.")
|
@Operation(summary = "Create loan reschedule request", description = "Create a loan reschedule request.")
|
||||||
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = RescheduleLoansApiResourceSwagger.PostCreateRescheduleLoansRequest.class)))
|
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = RescheduleLoansApiResourceSwagger.PostCreateRescheduleLoansRequest.class)))
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = RescheduleLoansApiResourceSwagger.PostCreateRescheduleLoansResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = RescheduleLoansApiResourceSwagger.PostCreateRescheduleLoansResponse.class))) })
|
|
||||||
public String createLoanRescheduleRequest(final String apiRequestBodyAsJson) {
|
public String createLoanRescheduleRequest(final String apiRequestBodyAsJson) {
|
||||||
final CommandWrapper commandWrapper = new CommandWrapperBuilder()
|
final CommandWrapper commandWrapper = new CommandWrapperBuilder()
|
||||||
.createLoanRescheduleRequest(RescheduleLoansApiConstants.ENTITY_NAME).withJson(apiRequestBodyAsJson).build();
|
.createLoanRescheduleRequest(RescheduleLoansApiConstants.ENTITY_NAME).withJson(apiRequestBodyAsJson).build();
|
||||||
@@ -136,8 +132,7 @@ public class RescheduleLoansApiResource {
|
|||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Update loan reschedule request", description = "Update a loan reschedule request by either approving/rejecting it.")
|
@Operation(summary = "Update loan reschedule request", description = "Update a loan reschedule request by either approving/rejecting it.")
|
||||||
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = RescheduleLoansApiResourceSwagger.PostUpdateRescheduleLoansRequest.class)))
|
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = RescheduleLoansApiResourceSwagger.PostUpdateRescheduleLoansRequest.class)))
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = RescheduleLoansApiResourceSwagger.PostUpdateRescheduleLoansResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = RescheduleLoansApiResourceSwagger.PostUpdateRescheduleLoansResponse.class))) })
|
|
||||||
public String updateLoanRescheduleRequest(@PathParam("scheduleId") final Long scheduleId, @QueryParam("command") final String command,
|
public String updateLoanRescheduleRequest(@PathParam("scheduleId") final Long scheduleId, @QueryParam("command") final String command,
|
||||||
final String apiRequestBodyAsJson) {
|
final String apiRequestBodyAsJson) {
|
||||||
CommandWrapper commandWrapper;
|
CommandWrapper commandWrapper;
|
||||||
@@ -178,8 +173,7 @@ public class RescheduleLoansApiResource {
|
|||||||
@Consumes({ MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.APPLICATION_JSON })
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Retrieve all reschedule requests", description = "Retrieve all reschedule requests.")
|
@Operation(summary = "Retrieve all reschedule requests", description = "Retrieve all reschedule requests.")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = RescheduleLoansApiResourceSwagger.GetLoanRescheduleRequestResponse.class))))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = RescheduleLoansApiResourceSwagger.GetLoanRescheduleRequestResponse.class)))) })
|
|
||||||
public String retrieveAllRescheduleRequest(@Context final UriInfo uriInfo, @QueryParam("command") final String command,
|
public String retrieveAllRescheduleRequest(@Context final UriInfo uriInfo, @QueryParam("command") final String command,
|
||||||
@QueryParam("loanId") Long loanId) {
|
@QueryParam("loanId") Long loanId) {
|
||||||
|
|
||||||
|
|||||||
+2
-5
@@ -23,7 +23,6 @@ import io.swagger.v3.oas.annotations.Parameter;
|
|||||||
import io.swagger.v3.oas.annotations.media.Content;
|
import io.swagger.v3.oas.annotations.media.Content;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.ws.rs.BeanParam;
|
import jakarta.ws.rs.BeanParam;
|
||||||
import jakarta.ws.rs.Consumes;
|
import jakarta.ws.rs.Consumes;
|
||||||
@@ -95,8 +94,7 @@ public class MakercheckersApiResource {
|
|||||||
@Consumes({ MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.APPLICATION_JSON })
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Approve Maker Checker Entry | Reject Maker Checker Entry")
|
@Operation(summary = "Approve Maker Checker Entry | Reject Maker Checker Entry")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = MakercheckersApiResourceSwagger.PostMakerCheckersResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = MakercheckersApiResourceSwagger.PostMakerCheckersResponse.class))) })
|
|
||||||
public CommandProcessingResult approveMakerCheckerEntry(@PathParam("auditId") @Parameter(description = "auditId") final Long auditId,
|
public CommandProcessingResult approveMakerCheckerEntry(@PathParam("auditId") @Parameter(description = "auditId") final Long auditId,
|
||||||
@QueryParam("command") @Parameter(description = "command") final String commandParam) {
|
@QueryParam("command") @Parameter(description = "command") final String commandParam) {
|
||||||
|
|
||||||
@@ -121,8 +119,7 @@ public class MakercheckersApiResource {
|
|||||||
@Consumes({ MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.APPLICATION_JSON })
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Delete Maker Checker Entry")
|
@Operation(summary = "Delete Maker Checker Entry")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = MakercheckersApiResourceSwagger.PostMakerCheckersResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = MakercheckersApiResourceSwagger.PostMakerCheckersResponse.class))) })
|
|
||||||
public CommandProcessingResult deleteMakerCheckerEntry(@PathParam("auditId") @Parameter(description = "auditId") final Long auditId) {
|
public CommandProcessingResult deleteMakerCheckerEntry(@PathParam("auditId") @Parameter(description = "auditId") final Long auditId) {
|
||||||
final Long id = writePlatformService.deleteEntry(auditId);
|
final Long id = writePlatformService.deleteEntry(auditId);
|
||||||
return CommandProcessingResult.commandOnlyResult(id);
|
return CommandProcessingResult.commandOnlyResult(id);
|
||||||
|
|||||||
+5
-11
@@ -25,7 +25,6 @@ import io.swagger.v3.oas.annotations.media.Content;
|
|||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.ws.rs.Consumes;
|
import jakarta.ws.rs.Consumes;
|
||||||
import jakarta.ws.rs.DELETE;
|
import jakarta.ws.rs.DELETE;
|
||||||
@@ -95,8 +94,7 @@ public class ReportsApiResource {
|
|||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Retrieve a Report\n", description = "Example Requests:\n" + "\n" + "reports/1\n" + "\n" + "\n"
|
@Operation(summary = "Retrieve a Report\n", description = "Example Requests:\n" + "\n" + "reports/1\n" + "\n" + "\n"
|
||||||
+ "reports/1?template=true")
|
+ "reports/1?template=true")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ReportsApiResourceSwagger.GetReportsResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ReportsApiResourceSwagger.GetReportsResponse.class))) })
|
|
||||||
public String retrieveReport(@PathParam("id") @Parameter(description = "id") final Long id, @Context final UriInfo uriInfo) {
|
public String retrieveReport(@PathParam("id") @Parameter(description = "id") final Long id, @Context final UriInfo uriInfo) {
|
||||||
|
|
||||||
this.context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSIONS);
|
this.context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSIONS);
|
||||||
@@ -118,8 +116,7 @@ public class ReportsApiResource {
|
|||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Retrieve Report Template", description = "This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n"
|
@Operation(summary = "Retrieve Report Template", description = "This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n"
|
||||||
+ "\n" + "Field Defaults\n" + "Allowed description Lists\n" + "\n" + "Example Request : \n" + "\n" + "reports/template")
|
+ "\n" + "Field Defaults\n" + "Allowed description Lists\n" + "\n" + "Example Request : \n" + "\n" + "reports/template")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ReportsApiResourceSwagger.GetReportsTemplateResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ReportsApiResourceSwagger.GetReportsTemplateResponse.class))) })
|
|
||||||
public String retrieveOfficeTemplate(@Context final UriInfo uriInfo) {
|
public String retrieveOfficeTemplate(@Context final UriInfo uriInfo) {
|
||||||
|
|
||||||
this.context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSIONS);
|
this.context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSIONS);
|
||||||
@@ -137,8 +134,7 @@ public class ReportsApiResource {
|
|||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Create a Report", description = "")
|
@Operation(summary = "Create a Report", description = "")
|
||||||
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = ReportsApiResourceSwagger.PostRepostRequest.class)))
|
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = ReportsApiResourceSwagger.PostRepostRequest.class)))
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ReportsApiResourceSwagger.PostReportsResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ReportsApiResourceSwagger.PostReportsResponse.class))) })
|
|
||||||
public String createReport(@Parameter(hidden = true) final String apiRequestBodyAsJson) {
|
public String createReport(@Parameter(hidden = true) final String apiRequestBodyAsJson) {
|
||||||
|
|
||||||
final CommandWrapper commandRequest = new CommandWrapperBuilder().createReport().withJson(apiRequestBodyAsJson).build();
|
final CommandWrapper commandRequest = new CommandWrapperBuilder().createReport().withJson(apiRequestBodyAsJson).build();
|
||||||
@@ -154,8 +150,7 @@ public class ReportsApiResource {
|
|||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Update a Report", description = "Only the useReport description can be updated for core reports.")
|
@Operation(summary = "Update a Report", description = "Only the useReport description can be updated for core reports.")
|
||||||
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = ReportsApiResourceSwagger.PutReportRequest.class)))
|
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = ReportsApiResourceSwagger.PutReportRequest.class)))
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ReportsApiResourceSwagger.PutReportResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ReportsApiResourceSwagger.PutReportResponse.class))) })
|
|
||||||
public String updateReport(@PathParam("id") @Parameter(description = "id") final Long id,
|
public String updateReport(@PathParam("id") @Parameter(description = "id") final Long id,
|
||||||
@Parameter(hidden = true) final String apiRequestBodyAsJson) {
|
@Parameter(hidden = true) final String apiRequestBodyAsJson) {
|
||||||
|
|
||||||
@@ -171,8 +166,7 @@ public class ReportsApiResource {
|
|||||||
@Consumes({ MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.APPLICATION_JSON })
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Delete a Report", description = "Only non-core reports can be deleted.")
|
@Operation(summary = "Delete a Report", description = "Only non-core reports can be deleted.")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ReportsApiResourceSwagger.DeleteReportsResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ReportsApiResourceSwagger.DeleteReportsResponse.class))) })
|
|
||||||
public String deleteReport(@PathParam("id") @Parameter(description = "id") final Long id) {
|
public String deleteReport(@PathParam("id") @Parameter(description = "id") final Long id) {
|
||||||
|
|
||||||
final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteReport(id).build();
|
final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteReport(id).build();
|
||||||
|
|||||||
+7
-10
@@ -25,7 +25,6 @@ import io.swagger.v3.oas.annotations.media.ArraySchema;
|
|||||||
import io.swagger.v3.oas.annotations.media.Content;
|
import io.swagger.v3.oas.annotations.media.Content;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.ws.rs.Consumes;
|
import jakarta.ws.rs.Consumes;
|
||||||
import jakarta.ws.rs.DefaultValue;
|
import jakarta.ws.rs.DefaultValue;
|
||||||
@@ -70,10 +69,9 @@ public class RunreportsApiResource {
|
|||||||
@Consumes({ MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.APPLICATION_JSON })
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Return all available export types for the specific report", description = "Returns the list of all available export types for a given report.")
|
@Operation(summary = "Return all available export types for the specific report", description = "Returns the list of all available export types for a given report.")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = ReportExportType.class))))
|
||||||
@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 = "400", description = "Bad Request - Invalid report name or parameters"),
|
@ApiResponse(responseCode = "500", description = "Internal Server Error")
|
||||||
@ApiResponse(responseCode = "500", description = "Internal Server Error") })
|
|
||||||
public Response retrieveAllAvailableExports(
|
public Response retrieveAllAvailableExports(
|
||||||
@PathParam("reportName") @Parameter(description = "Name of the report to get available export types for", example = "Client Listing", required = true) final String reportName,
|
@PathParam("reportName") @Parameter(description = "Name of the report to get available export types for", example = "Client Listing", required = true) final String reportName,
|
||||||
@Context final UriInfo uriInfo,
|
@Context final UriInfo uriInfo,
|
||||||
@@ -98,11 +96,10 @@ public class RunreportsApiResource {
|
|||||||
@Consumes({ MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.APPLICATION_JSON })
|
||||||
@Produces({ MediaType.APPLICATION_JSON, "text/csv", "application/vnd.ms-excel", "application/pdf", "text/html" })
|
@Produces({ MediaType.APPLICATION_JSON, "text/csv", "application/vnd.ms-excel", "application/pdf", "text/html" })
|
||||||
@Operation(summary = "Run a predefined report", description = ReportParameters.FULL_DESCRIPTION)
|
@Operation(summary = "Run a predefined report", description = ReportParameters.FULL_DESCRIPTION)
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK - Report executed successfully", content = @Content(schema = @Schema(implementation = RunreportsApiResourceSwagger.RunReportsResponse.class)))
|
||||||
@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 = "400", description = "Bad Request - Missing or invalid parameters"),
|
@ApiResponse(responseCode = "401", description = "Unauthorized - Not authorized to run this report")
|
||||||
@ApiResponse(responseCode = "401", description = "Unauthorized - Not authorized to run this report"),
|
@ApiResponse(responseCode = "500", description = "Internal Server Error")
|
||||||
@ApiResponse(responseCode = "500", description = "Internal Server Error") })
|
|
||||||
public Response runReport(
|
public Response runReport(
|
||||||
@PathParam("reportName") @Parameter(description = "The name of the report to execute (e.g., 'Client Listing', 'Expected Payments By Date')", example = "Client Listing", required = true) final String reportName,
|
@PathParam("reportName") @Parameter(description = "The name of the report to execute (e.g., 'Client Listing', 'Expected Payments By Date')", example = "Client Listing", required = true) final String reportName,
|
||||||
@Context final UriInfo uriInfo,
|
@Context final UriInfo uriInfo,
|
||||||
|
|||||||
+2
-5
@@ -23,7 +23,6 @@ import io.swagger.v3.oas.annotations.Parameter;
|
|||||||
import io.swagger.v3.oas.annotations.media.Content;
|
import io.swagger.v3.oas.annotations.media.Content;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.ws.rs.Consumes;
|
import jakarta.ws.rs.Consumes;
|
||||||
import jakarta.ws.rs.GET;
|
import jakarta.ws.rs.GET;
|
||||||
@@ -71,8 +70,7 @@ public class SchedulerApiResource {
|
|||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@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", description = "Returns the scheduler status.\n" + "\n" + "Example Requests:\n" + "\n"
|
||||||
+ "scheduler")
|
+ "scheduler")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SchedulerApiResourceSwagger.GetSchedulerResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SchedulerApiResourceSwagger.GetSchedulerResponse.class))) })
|
|
||||||
public String retrieveStatus(@Context final UriInfo uriInfo) {
|
public String retrieveStatus(@Context final UriInfo uriInfo) {
|
||||||
this.context.authenticatedUser().validateHasReadPermission(SchedulerJobApiConstants.SCHEDULER_RESOURCE_NAME);
|
this.context.authenticatedUser().validateHasReadPermission(SchedulerJobApiConstants.SCHEDULER_RESOURCE_NAME);
|
||||||
final boolean isSchedulerRunning = this.jobRegisterService.isSchedulerRunning();
|
final boolean isSchedulerRunning = this.jobRegisterService.isSchedulerRunning();
|
||||||
@@ -86,8 +84,7 @@ public class SchedulerApiResource {
|
|||||||
@Consumes({ MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.APPLICATION_JSON })
|
||||||
@Produces({ 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", description = "Activates the scheduler job service. | Suspends the scheduler job service.")
|
||||||
@ApiResponses({ @ApiResponse(responseCode = "200", description = "POST : scheduler?command=start\n\n" + "\n"
|
@ApiResponse(responseCode = "200", description = "POST : scheduler?command=start\n\n" + "\n" + "POST : scheduler?command=stop")
|
||||||
+ "POST : scheduler?command=stop") })
|
|
||||||
public Response changeSchedulerStatus(
|
public Response changeSchedulerStatus(
|
||||||
@QueryParam(SchedulerJobApiConstants.COMMAND) @Parameter(description = "command") final String commandParam) {
|
@QueryParam(SchedulerJobApiConstants.COMMAND) @Parameter(description = "command") final String commandParam) {
|
||||||
// check the logged in user have permissions to update scheduler status
|
// check the logged in user have permissions to update scheduler status
|
||||||
|
|||||||
+9
-15
@@ -30,7 +30,6 @@ import io.swagger.v3.oas.annotations.media.Content;
|
|||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import jakarta.ws.rs.Consumes;
|
import jakarta.ws.rs.Consumes;
|
||||||
@@ -93,8 +92,7 @@ public class SchedulerJobApiResource {
|
|||||||
@GET
|
@GET
|
||||||
@Operation(summary = "Retrieve Scheduler Jobs", description = "Returns the list of jobs.\n" + "\n" + "Example Requests:\n" + "\n"
|
@Operation(summary = "Retrieve Scheduler Jobs", description = "Returns the list of jobs.\n" + "\n" + "Example Requests:\n" + "\n"
|
||||||
+ "jobs")
|
+ "jobs")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = SchedulerJobApiResourceSwagger.GetJobsResponse.class))))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = SchedulerJobApiResourceSwagger.GetJobsResponse.class)))) })
|
|
||||||
public String retrieveAll(@Context final UriInfo uriInfo) {
|
public String retrieveAll(@Context final UriInfo uriInfo) {
|
||||||
this.context.authenticatedUser().validateHasReadPermission(SCHEDULER_RESOURCE_NAME);
|
this.context.authenticatedUser().validateHasReadPermission(SCHEDULER_RESOURCE_NAME);
|
||||||
final List<JobDetailData> jobDetailDatas = this.schedulerJobRunnerReadService.findAllJobDetails();
|
final List<JobDetailData> jobDetailDatas = this.schedulerJobRunnerReadService.findAllJobDetails();
|
||||||
@@ -105,8 +103,7 @@ public class SchedulerJobApiResource {
|
|||||||
@GET
|
@GET
|
||||||
@Path("{" + SchedulerJobApiConstants.JOB_ID + "}")
|
@Path("{" + SchedulerJobApiConstants.JOB_ID + "}")
|
||||||
@Operation(summary = "Retrieve a Job", description = "Returns the details of a Job.\n" + "\n" + "Example Requests:\n" + "\n" + "jobs/5")
|
@Operation(summary = "Retrieve a Job", description = "Returns the details of a Job.\n" + "\n" + "Example Requests:\n" + "\n" + "jobs/5")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SchedulerJobApiResourceSwagger.GetJobsResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SchedulerJobApiResourceSwagger.GetJobsResponse.class))) })
|
|
||||||
public String retrieveOne(@PathParam(SchedulerJobApiConstants.JOB_ID) @Parameter(description = "jobId") final Long jobId,
|
public String retrieveOne(@PathParam(SchedulerJobApiConstants.JOB_ID) @Parameter(description = "jobId") final Long jobId,
|
||||||
@Context final UriInfo uriInfo) {
|
@Context final UriInfo uriInfo) {
|
||||||
return retrieveOne(IdTypeResolver.resolveDefault(), Objects.toString(jobId, null), uriInfo);
|
return retrieveOne(IdTypeResolver.resolveDefault(), Objects.toString(jobId, null), uriInfo);
|
||||||
@@ -116,8 +113,7 @@ public class SchedulerJobApiResource {
|
|||||||
@Path(SHORT_NAME_PARAM + "/{shortName}")
|
@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", description = "Returns the details of a Job bu shortName.\n" + "\n" + "Example Requests:\n"
|
||||||
+ "\n" + "jobs/short-name/SA_PINT")
|
+ "\n" + "jobs/short-name/SA_PINT")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SchedulerJobApiResourceSwagger.GetJobsResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SchedulerJobApiResourceSwagger.GetJobsResponse.class))) })
|
|
||||||
public String retrieveByShortName(
|
public String retrieveByShortName(
|
||||||
@PathParam("shortName") @Parameter(required = true, description = SchedulerJobApiConstants.SHORT_NAME_PARAM) final String shortName,
|
@PathParam("shortName") @Parameter(required = true, description = SchedulerJobApiConstants.SHORT_NAME_PARAM) final String shortName,
|
||||||
@Context final UriInfo uriInfo) {
|
@Context final UriInfo uriInfo) {
|
||||||
@@ -127,8 +123,7 @@ public class SchedulerJobApiResource {
|
|||||||
@GET
|
@GET
|
||||||
@Path("{" + SchedulerJobApiConstants.JOB_ID + "}/" + SchedulerJobApiConstants.JOB_RUN_HISTORY)
|
@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", description = "Example Requests:\n" + "\n" + "jobs/5/runhistory?offset=0&limit=200")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SchedulerJobApiResourceSwagger.GetJobsJobIDJobRunHistoryResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SchedulerJobApiResourceSwagger.GetJobsJobIDJobRunHistoryResponse.class))) })
|
|
||||||
public String retrieveHistory(@Context final UriInfo uriInfo,
|
public String retrieveHistory(@Context final UriInfo uriInfo,
|
||||||
@PathParam(SchedulerJobApiConstants.JOB_ID) @Parameter(description = "jobId") final Long jobId,
|
@PathParam(SchedulerJobApiConstants.JOB_ID) @Parameter(description = "jobId") final Long jobId,
|
||||||
@QueryParam("offset") @Parameter(description = "offset") final Integer offset,
|
@QueryParam("offset") @Parameter(description = "offset") final Integer offset,
|
||||||
@@ -142,8 +137,7 @@ public class SchedulerJobApiResource {
|
|||||||
@Path(SHORT_NAME_PARAM + "/{shortName}/" + SchedulerJobApiConstants.JOB_RUN_HISTORY)
|
@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", description = "Example Requests:\n" + "\n"
|
||||||
+ "jobs/short-name/SA_PINT/runhistory?offset=0&limit=200")
|
+ "jobs/short-name/SA_PINT/runhistory?offset=0&limit=200")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SchedulerJobApiResourceSwagger.GetJobsJobIDJobRunHistoryResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SchedulerJobApiResourceSwagger.GetJobsJobIDJobRunHistoryResponse.class))) })
|
|
||||||
public String retrieveHistoryByShortName(@Context final UriInfo uriInfo,
|
public String retrieveHistoryByShortName(@Context final UriInfo uriInfo,
|
||||||
@PathParam("shortName") @Parameter(required = true, description = SchedulerJobApiConstants.SHORT_NAME_PARAM) final String shortName,
|
@PathParam("shortName") @Parameter(required = true, description = SchedulerJobApiConstants.SHORT_NAME_PARAM) final String shortName,
|
||||||
@QueryParam("offset") @Parameter(description = "offset") final Integer offset,
|
@QueryParam("offset") @Parameter(description = "offset") final Integer offset,
|
||||||
@@ -157,7 +151,7 @@ public class SchedulerJobApiResource {
|
|||||||
@Path("{" + SchedulerJobApiConstants.JOB_ID + "}")
|
@Path("{" + SchedulerJobApiConstants.JOB_ID + "}")
|
||||||
@Operation(summary = "Run a Job", description = "Manually Execute Specific Job.")
|
@Operation(summary = "Run a Job", description = "Manually Execute Specific Job.")
|
||||||
@RequestBody(content = @Content(schema = @Schema(implementation = SchedulerJobApiResourceSwagger.ExecuteJobRequest.class)))
|
@RequestBody(content = @Content(schema = @Schema(implementation = SchedulerJobApiResourceSwagger.ExecuteJobRequest.class)))
|
||||||
@ApiResponses({ @ApiResponse(responseCode = "200", description = "POST: jobs/1?command=executeJob") })
|
@ApiResponse(responseCode = "200", description = "POST: jobs/1?command=executeJob")
|
||||||
public Response executeJob(@PathParam(SchedulerJobApiConstants.JOB_ID) @Parameter(description = "jobId") final Long jobId,
|
public Response executeJob(@PathParam(SchedulerJobApiConstants.JOB_ID) @Parameter(description = "jobId") final Long jobId,
|
||||||
@QueryParam(SchedulerJobApiConstants.COMMAND) @Parameter(description = "command") final String commandParam,
|
@QueryParam(SchedulerJobApiConstants.COMMAND) @Parameter(description = "command") final String commandParam,
|
||||||
@Parameter(hidden = true) final String jsonRequestBody) {
|
@Parameter(hidden = true) final String jsonRequestBody) {
|
||||||
@@ -168,7 +162,7 @@ public class SchedulerJobApiResource {
|
|||||||
@Path(SHORT_NAME_PARAM + "/{shortName}")
|
@Path(SHORT_NAME_PARAM + "/{shortName}")
|
||||||
@Operation(summary = "Run a Job", description = "Manually Execute Specific Job.")
|
@Operation(summary = "Run a Job", description = "Manually Execute Specific Job.")
|
||||||
@RequestBody(content = @Content(schema = @Schema(implementation = SchedulerJobApiResourceSwagger.ExecuteJobRequest.class)))
|
@RequestBody(content = @Content(schema = @Schema(implementation = SchedulerJobApiResourceSwagger.ExecuteJobRequest.class)))
|
||||||
@ApiResponses({ @ApiResponse(responseCode = "200", description = "POST: jobs/short-name/SA_PINT?command=executeJob") })
|
@ApiResponse(responseCode = "200", description = "POST: jobs/short-name/SA_PINT?command=executeJob")
|
||||||
public Response executeJobByShortName(
|
public Response executeJobByShortName(
|
||||||
@PathParam("shortName") @Parameter(required = true, description = SchedulerJobApiConstants.SHORT_NAME_PARAM) final String shortName,
|
@PathParam("shortName") @Parameter(required = true, description = SchedulerJobApiConstants.SHORT_NAME_PARAM) final String shortName,
|
||||||
@QueryParam(SchedulerJobApiConstants.COMMAND) @Parameter(description = "command") final String commandParam,
|
@QueryParam(SchedulerJobApiConstants.COMMAND) @Parameter(description = "command") final String commandParam,
|
||||||
@@ -180,7 +174,7 @@ public class SchedulerJobApiResource {
|
|||||||
@Path("{" + SchedulerJobApiConstants.JOB_ID + "}")
|
@Path("{" + SchedulerJobApiConstants.JOB_ID + "}")
|
||||||
@Operation(summary = "Update a Job", description = "Updates the details of a job.")
|
@Operation(summary = "Update a Job", description = "Updates the details of a job.")
|
||||||
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = SchedulerJobApiResourceSwagger.PutJobsJobIDRequest.class)))
|
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = SchedulerJobApiResourceSwagger.PutJobsJobIDRequest.class)))
|
||||||
@ApiResponses({ @ApiResponse(responseCode = "200", description = "OK") })
|
@ApiResponse(responseCode = "200", description = "OK")
|
||||||
public String updateJobDetail(@PathParam(SchedulerJobApiConstants.JOB_ID) @Parameter(description = "jobId") final Long jobId,
|
public String updateJobDetail(@PathParam(SchedulerJobApiConstants.JOB_ID) @Parameter(description = "jobId") final Long jobId,
|
||||||
@Parameter(hidden = true) final String jsonRequestBody) {
|
@Parameter(hidden = true) final String jsonRequestBody) {
|
||||||
return updateJobDetail(IdTypeResolver.resolveDefault(), Objects.toString(jobId, null), jsonRequestBody);
|
return updateJobDetail(IdTypeResolver.resolveDefault(), Objects.toString(jobId, null), jsonRequestBody);
|
||||||
@@ -190,7 +184,7 @@ public class SchedulerJobApiResource {
|
|||||||
@Path(SHORT_NAME_PARAM + "/{shortName}")
|
@Path(SHORT_NAME_PARAM + "/{shortName}")
|
||||||
@Operation(summary = "Update a Job", description = "Updates the details of a job.")
|
@Operation(summary = "Update a Job", description = "Updates the details of a job.")
|
||||||
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = SchedulerJobApiResourceSwagger.PutJobsJobIDRequest.class)))
|
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = SchedulerJobApiResourceSwagger.PutJobsJobIDRequest.class)))
|
||||||
@ApiResponses({ @ApiResponse(responseCode = "200", description = "OK") })
|
@ApiResponse(responseCode = "200", description = "OK")
|
||||||
public String updateJobDetailByShortName(
|
public String updateJobDetailByShortName(
|
||||||
@PathParam("shortName") @Parameter(required = true, description = SchedulerJobApiConstants.SHORT_NAME_PARAM) final String shortName,
|
@PathParam("shortName") @Parameter(required = true, description = SchedulerJobApiConstants.SHORT_NAME_PARAM) final String shortName,
|
||||||
@Parameter(hidden = true) final String jsonRequestBody) {
|
@Parameter(hidden = true) final String jsonRequestBody) {
|
||||||
|
|||||||
+6
-13
@@ -25,7 +25,6 @@ import io.swagger.v3.oas.annotations.media.Content;
|
|||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.ws.rs.Consumes;
|
import jakarta.ws.rs.Consumes;
|
||||||
import jakarta.ws.rs.DELETE;
|
import jakarta.ws.rs.DELETE;
|
||||||
@@ -76,8 +75,7 @@ public class ReportMailingJobApiResource {
|
|||||||
+ "name, startDateTime, stretchyReportId, emailRecipients, emailSubject, emailMessage, emailAttachmentFileFormatId, recurrence, isActive\n"
|
+ "name, startDateTime, stretchyReportId, emailRecipients, emailSubject, emailMessage, emailAttachmentFileFormatId, recurrence, isActive\n"
|
||||||
+ "\n" + "Optional Fields: " + "description, stretchyReportParamMap")
|
+ "\n" + "Optional Fields: " + "description, stretchyReportParamMap")
|
||||||
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = ReportMailingJobApiResourceSwagger.PostReportMailingJobsRequest.class)))
|
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = ReportMailingJobApiResourceSwagger.PostReportMailingJobsRequest.class)))
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ReportMailingJobApiResourceSwagger.PostReportMailingJobsResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ReportMailingJobApiResourceSwagger.PostReportMailingJobsResponse.class))) })
|
|
||||||
public String createReportMailingJob(@Parameter(hidden = true) final String apiRequestBodyAsJson) {
|
public String createReportMailingJob(@Parameter(hidden = true) final String apiRequestBodyAsJson) {
|
||||||
final CommandWrapper commandWrapper = new CommandWrapperBuilder()
|
final CommandWrapper commandWrapper = new CommandWrapperBuilder()
|
||||||
.createReportMailingJob(ReportMailingJobConstants.REPORT_MAILING_JOB_ENTITY_NAME).withJson(apiRequestBodyAsJson).build();
|
.createReportMailingJob(ReportMailingJobConstants.REPORT_MAILING_JOB_ENTITY_NAME).withJson(apiRequestBodyAsJson).build();
|
||||||
@@ -93,8 +91,7 @@ public class ReportMailingJobApiResource {
|
|||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Update a Report Mailing Job\n", description = "")
|
@Operation(summary = "Update a Report Mailing Job\n", description = "")
|
||||||
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = ReportMailingJobApiResourceSwagger.PutReportMailingJobsRequest.class)))
|
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = ReportMailingJobApiResourceSwagger.PutReportMailingJobsRequest.class)))
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ReportMailingJobApiResourceSwagger.PutReportMailingJobsResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ReportMailingJobApiResourceSwagger.PutReportMailingJobsResponse.class))) })
|
|
||||||
public String updateReportMailingJob(@PathParam("entityId") @Parameter(description = "entityId") final Long entityId,
|
public String updateReportMailingJob(@PathParam("entityId") @Parameter(description = "entityId") final Long entityId,
|
||||||
@Parameter(hidden = true) final String apiRequestBodyAsJson) {
|
@Parameter(hidden = true) final String apiRequestBodyAsJson) {
|
||||||
final CommandWrapper commandWrapper = new CommandWrapperBuilder()
|
final CommandWrapper commandWrapper = new CommandWrapperBuilder()
|
||||||
@@ -111,8 +108,7 @@ public class ReportMailingJobApiResource {
|
|||||||
@Consumes({ MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.APPLICATION_JSON })
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Delete a Report Mailing Job", description = "")
|
@Operation(summary = "Delete a Report Mailing Job", description = "")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ReportMailingJobApiResourceSwagger.DeleteReportMailingJobsResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ReportMailingJobApiResourceSwagger.DeleteReportMailingJobsResponse.class))) })
|
|
||||||
public String deleteReportMailingJob(@PathParam("entityId") @Parameter(description = "entityId") final Long entityId,
|
public String deleteReportMailingJob(@PathParam("entityId") @Parameter(description = "entityId") final Long entityId,
|
||||||
@Parameter(hidden = true) final String apiRequestBodyAsJson) {
|
@Parameter(hidden = true) final String apiRequestBodyAsJson) {
|
||||||
final CommandWrapper commandWrapper = new CommandWrapperBuilder()
|
final CommandWrapper commandWrapper = new CommandWrapperBuilder()
|
||||||
@@ -130,8 +126,7 @@ public class ReportMailingJobApiResource {
|
|||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Retrieve a Report Mailing Job", description = "Example Requests:\n" + "\n" + "reportmailingjobs/1\n" + "\n" + "\n"
|
@Operation(summary = "Retrieve a Report Mailing Job", description = "Example Requests:\n" + "\n" + "reportmailingjobs/1\n" + "\n" + "\n"
|
||||||
+ "reportmailingjobs/1?template=true")
|
+ "reportmailingjobs/1?template=true")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ReportMailingJobApiResourceSwagger.GetReportMailingJobsResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ReportMailingJobApiResourceSwagger.GetReportMailingJobsResponse.class))) })
|
|
||||||
public String retrieveReportMailingJob(@PathParam("entityId") @Parameter(description = "entityId") final Long entityId,
|
public String retrieveReportMailingJob(@PathParam("entityId") @Parameter(description = "entityId") final Long entityId,
|
||||||
@Context final UriInfo uriInfo) {
|
@Context final UriInfo uriInfo) {
|
||||||
this.platformSecurityContext.authenticatedUser()
|
this.platformSecurityContext.authenticatedUser()
|
||||||
@@ -156,8 +151,7 @@ public class ReportMailingJobApiResource {
|
|||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Retrieve Report Mailing Job Details Template", description = "This is a convenience resource. It can be useful when building maintenance user interface screens for report mailing job applications. The template data returned consists of any or all of:\n"
|
@Operation(summary = "Retrieve Report Mailing Job Details Template", description = "This is a convenience resource. It can be useful when building maintenance user interface screens for report mailing job applications. The template data returned consists of any or all of:\n"
|
||||||
+ "\n" + "Field Defaults\n" + "Allowed description Lists\n" + "Example Request:\n" + "\n" + "reportmailingjobs/template")
|
+ "\n" + "Field Defaults\n" + "Allowed description Lists\n" + "Example Request:\n" + "\n" + "reportmailingjobs/template")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ReportMailingJobApiResourceSwagger.GetReportMailingJobsTemplate.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ReportMailingJobApiResourceSwagger.GetReportMailingJobsTemplate.class))) })
|
|
||||||
public String retrieveReportMailingJobTemplate(@Context final UriInfo uriInfo) {
|
public String retrieveReportMailingJobTemplate(@Context final UriInfo uriInfo) {
|
||||||
this.platformSecurityContext.authenticatedUser()
|
this.platformSecurityContext.authenticatedUser()
|
||||||
.validateHasReadPermission(ReportMailingJobConstants.REPORT_MAILING_JOB_ENTITY_NAME);
|
.validateHasReadPermission(ReportMailingJobConstants.REPORT_MAILING_JOB_ENTITY_NAME);
|
||||||
@@ -174,8 +168,7 @@ public class ReportMailingJobApiResource {
|
|||||||
@Consumes({ MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.APPLICATION_JSON })
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "List Report Mailing Jobs", description = "Example Requests:\n" + "\n" + "reportmailingjobs")
|
@Operation(summary = "List Report Mailing Jobs", description = "Example Requests:\n" + "\n" + "reportmailingjobs")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = ReportMailingJobApiResourceSwagger.GetReportMailingJobsResponse.class))))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = ReportMailingJobApiResourceSwagger.GetReportMailingJobsResponse.class)))) })
|
|
||||||
public String retrieveAllReportMailingJobs(@Context final UriInfo uriInfo,
|
public String retrieveAllReportMailingJobs(@Context final UriInfo uriInfo,
|
||||||
@QueryParam("offset") @Parameter(description = "offset") final Integer offset,
|
@QueryParam("offset") @Parameter(description = "offset") final Integer offset,
|
||||||
@QueryParam("limit") @Parameter(description = "limit") final Integer limit,
|
@QueryParam("limit") @Parameter(description = "limit") final Integer limit,
|
||||||
|
|||||||
+1
-3
@@ -23,7 +23,6 @@ import io.swagger.v3.oas.annotations.Parameter;
|
|||||||
import io.swagger.v3.oas.annotations.media.Content;
|
import io.swagger.v3.oas.annotations.media.Content;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.ws.rs.Consumes;
|
import jakarta.ws.rs.Consumes;
|
||||||
import jakarta.ws.rs.GET;
|
import jakarta.ws.rs.GET;
|
||||||
@@ -63,8 +62,7 @@ public class ReportMailingJobRunHistoryApiResource {
|
|||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "List Report Mailing Job History", description = "The list capability of report mailing job history can support pagination and sorting.\n"
|
@Operation(summary = "List Report Mailing Job History", description = "The list capability of report mailing job history can support pagination and sorting.\n"
|
||||||
+ "\n" + "Example Requests:\n" + "\n" + "reportmailingjobrunhistory/1")
|
+ "\n" + "Example Requests:\n" + "\n" + "reportmailingjobrunhistory/1")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ReportMailingJobRunHistoryData.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ReportMailingJobRunHistoryData.class))) })
|
|
||||||
public String retrieveAllByReportMailingJobId(@Context final UriInfo uriInfo,
|
public String retrieveAllByReportMailingJobId(@Context final UriInfo uriInfo,
|
||||||
@QueryParam("reportMailingJobId") @Parameter(description = "reportMailingJobId") final Long reportMailingJobId,
|
@QueryParam("reportMailingJobId") @Parameter(description = "reportMailingJobId") final Long reportMailingJobId,
|
||||||
@QueryParam("offset") @Parameter(description = "offset") final Integer offset,
|
@QueryParam("offset") @Parameter(description = "offset") final Integer offset,
|
||||||
|
|||||||
+1
-3
@@ -22,7 +22,6 @@ import io.swagger.v3.oas.annotations.Operation;
|
|||||||
import io.swagger.v3.oas.annotations.media.Content;
|
import io.swagger.v3.oas.annotations.media.Content;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.ws.rs.GET;
|
import jakarta.ws.rs.GET;
|
||||||
import jakarta.ws.rs.Path;
|
import jakarta.ws.rs.Path;
|
||||||
@@ -67,8 +66,7 @@ public class UserDetailsApiResource {
|
|||||||
@GET
|
@GET
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Fetch authenticated user details\n", description = "checks the Authentication and returns the set roles and permissions allowed.")
|
@Operation(summary = "Fetch authenticated user details\n", description = "checks the Authentication and returns the set roles and permissions allowed.")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = UserDetailsApiResourceSwagger.GetUserDetailsResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = UserDetailsApiResourceSwagger.GetUserDetailsResponse.class))) })
|
|
||||||
public String fetchAuthenticatedUserData() {
|
public String fetchAuthenticatedUserData() {
|
||||||
|
|
||||||
final SecurityContext context = SecurityContextHolder.getContext();
|
final SecurityContext context = SecurityContextHolder.getContext();
|
||||||
|
|||||||
+3
-7
@@ -25,7 +25,6 @@ import io.swagger.v3.oas.annotations.media.Content;
|
|||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.ws.rs.Consumes;
|
import jakarta.ws.rs.Consumes;
|
||||||
import jakarta.ws.rs.DELETE;
|
import jakarta.ws.rs.DELETE;
|
||||||
@@ -72,8 +71,7 @@ public class SurveyApiResource {
|
|||||||
@Consumes({ MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.APPLICATION_JSON })
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@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", description = "Retrieve surveys. This allows to retrieve the list of survey tables registered .")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = SurveyApiResourceSwagger.GetSurveyResponse.class))))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = SurveyApiResourceSwagger.GetSurveyResponse.class)))) })
|
|
||||||
public String retrieveSurveys() {
|
public String retrieveSurveys() {
|
||||||
|
|
||||||
this.context.authenticatedUser().validateHasReadPermission(SurveyApiConstants.SURVEY_RESOURCE_NAME);
|
this.context.authenticatedUser().validateHasReadPermission(SurveyApiConstants.SURVEY_RESOURCE_NAME);
|
||||||
@@ -87,8 +85,7 @@ public class SurveyApiResource {
|
|||||||
@Consumes({ MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.APPLICATION_JSON })
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@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", description = "Lists a registered survey table details and the Apache Fineract Core application table they are registered to.")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SurveyApiResourceSwagger.GetSurveyResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SurveyApiResourceSwagger.GetSurveyResponse.class))) })
|
|
||||||
public String retrieveSurvey(@PathParam("surveyName") @Parameter(description = "surveyName") final String surveyName) {
|
public String retrieveSurvey(@PathParam("surveyName") @Parameter(description = "surveyName") final String surveyName) {
|
||||||
|
|
||||||
this.context.authenticatedUser().validateHasReadPermission(SurveyApiConstants.SURVEY_RESOURCE_NAME);
|
this.context.authenticatedUser().validateHasReadPermission(SurveyApiConstants.SURVEY_RESOURCE_NAME);
|
||||||
@@ -106,8 +103,7 @@ public class SurveyApiResource {
|
|||||||
@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", 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 ] ")
|
+ "\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)))
|
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = SurveyApiResourceSwagger.PostSurveySurveyNameApptableIdRequest.class)))
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SurveyApiResourceSwagger.PostSurveySurveyNameApptableIdResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = SurveyApiResourceSwagger.PostSurveySurveyNameApptableIdResponse.class))) })
|
|
||||||
public String createDatatableEntry(@PathParam("surveyName") @Parameter(description = "surveyName") final String datatable,
|
public String createDatatableEntry(@PathParam("surveyName") @Parameter(description = "surveyName") final String datatable,
|
||||||
@PathParam("apptableId") @Parameter(description = "apptableId") final Long apptableId, final String apiRequestBodyAsJson) {
|
@PathParam("apptableId") @Parameter(description = "apptableId") final Long apptableId, final String apiRequestBodyAsJson) {
|
||||||
|
|
||||||
|
|||||||
+1
-3
@@ -23,7 +23,6 @@ import io.swagger.v3.oas.annotations.Parameter;
|
|||||||
import io.swagger.v3.oas.annotations.media.Content;
|
import io.swagger.v3.oas.annotations.media.Content;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.ws.rs.Consumes;
|
import jakarta.ws.rs.Consumes;
|
||||||
import jakarta.ws.rs.GET;
|
import jakarta.ws.rs.GET;
|
||||||
@@ -62,8 +61,7 @@ public class NotificationApiResource {
|
|||||||
@Consumes({ MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.APPLICATION_JSON })
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation
|
@Operation
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = NotificationApiResourceSwagger.GetNotificationsResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = NotificationApiResourceSwagger.GetNotificationsResponse.class))) })
|
|
||||||
public String getAllNotifications(@Context final UriInfo uriInfo,
|
public String getAllNotifications(@Context final UriInfo uriInfo,
|
||||||
@QueryParam("orderBy") @Parameter(description = "orderBy") final String orderBy,
|
@QueryParam("orderBy") @Parameter(description = "orderBy") final String orderBy,
|
||||||
@QueryParam("limit") @Parameter(description = "limit") final Integer limit,
|
@QueryParam("limit") @Parameter(description = "limit") final Integer limit,
|
||||||
|
|||||||
+5
-11
@@ -26,7 +26,6 @@ import io.swagger.v3.oas.annotations.media.Content;
|
|||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.ws.rs.Consumes;
|
import jakarta.ws.rs.Consumes;
|
||||||
import jakarta.ws.rs.DefaultValue;
|
import jakarta.ws.rs.DefaultValue;
|
||||||
@@ -100,8 +99,7 @@ public class OfficesApiResource {
|
|||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "List Offices", description = "Example Requests:\n" + "\n" + "offices\n" + "\n" + "\n"
|
@Operation(summary = "List Offices", description = "Example Requests:\n" + "\n" + "offices\n" + "\n" + "\n"
|
||||||
+ "offices?fields=id,name,openingDate")
|
+ "offices?fields=id,name,openingDate")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = OfficesApiResourceSwagger.GetOfficesResponse.class))))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = OfficesApiResourceSwagger.GetOfficesResponse.class)))) })
|
|
||||||
public String retrieveOffices(@Context final UriInfo uriInfo,
|
public String retrieveOffices(@Context final UriInfo uriInfo,
|
||||||
@DefaultValue("false") @QueryParam("includeAllOffices") @Parameter(description = "includeAllOffices") final boolean onlyManualEntries,
|
@DefaultValue("false") @QueryParam("includeAllOffices") @Parameter(description = "includeAllOffices") final boolean onlyManualEntries,
|
||||||
@QueryParam("orderBy") @Parameter(description = "orderBy") final String orderBy,
|
@QueryParam("orderBy") @Parameter(description = "orderBy") final String orderBy,
|
||||||
@@ -122,8 +120,7 @@ public class OfficesApiResource {
|
|||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@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", 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")
|
+ "\n" + "Field Defaults\n" + "Allowed description Lists\n" + "Example Request:\n" + "\n" + "offices/template")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = OfficesApiResourceSwagger.GetOfficesTemplateResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = OfficesApiResourceSwagger.GetOfficesTemplateResponse.class))) })
|
|
||||||
public String retrieveOfficeTemplate(@Context final UriInfo uriInfo) {
|
public String retrieveOfficeTemplate(@Context final UriInfo uriInfo) {
|
||||||
context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSIONS);
|
context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSIONS);
|
||||||
OfficeData office = readPlatformService.retrieveNewOfficeTemplate();
|
OfficeData office = readPlatformService.retrieveNewOfficeTemplate();
|
||||||
@@ -138,8 +135,7 @@ public class OfficesApiResource {
|
|||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Create an Office", description = "Mandatory Fields\n" + "name, openingDate, parentId")
|
@Operation(summary = "Create an Office", description = "Mandatory Fields\n" + "name, openingDate, parentId")
|
||||||
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = OfficesApiResourceSwagger.PostOfficesRequest.class)))
|
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = OfficesApiResourceSwagger.PostOfficesRequest.class)))
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = OfficesApiResourceSwagger.PostOfficesResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = OfficesApiResourceSwagger.PostOfficesResponse.class))) })
|
|
||||||
public String createOffice(@Parameter(hidden = true) final String apiRequestBodyAsJson) {
|
public String createOffice(@Parameter(hidden = true) final String apiRequestBodyAsJson) {
|
||||||
final CommandWrapper commandRequest = new CommandWrapperBuilder() //
|
final CommandWrapper commandRequest = new CommandWrapperBuilder() //
|
||||||
.createOffice() //
|
.createOffice() //
|
||||||
@@ -155,8 +151,7 @@ public class OfficesApiResource {
|
|||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Retrieve an Office", description = "Example Requests:\n" + "\n" + "offices/1\n" + "\n" + "\n"
|
@Operation(summary = "Retrieve an Office", description = "Example Requests:\n" + "\n" + "offices/1\n" + "\n" + "\n"
|
||||||
+ "offices/1?template=true\n" + "\n" + "\n" + "offices/1?fields=id,name,parentName")
|
+ "offices/1?template=true\n" + "\n" + "\n" + "offices/1?fields=id,name,parentName")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = OfficesApiResourceSwagger.GetOfficesResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = OfficesApiResourceSwagger.GetOfficesResponse.class))) })
|
|
||||||
public String retrieveOffice(@PathParam("officeId") @Parameter(description = "officeId") final Long officeId,
|
public String retrieveOffice(@PathParam("officeId") @Parameter(description = "officeId") final Long officeId,
|
||||||
@Context final UriInfo uriInfo) {
|
@Context final UriInfo uriInfo) {
|
||||||
context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSIONS);
|
context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSIONS);
|
||||||
@@ -194,8 +189,7 @@ public class OfficesApiResource {
|
|||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Update Office", description = "")
|
@Operation(summary = "Update Office", description = "")
|
||||||
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = OfficesApiResourceSwagger.PutOfficesOfficeIdRequest.class)))
|
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = OfficesApiResourceSwagger.PutOfficesOfficeIdRequest.class)))
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = OfficesApiResourceSwagger.PutOfficesOfficeIdResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = OfficesApiResourceSwagger.PutOfficesOfficeIdResponse.class))) })
|
|
||||||
public String updateOffice(@PathParam("officeId") @Parameter(description = "officeId") final Long officeId,
|
public String updateOffice(@PathParam("officeId") @Parameter(description = "officeId") final Long officeId,
|
||||||
@Parameter(hidden = true) final String apiRequestBodyAsJson) {
|
@Parameter(hidden = true) final String apiRequestBodyAsJson) {
|
||||||
final CommandWrapper commandRequest = new CommandWrapperBuilder() //
|
final CommandWrapper commandRequest = new CommandWrapperBuilder() //
|
||||||
|
|||||||
+5
-11
@@ -25,7 +25,6 @@ import io.swagger.v3.oas.annotations.media.Content;
|
|||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.ws.rs.Consumes;
|
import jakarta.ws.rs.Consumes;
|
||||||
import jakarta.ws.rs.DELETE;
|
import jakarta.ws.rs.DELETE;
|
||||||
@@ -78,8 +77,7 @@ public class ProvisioningCriteriaApiResource {
|
|||||||
@Consumes({ MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.APPLICATION_JSON })
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@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")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ProvisioningCriteriaApiResourceSwagger.GetProvisioningCriteriaCriteriaIdResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ProvisioningCriteriaApiResourceSwagger.GetProvisioningCriteriaCriteriaIdResponse.class))) })
|
|
||||||
public ProvisioningCriteriaData retrieveProvisioningCriteria(
|
public ProvisioningCriteriaData retrieveProvisioningCriteria(
|
||||||
@PathParam("criteriaId") @Parameter(description = "criteriaId") final Long criteriaId, @Context final UriInfo uriInfo) {
|
@PathParam("criteriaId") @Parameter(description = "criteriaId") final Long criteriaId, @Context final UriInfo uriInfo) {
|
||||||
platformSecurityContext.authenticatedUser();
|
platformSecurityContext.authenticatedUser();
|
||||||
@@ -95,8 +93,7 @@ public class ProvisioningCriteriaApiResource {
|
|||||||
@Consumes({ MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.APPLICATION_JSON })
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Retrieves all created Provisioning Criterias", description = "Retrieves all created Provisioning Criterias")
|
@Operation(summary = "Retrieves all created Provisioning Criterias", description = "Retrieves all created Provisioning Criterias")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = ProvisioningCriteriaApiResourceSwagger.GetProvisioningCriteriaResponse.class))))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = ProvisioningCriteriaApiResourceSwagger.GetProvisioningCriteriaResponse.class)))) })
|
|
||||||
public List<ProvisioningCriteriaData> retrieveAllProvisioningCriterias() {
|
public List<ProvisioningCriteriaData> retrieveAllProvisioningCriterias() {
|
||||||
platformSecurityContext.authenticatedUser();
|
platformSecurityContext.authenticatedUser();
|
||||||
return provisioningCriteriaReadPlatformService.retrieveAllProvisioningCriterias();
|
return provisioningCriteriaReadPlatformService.retrieveAllProvisioningCriterias();
|
||||||
@@ -108,8 +105,7 @@ public class ProvisioningCriteriaApiResource {
|
|||||||
@Operation(summary = "Create a new Provisioning Criteria", description = "Creates a new Provisioning Criteria\n" + "\n"
|
@Operation(summary = "Create a new Provisioning Criteria", description = "Creates a new Provisioning Criteria\n" + "\n"
|
||||||
+ "Mandatory Fields: \n" + "criteriaName\n" + "provisioningcriteria\n" + "\n" + "Optional Fields: \n" + "loanProducts")
|
+ "Mandatory Fields: \n" + "criteriaName\n" + "provisioningcriteria\n" + "\n" + "Optional Fields: \n" + "loanProducts")
|
||||||
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = ProvisioningCriteriaApiResourceSwagger.PostProvisioningCriteriaRequest.class)))
|
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = ProvisioningCriteriaApiResourceSwagger.PostProvisioningCriteriaRequest.class)))
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ProvisioningCriteriaApiResourceSwagger.PostProvisioningCriteriaResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ProvisioningCriteriaApiResourceSwagger.PostProvisioningCriteriaResponse.class))) })
|
|
||||||
public CommandProcessingResult createProvisioningCriteria(@Parameter(hidden = true) final String apiRequestBodyAsJson) {
|
public CommandProcessingResult createProvisioningCriteria(@Parameter(hidden = true) final String apiRequestBodyAsJson) {
|
||||||
platformSecurityContext.authenticatedUser();
|
platformSecurityContext.authenticatedUser();
|
||||||
CommandWrapper commandWrapper = new CommandWrapperBuilder().createProvisioningCriteria().withJson(apiRequestBodyAsJson).build();
|
CommandWrapper commandWrapper = new CommandWrapperBuilder().createProvisioningCriteria().withJson(apiRequestBodyAsJson).build();
|
||||||
@@ -123,8 +119,7 @@ public class ProvisioningCriteriaApiResource {
|
|||||||
@Operation(summary = "Updates a new Provisioning Criteria", description = "Updates a new Provisioning Criteria\n" + "\n"
|
@Operation(summary = "Updates a new Provisioning Criteria", description = "Updates a new Provisioning Criteria\n" + "\n"
|
||||||
+ "Optional Fields\n" + "criteriaName, loanProducts, provisioningcriteria")
|
+ "Optional Fields\n" + "criteriaName, loanProducts, provisioningcriteria")
|
||||||
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = ProvisioningCriteriaApiResourceSwagger.PutProvisioningCriteriaRequest.class)))
|
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = ProvisioningCriteriaApiResourceSwagger.PutProvisioningCriteriaRequest.class)))
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ProvisioningCriteriaApiResourceSwagger.PutProvisioningCriteriaResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ProvisioningCriteriaApiResourceSwagger.PutProvisioningCriteriaResponse.class))) })
|
|
||||||
public CommandProcessingResult updateProvisioningCriteria(
|
public CommandProcessingResult updateProvisioningCriteria(
|
||||||
@PathParam("criteriaId") @Parameter(description = "criteriaId") final Long criteriaId,
|
@PathParam("criteriaId") @Parameter(description = "criteriaId") final Long criteriaId,
|
||||||
@Parameter(hidden = true) final String apiRequestBodyAsJson) {
|
@Parameter(hidden = true) final String apiRequestBodyAsJson) {
|
||||||
@@ -139,8 +134,7 @@ public class ProvisioningCriteriaApiResource {
|
|||||||
@Consumes({ MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.APPLICATION_JSON })
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Deletes Provisioning Criteria", description = "Deletes Provisioning Criteria")
|
@Operation(summary = "Deletes Provisioning Criteria", description = "Deletes Provisioning Criteria")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ProvisioningCriteriaApiResourceSwagger.DeleteProvisioningCriteriaResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ProvisioningCriteriaApiResourceSwagger.DeleteProvisioningCriteriaResponse.class))) })
|
|
||||||
public CommandProcessingResult deleteProvisioningCriteria(
|
public CommandProcessingResult deleteProvisioningCriteria(
|
||||||
@PathParam("criteriaId") @Parameter(description = "criteriaId") final Long criteriaId) {
|
@PathParam("criteriaId") @Parameter(description = "criteriaId") final Long criteriaId) {
|
||||||
platformSecurityContext.authenticatedUser();
|
platformSecurityContext.authenticatedUser();
|
||||||
|
|||||||
+2
-5
@@ -24,7 +24,6 @@ import io.swagger.v3.oas.annotations.media.Content;
|
|||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.ws.rs.Consumes;
|
import jakarta.ws.rs.Consumes;
|
||||||
import jakarta.ws.rs.DefaultValue;
|
import jakarta.ws.rs.DefaultValue;
|
||||||
@@ -104,8 +103,7 @@ public class StaffApiResource {
|
|||||||
@Operation(summary = "Create a staff member", description = "Creates a staff member.\n" + "\n" + "Mandatory Fields: \n"
|
@Operation(summary = "Create a staff member", description = "Creates a staff member.\n" + "\n" + "Mandatory Fields: \n"
|
||||||
+ "officeId, firstname, lastname\n" + "\n" + "Optional Fields: \n" + "isLoanOfficer, isActive")
|
+ "officeId, firstname, lastname\n" + "\n" + "Optional Fields: \n" + "isLoanOfficer, isActive")
|
||||||
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = StaffRequest.class)))
|
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = StaffRequest.class)))
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = StaffApiResourceSwagger.CreateStaffResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = StaffApiResourceSwagger.CreateStaffResponse.class))) })
|
|
||||||
public CommandProcessingResult create(@Parameter(hidden = true) StaffRequest staffRequest) {
|
public CommandProcessingResult create(@Parameter(hidden = true) StaffRequest staffRequest) {
|
||||||
final CommandWrapper commandRequest = new CommandWrapperBuilder().createStaff()
|
final CommandWrapper commandRequest = new CommandWrapperBuilder().createStaff()
|
||||||
.withJson(toApiJsonSerializer.serialize(staffRequest)).build();
|
.withJson(toApiJsonSerializer.serialize(staffRequest)).build();
|
||||||
@@ -136,8 +134,7 @@ public class StaffApiResource {
|
|||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Update a Staff Member", description = "Updates the details of a staff member.")
|
@Operation(summary = "Update a Staff Member", description = "Updates the details of a staff member.")
|
||||||
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = StaffApiResourceSwagger.PutStaffRequest.class)))
|
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = StaffApiResourceSwagger.PutStaffRequest.class)))
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = StaffApiResourceSwagger.UpdateStaffResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = StaffApiResourceSwagger.UpdateStaffResponse.class))) })
|
|
||||||
public CommandProcessingResult update(@PathParam("staffId") @Parameter(description = "staffId") final Long staffId,
|
public CommandProcessingResult update(@PathParam("staffId") @Parameter(description = "staffId") final Long staffId,
|
||||||
@Parameter(hidden = true) StaffRequest staffRequest) {
|
@Parameter(hidden = true) StaffRequest staffRequest) {
|
||||||
final CommandWrapper commandRequest = new CommandWrapperBuilder().updateStaff(staffId)
|
final CommandWrapper commandRequest = new CommandWrapperBuilder().updateStaff(staffId)
|
||||||
|
|||||||
+2
-5
@@ -24,7 +24,6 @@ import io.swagger.v3.oas.annotations.media.Content;
|
|||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.ws.rs.Consumes;
|
import jakarta.ws.rs.Consumes;
|
||||||
import jakarta.ws.rs.GET;
|
import jakarta.ws.rs.GET;
|
||||||
@@ -72,8 +71,7 @@ public class WorkingDaysApiResource {
|
|||||||
@Operation(summary = "Update a Working Day", description = "Mandatory Fields\n"
|
@Operation(summary = "Update a Working Day", description = "Mandatory Fields\n"
|
||||||
+ "recurrence,repaymentRescheduleType,extendTermForDailyRepayments,locale")
|
+ "recurrence,repaymentRescheduleType,extendTermForDailyRepayments,locale")
|
||||||
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = WorkingDaysApiResourceSwagger.PutWorkingDaysRequest.class)))
|
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = WorkingDaysApiResourceSwagger.PutWorkingDaysRequest.class)))
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = WorkingDaysApiResourceSwagger.PutWorkingDaysResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = WorkingDaysApiResourceSwagger.PutWorkingDaysResponse.class))) })
|
|
||||||
public String update(@Parameter(hidden = true) final String jsonRequestBody) {
|
public String update(@Parameter(hidden = true) final String jsonRequestBody) {
|
||||||
|
|
||||||
final CommandWrapper commandRequest = new CommandWrapperBuilder().updateWorkingDays().withJson(jsonRequestBody).build();
|
final CommandWrapper commandRequest = new CommandWrapperBuilder().updateWorkingDays().withJson(jsonRequestBody).build();
|
||||||
@@ -89,8 +87,7 @@ public class WorkingDaysApiResource {
|
|||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@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", 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")
|
+ "\n" + "Example Request:\n" + "\n" + "workingdays/template")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = WorkingDaysApiResourceSwagger.GetWorkingDaysTemplateResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = WorkingDaysApiResourceSwagger.GetWorkingDaysTemplateResponse.class))) })
|
|
||||||
public WorkingDaysData template() {
|
public WorkingDaysData template() {
|
||||||
this.context.authenticatedUser().validateHasReadPermission(WorkingDaysApiConstants.WORKING_DAYS_RESOURCE_NAME);
|
this.context.authenticatedUser().validateHasReadPermission(WorkingDaysApiConstants.WORKING_DAYS_RESOURCE_NAME);
|
||||||
|
|
||||||
|
|||||||
+5
-10
@@ -24,7 +24,6 @@ import io.swagger.v3.oas.annotations.media.Content;
|
|||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.ws.rs.BeanParam;
|
import jakarta.ws.rs.BeanParam;
|
||||||
import jakarta.ws.rs.Consumes;
|
import jakarta.ws.rs.Consumes;
|
||||||
@@ -96,7 +95,7 @@ public class StandingInstructionApiResource {
|
|||||||
+ "Example Requests:\n" + "\n" + "standinginstructions/template?fromAccountType=2&fromOfficeId=1\n" + "\n"
|
+ "Example Requests:\n" + "\n" + "standinginstructions/template?fromAccountType=2&fromOfficeId=1\n" + "\n"
|
||||||
+ "standinginstructions/template?fromAccountType=2&fromOfficeId=1&fromClientId=1&transferType=1\n" + "\n"
|
+ "standinginstructions/template?fromAccountType=2&fromOfficeId=1&fromClientId=1&transferType=1\n" + "\n"
|
||||||
+ "standinginstructions/template?fromClientId=1&fromAccountType=2&fromAccountId=1&transferType=1")
|
+ "standinginstructions/template?fromClientId=1&fromAccountType=2&fromAccountId=1&transferType=1")
|
||||||
@ApiResponses(@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = StandingInstructionApiResourceSwagger.GetStandingInstructionsTemplateResponse.class))))
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = StandingInstructionApiResourceSwagger.GetStandingInstructionsTemplateResponse.class)))
|
||||||
public StandingInstructionData template(@BeanParam StandingInstructionSearchParam instructionParam) {
|
public StandingInstructionData template(@BeanParam StandingInstructionSearchParam instructionParam) {
|
||||||
context.authenticatedUser().validateHasReadPermission(StandingInstructionApiConstants.STANDING_INSTRUCTION_RESOURCE_NAME);
|
context.authenticatedUser().validateHasReadPermission(StandingInstructionApiConstants.STANDING_INSTRUCTION_RESOURCE_NAME);
|
||||||
|
|
||||||
@@ -111,8 +110,7 @@ public class StandingInstructionApiResource {
|
|||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Create new Standing Instruction", description = "Ability to create new instruction for transfer of monetary funds from one account to another")
|
@Operation(summary = "Create new Standing Instruction", 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)))
|
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = StandingInstructionCreationRequest.class)))
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = StandingInstructionApiResourceSwagger.PostStandingInstructionsResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = StandingInstructionApiResourceSwagger.PostStandingInstructionsResponse.class))) })
|
|
||||||
public CommandProcessingResult create(@Parameter(hidden = true) StandingInstructionCreationRequest creationRequest) {
|
public CommandProcessingResult create(@Parameter(hidden = true) StandingInstructionCreationRequest creationRequest) {
|
||||||
final CommandWrapper commandRequest = new CommandWrapperBuilder().createStandingInstruction()
|
final CommandWrapper commandRequest = new CommandWrapperBuilder().createStandingInstruction()
|
||||||
.withJson(toApiJsonSerializer.serialize(creationRequest)).build();
|
.withJson(toApiJsonSerializer.serialize(creationRequest)).build();
|
||||||
@@ -129,8 +127,7 @@ public class StandingInstructionApiResource {
|
|||||||
+ "Ability to modify existing instruction for transfer of monetary funds from one account to another.\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")
|
+ "PUT https://DomainName/api/v1/standinginstructions/1?command=delete")
|
||||||
@RequestBody(content = @Content(schema = @Schema(implementation = StandingInstructionUpdatesRequest.class)))
|
@RequestBody(content = @Content(schema = @Schema(implementation = StandingInstructionUpdatesRequest.class)))
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = StandingInstructionApiResourceSwagger.PutStandingInstructionsStandingInstructionIdResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = StandingInstructionApiResourceSwagger.PutStandingInstructionsStandingInstructionIdResponse.class))) })
|
|
||||||
public CommandProcessingResult update(
|
public CommandProcessingResult update(
|
||||||
@PathParam("standingInstructionId") @Parameter(description = "standingInstructionId") final Long standingInstructionId,
|
@PathParam("standingInstructionId") @Parameter(description = "standingInstructionId") final Long standingInstructionId,
|
||||||
@Parameter(hidden = true) StandingInstructionUpdatesRequest updatesRequest,
|
@Parameter(hidden = true) StandingInstructionUpdatesRequest updatesRequest,
|
||||||
@@ -147,8 +144,7 @@ public class StandingInstructionApiResource {
|
|||||||
@Consumes({ MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.APPLICATION_JSON })
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "List Standing Instructions", description = "Example Requests:\n" + "\n" + "standinginstructions")
|
@Operation(summary = "List Standing Instructions", description = "Example Requests:\n" + "\n" + "standinginstructions")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = StandingInstructionApiResourceSwagger.GetStandingInstructionsResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = StandingInstructionApiResourceSwagger.GetStandingInstructionsResponse.class))) })
|
|
||||||
public Page<StandingInstructionData> retrieveAll(
|
public Page<StandingInstructionData> retrieveAll(
|
||||||
@QueryParam("externalId") @Parameter(description = "externalId") final String externalId,
|
@QueryParam("externalId") @Parameter(description = "externalId") final String externalId,
|
||||||
@QueryParam("offset") @Parameter(description = "offset") final Integer offset,
|
@QueryParam("offset") @Parameter(description = "offset") final Integer offset,
|
||||||
@@ -182,8 +178,7 @@ public class StandingInstructionApiResource {
|
|||||||
@Consumes({ MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.APPLICATION_JSON })
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Retrieve Standing Instruction", description = "Example Requests :\n" + "\n" + "standinginstructions/1")
|
@Operation(summary = "Retrieve Standing Instruction", description = "Example Requests :\n" + "\n" + "standinginstructions/1")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = StandingInstructionApiResourceSwagger.GetStandingInstructionsStandingInstructionIdResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = StandingInstructionApiResourceSwagger.GetStandingInstructionsStandingInstructionIdResponse.class))) })
|
|
||||||
public StandingInstructionData retrieveOne(
|
public StandingInstructionData retrieveOne(
|
||||||
@PathParam("standingInstructionId") @Parameter(description = "standingInstructionId") final Long standingInstructionId,
|
@PathParam("standingInstructionId") @Parameter(description = "standingInstructionId") final Long standingInstructionId,
|
||||||
@Context final UriInfo uriInfo, @QueryParam("externalId") @Parameter(description = "externalId") final String externalId,
|
@Context final UriInfo uriInfo, @QueryParam("externalId") @Parameter(description = "externalId") final String externalId,
|
||||||
|
|||||||
+1
-3
@@ -23,7 +23,6 @@ import io.swagger.v3.oas.annotations.Parameter;
|
|||||||
import io.swagger.v3.oas.annotations.media.Content;
|
import io.swagger.v3.oas.annotations.media.Content;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.ws.rs.Consumes;
|
import jakarta.ws.rs.Consumes;
|
||||||
import jakarta.ws.rs.GET;
|
import jakarta.ws.rs.GET;
|
||||||
@@ -61,8 +60,7 @@ public class StandingInstructionHistoryApiResource {
|
|||||||
@Operation(summary = "Standing Instructions Logged History", description = "The list capability of history can support pagination and sorting \n\n"
|
@Operation(summary = "Standing Instructions Logged History", description = "The list capability of history can support pagination and sorting \n\n"
|
||||||
+ "Example Requests :\n" + "\n" + "standinginstructionrunhistory\n" + "\n"
|
+ "Example Requests :\n" + "\n" + "standinginstructionrunhistory\n" + "\n"
|
||||||
+ "standinginstructionrunhistory?orderBy=name&sortOrder=DESC\n" + "\n" + "standinginstructionrunhistory?offset=10&limit=50")
|
+ "standinginstructionrunhistory?orderBy=name&sortOrder=DESC\n" + "\n" + "standinginstructionrunhistory?offset=10&limit=50")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = StandingInstructionHistoryApiResourceSwagger.GetStandingInstructionRunHistoryResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = StandingInstructionHistoryApiResourceSwagger.GetStandingInstructionRunHistoryResponse.class))) })
|
|
||||||
public Page<StandingInstructionHistoryData> retrieveAll(
|
public Page<StandingInstructionHistoryData> retrieveAll(
|
||||||
@QueryParam("externalId") @Parameter(description = "externalId") final String externalId,
|
@QueryParam("externalId") @Parameter(description = "externalId") final String externalId,
|
||||||
@QueryParam("offset") @Parameter(description = "offset") final Integer offset,
|
@QueryParam("offset") @Parameter(description = "offset") final Integer offset,
|
||||||
|
|||||||
+10
-21
@@ -23,7 +23,6 @@ import io.swagger.v3.oas.annotations.Parameter;
|
|||||||
import io.swagger.v3.oas.annotations.media.Content;
|
import io.swagger.v3.oas.annotations.media.Content;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.ws.rs.Consumes;
|
import jakarta.ws.rs.Consumes;
|
||||||
import jakarta.ws.rs.GET;
|
import jakarta.ws.rs.GET;
|
||||||
@@ -78,8 +77,7 @@ public class ClientTransactionsApiResource {
|
|||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "List Client Transactions", description = "The list capability of client transaction can support pagination."
|
@Operation(summary = "List Client Transactions", 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")
|
+ "\n\n" + "Example Requests:\n\n" + "clients/189/transactions\n\n" + "clients/189/transactions?offset=10&limit=50")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientTransactionsApiResourceSwagger.GetClientsClientIdTransactionsResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientTransactionsApiResourceSwagger.GetClientsClientIdTransactionsResponse.class))) })
|
|
||||||
public String retrieveAllClientTransactions(@PathParam("clientId") @Parameter(description = "clientId") final Long clientId,
|
public String retrieveAllClientTransactions(@PathParam("clientId") @Parameter(description = "clientId") final Long clientId,
|
||||||
@Context final UriInfo uriInfo, @QueryParam("offset") @Parameter(description = "offset") final Integer offset,
|
@Context final UriInfo uriInfo, @QueryParam("offset") @Parameter(description = "offset") final Integer offset,
|
||||||
@QueryParam("limit") @Parameter(description = "limit") final Integer limit) {
|
@QueryParam("limit") @Parameter(description = "limit") final Integer limit) {
|
||||||
@@ -94,8 +92,7 @@ public class ClientTransactionsApiResource {
|
|||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Retrieve a Client Transaction", description = "Example Requests:\n" + "clients/1/transactions/1\n" + "\n" + "\n"
|
@Operation(summary = "Retrieve a Client Transaction", description = "Example Requests:\n" + "clients/1/transactions/1\n" + "\n" + "\n"
|
||||||
+ "clients/1/transactions/1?fields=id,officeName")
|
+ "clients/1/transactions/1?fields=id,officeName")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientTransactionsApiResourceSwagger.GetClientsClientIdTransactionsTransactionIdResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientTransactionsApiResourceSwagger.GetClientsClientIdTransactionsTransactionIdResponse.class))) })
|
|
||||||
public String retrieveClientTransaction(@PathParam("clientId") @Parameter(description = "clientId") final Long clientId,
|
public String retrieveClientTransaction(@PathParam("clientId") @Parameter(description = "clientId") final Long clientId,
|
||||||
@PathParam("transactionId") @Parameter(description = "transactionId") final Long transactionId,
|
@PathParam("transactionId") @Parameter(description = "transactionId") final Long transactionId,
|
||||||
@Context final UriInfo uriInfo) {
|
@Context final UriInfo uriInfo) {
|
||||||
@@ -110,8 +107,7 @@ public class ClientTransactionsApiResource {
|
|||||||
@Consumes({ MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.APPLICATION_JSON })
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Undo a Client Transaction", description = "Undoes a Client Transaction")
|
@Operation(summary = "Undo a Client Transaction", description = "Undoes a Client Transaction")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientTransactionsApiResourceSwagger.PostClientsClientIdTransactionsTransactionIdResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientTransactionsApiResourceSwagger.PostClientsClientIdTransactionsTransactionIdResponse.class))) })
|
|
||||||
public String undoClientTransaction(@PathParam("clientId") @Parameter(description = "clientId") final Long clientId,
|
public String undoClientTransaction(@PathParam("clientId") @Parameter(description = "clientId") final Long clientId,
|
||||||
@PathParam("transactionId") @Parameter(description = "transactionId") final Long transactionId,
|
@PathParam("transactionId") @Parameter(description = "transactionId") final Long transactionId,
|
||||||
@QueryParam("command") @Parameter(description = "command") final String commandParam,
|
@QueryParam("command") @Parameter(description = "command") final String commandParam,
|
||||||
@@ -127,8 +123,7 @@ public class ClientTransactionsApiResource {
|
|||||||
@Operation(summary = "List Client Transactions", description = "The list capability of client transaction can support pagination."
|
@Operation(summary = "List Client Transactions", 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"
|
+ "\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")
|
+ "clients/external-id/7dd80a7c-ycba-a446-t378-91eb6f53e854/transactions?offset=10&limit=50")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientTransactionsApiResourceSwagger.GetClientsClientIdTransactionsResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientTransactionsApiResourceSwagger.GetClientsClientIdTransactionsResponse.class))) })
|
|
||||||
public String retrieveAllClientTransactions(
|
public String retrieveAllClientTransactions(
|
||||||
@PathParam("clientExternalId") @Parameter(description = "clientExternalId") final String clientExternalId,
|
@PathParam("clientExternalId") @Parameter(description = "clientExternalId") final String clientExternalId,
|
||||||
@Context final UriInfo uriInfo, @QueryParam("offset") @Parameter(description = "offset") final Integer offset,
|
@Context final UriInfo uriInfo, @QueryParam("offset") @Parameter(description = "offset") final Integer offset,
|
||||||
@@ -152,8 +147,7 @@ public class ClientTransactionsApiResource {
|
|||||||
@Operation(summary = "Retrieve a Client Transaction", description = "Example Requests:\n"
|
@Operation(summary = "Retrieve a 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\n" + "\n" + "\n"
|
||||||
+ "clients/external-id/7dd80a7c-ycba-a446-t378-91eb6f53e854/transactions/1?fields=id,officeName")
|
+ "clients/external-id/7dd80a7c-ycba-a446-t378-91eb6f53e854/transactions/1?fields=id,officeName")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientTransactionsApiResourceSwagger.GetClientsClientIdTransactionsTransactionIdResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientTransactionsApiResourceSwagger.GetClientsClientIdTransactionsTransactionIdResponse.class))) })
|
|
||||||
public String retrieveClientTransaction(
|
public String retrieveClientTransaction(
|
||||||
@PathParam("clientExternalId") @Parameter(description = "clientExternalId") final String clientExternalId,
|
@PathParam("clientExternalId") @Parameter(description = "clientExternalId") final String clientExternalId,
|
||||||
@PathParam("transactionId") @Parameter(description = "transactionId") final Long transactionId,
|
@PathParam("transactionId") @Parameter(description = "transactionId") final Long transactionId,
|
||||||
@@ -176,8 +170,7 @@ public class ClientTransactionsApiResource {
|
|||||||
@Consumes({ MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.APPLICATION_JSON })
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Undo a Client Transaction", description = "Undoes a Client Transaction")
|
@Operation(summary = "Undo a Client Transaction", description = "Undoes a Client Transaction")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientTransactionsApiResourceSwagger.PostClientsClientIdTransactionsTransactionIdResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientTransactionsApiResourceSwagger.PostClientsClientIdTransactionsTransactionIdResponse.class))) })
|
|
||||||
public String undoClientTransaction(
|
public String undoClientTransaction(
|
||||||
@PathParam("clientExternalId") @Parameter(description = "clientExternalId") final String clientExternalId,
|
@PathParam("clientExternalId") @Parameter(description = "clientExternalId") final String clientExternalId,
|
||||||
@PathParam("transactionId") @Parameter(description = "transactionId") final Long transactionId,
|
@PathParam("transactionId") @Parameter(description = "transactionId") final Long transactionId,
|
||||||
@@ -201,8 +194,7 @@ public class ClientTransactionsApiResource {
|
|||||||
@Operation(summary = "Retrieve a Client Transaction", description = "Example Requests:\n"
|
@Operation(summary = "Retrieve a 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\n" + "\n" + "\n"
|
||||||
+ "clients/1/transactions/external-id/7dd80a7c-ycba-a446-t378-91eb6f53e854?fields=id,officeName")
|
+ "clients/1/transactions/external-id/7dd80a7c-ycba-a446-t378-91eb6f53e854?fields=id,officeName")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientTransactionsApiResourceSwagger.GetClientsClientIdTransactionsTransactionIdResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientTransactionsApiResourceSwagger.GetClientsClientIdTransactionsTransactionIdResponse.class))) })
|
|
||||||
public String retrieveClientTransaction(@PathParam("clientId") @Parameter(description = "clientId") final Long clientId,
|
public String retrieveClientTransaction(@PathParam("clientId") @Parameter(description = "clientId") final Long clientId,
|
||||||
@PathParam("transactionExternalId") @Parameter(description = "transactionExternalId") final String transactionExternalId,
|
@PathParam("transactionExternalId") @Parameter(description = "transactionExternalId") final String transactionExternalId,
|
||||||
@Context final UriInfo uriInfo) {
|
@Context final UriInfo uriInfo) {
|
||||||
@@ -228,8 +220,7 @@ public class ClientTransactionsApiResource {
|
|||||||
+ "clients/external-id/7dd80a7c-ycba-a446-t378-91eb6f53e854/transactions/external-id/7dd80a7c-ycba-a446-t378-91eb6f53e854\n"
|
+ "clients/external-id/7dd80a7c-ycba-a446-t378-91eb6f53e854/transactions/external-id/7dd80a7c-ycba-a446-t378-91eb6f53e854\n"
|
||||||
+ "\n" + "\n"
|
+ "\n" + "\n"
|
||||||
+ "clients/external-id/7dd80a7c-ycba-a446-t378-91eb6f53e854/transactions/external-id/7dd80a7c-ycba-a446-t378-91eb6f53e854?fields=id,officeName")
|
+ "clients/external-id/7dd80a7c-ycba-a446-t378-91eb6f53e854/transactions/external-id/7dd80a7c-ycba-a446-t378-91eb6f53e854?fields=id,officeName")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientTransactionsApiResourceSwagger.GetClientsClientIdTransactionsTransactionIdResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientTransactionsApiResourceSwagger.GetClientsClientIdTransactionsTransactionIdResponse.class))) })
|
|
||||||
public String retrieveClientTransaction(
|
public String retrieveClientTransaction(
|
||||||
@PathParam("clientExternalId") @Parameter(description = "clientExternalId") final String clientExternalId,
|
@PathParam("clientExternalId") @Parameter(description = "clientExternalId") final String clientExternalId,
|
||||||
@PathParam("transactionExternalId") @Parameter(description = "transactionExternalId") final String transactionExternalId,
|
@PathParam("transactionExternalId") @Parameter(description = "transactionExternalId") final String transactionExternalId,
|
||||||
@@ -257,8 +248,7 @@ public class ClientTransactionsApiResource {
|
|||||||
@Consumes({ MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.APPLICATION_JSON })
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Undo a Client Transaction", description = "Undoes a Client Transaction")
|
@Operation(summary = "Undo a Client Transaction", description = "Undoes a Client Transaction")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientTransactionsApiResourceSwagger.PostClientsClientIdTransactionsTransactionIdResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientTransactionsApiResourceSwagger.PostClientsClientIdTransactionsTransactionIdResponse.class))) })
|
|
||||||
public String undoClientTransaction(@PathParam("clientId") @Parameter(description = "clientId") final Long clientId,
|
public String undoClientTransaction(@PathParam("clientId") @Parameter(description = "clientId") final Long clientId,
|
||||||
@PathParam("transactionExternalId") @Parameter(description = "transactionExternalId") final String transactionExternalId,
|
@PathParam("transactionExternalId") @Parameter(description = "transactionExternalId") final String transactionExternalId,
|
||||||
@QueryParam("command") @Parameter(description = "command") final String commandParam,
|
@QueryParam("command") @Parameter(description = "command") final String commandParam,
|
||||||
@@ -278,8 +268,7 @@ public class ClientTransactionsApiResource {
|
|||||||
@Consumes({ MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.APPLICATION_JSON })
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Undo a Client Transaction", description = "Undoes a Client Transaction")
|
@Operation(summary = "Undo a Client Transaction", description = "Undoes a Client Transaction")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientTransactionsApiResourceSwagger.PostClientsClientIdTransactionsTransactionIdResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientTransactionsApiResourceSwagger.PostClientsClientIdTransactionsTransactionIdResponse.class))) })
|
|
||||||
public String undoClientTransaction(
|
public String undoClientTransaction(
|
||||||
@PathParam("clientExternalId") @Parameter(description = "clientExternalId") final String clientExternalId,
|
@PathParam("clientExternalId") @Parameter(description = "clientExternalId") final String clientExternalId,
|
||||||
@PathParam("transactionExternalId") @Parameter(description = "transactionExternalId") final String transactionExternalId,
|
@PathParam("transactionExternalId") @Parameter(description = "transactionExternalId") final String transactionExternalId,
|
||||||
|
|||||||
+23
-41
@@ -24,7 +24,6 @@ import io.swagger.v3.oas.annotations.media.Content;
|
|||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.ws.rs.Consumes;
|
import jakarta.ws.rs.Consumes;
|
||||||
import jakarta.ws.rs.DELETE;
|
import jakarta.ws.rs.DELETE;
|
||||||
@@ -104,8 +103,7 @@ public class ClientsApiResource {
|
|||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Retrieve Client 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 Client Details Template", description = "This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:\n"
|
||||||
+ "\n" + "Field Defaults\n" + "Allowed Value Lists\n\n" + "Example Request:\n" + "\n" + "clients/template")
|
+ "\n" + "Field Defaults\n" + "Allowed Value Lists\n\n" + "Example Request:\n" + "\n" + "clients/template")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.GetClientsTemplateResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.GetClientsTemplateResponse.class))) })
|
|
||||||
public String retrieveTemplate(@Context final UriInfo uriInfo,
|
public String retrieveTemplate(@Context final UriInfo uriInfo,
|
||||||
@Parameter(description = "officeId") @QueryParam("officeId") final Long officeId,
|
@Parameter(description = "officeId") @QueryParam("officeId") final Long officeId,
|
||||||
@QueryParam("commandParam") @Parameter(description = "commandParam") final String commandParam,
|
@QueryParam("commandParam") @Parameter(description = "commandParam") final String commandParam,
|
||||||
@@ -137,8 +135,7 @@ public class ClientsApiResource {
|
|||||||
@Operation(summary = "List Clients", description = "The list capability of clients can support pagination and sorting.\n\n"
|
@Operation(summary = "List Clients", 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"
|
+ "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")
|
+ "clients?offset=10&limit=50\n" + "\n" + "clients?orderBy=displayName&sortOrder=DESC")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.GetClientsResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.GetClientsResponse.class))) })
|
|
||||||
public String retrieveAll(@Context final UriInfo uriInfo,
|
public String retrieveAll(@Context final UriInfo uriInfo,
|
||||||
@QueryParam("officeId") @Parameter(description = "officeId") final Long officeId,
|
@QueryParam("officeId") @Parameter(description = "officeId") final Long officeId,
|
||||||
@QueryParam("externalId") @Parameter(description = "externalId") final String externalId,
|
@QueryParam("externalId") @Parameter(description = "externalId") final String externalId,
|
||||||
@@ -164,8 +161,7 @@ public class ClientsApiResource {
|
|||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Retrieve a Client", description = "Example Requests:\n" + "\n" + "clients/1\n" + "\n" + "\n"
|
@Operation(summary = "Retrieve a Client", description = "Example Requests:\n" + "\n" + "clients/1\n" + "\n" + "\n"
|
||||||
+ "clients/1?template=true\n" + "\n" + "\n" + "clients/1?fields=id,displayName,officeName")
|
+ "clients/1?template=true\n" + "\n" + "\n" + "clients/1?fields=id,displayName,officeName")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.GetClientsClientIdResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.GetClientsClientIdResponse.class))) })
|
|
||||||
public String retrieveOne(@PathParam("clientId") @Parameter(description = "clientId") final Long clientId,
|
public String retrieveOne(@PathParam("clientId") @Parameter(description = "clientId") final Long clientId,
|
||||||
@Context final UriInfo uriInfo,
|
@Context final UriInfo uriInfo,
|
||||||
@DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") @Parameter(description = "staffInSelectedOfficeOnly") final boolean staffInSelectedOfficeOnly) {
|
@DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") @Parameter(description = "staffInSelectedOfficeOnly") final boolean staffInSelectedOfficeOnly) {
|
||||||
@@ -181,8 +177,7 @@ public class ClientsApiResource {
|
|||||||
+ "Mandatory Fields: firstname and lastname OR fullname, officeId, active=true and activationDate OR active=false, if(address enabled) address\n\n"
|
+ "Mandatory Fields: firstname and lastname OR fullname, officeId, active=true and activationDate OR active=false, if(address enabled) address\n\n"
|
||||||
+ "Optional Fields: groupId, externalId, accountNo, staffId, mobileNo, savingsProductId, genderId, clientTypeId, clientClassificationId")
|
+ "Optional Fields: groupId, externalId, accountNo, staffId, mobileNo, savingsProductId, genderId, clientTypeId, clientClassificationId")
|
||||||
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.PostClientsRequest.class)))
|
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.PostClientsRequest.class)))
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.PostClientsResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.PostClientsResponse.class))) })
|
|
||||||
public String create(@Parameter(hidden = true) final String apiRequestBodyAsJson) {
|
public String create(@Parameter(hidden = true) final String apiRequestBodyAsJson) {
|
||||||
|
|
||||||
final CommandWrapper commandRequest = new CommandWrapperBuilder() //
|
final CommandWrapper commandRequest = new CommandWrapperBuilder() //
|
||||||
@@ -204,8 +199,7 @@ public class ClientsApiResource {
|
|||||||
+ "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"
|
+ "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.")
|
+ "\n" + "The relationship between a client and a group must be removed through the Groups API.")
|
||||||
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.PutClientsClientIdRequest.class)))
|
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.PutClientsClientIdRequest.class)))
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.PutClientsClientIdResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.PutClientsClientIdResponse.class))) })
|
|
||||||
public String update(@Parameter(description = "clientId") @PathParam("clientId") final Long clientId,
|
public String update(@Parameter(description = "clientId") @PathParam("clientId") final Long clientId,
|
||||||
@Parameter(hidden = true) final String apiRequestBodyAsJson) {
|
@Parameter(hidden = true) final String apiRequestBodyAsJson) {
|
||||||
return updateClient(clientId, null, apiRequestBodyAsJson);
|
return updateClient(clientId, null, apiRequestBodyAsJson);
|
||||||
@@ -216,8 +210,7 @@ public class ClientsApiResource {
|
|||||||
@Consumes({ MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.APPLICATION_JSON })
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Delete a Client", description = "If a client is in Pending state, you are allowed to Delete it. The delete is a 'hard delete' and cannot be recovered from. Once clients become active or have loans or savings associated with them, you cannot delete the client but you may Close the client if they have left the program.")
|
@Operation(summary = "Delete a Client", description = "If a client is in Pending state, you are allowed to Delete it. The delete is a 'hard delete' and cannot be recovered from. Once clients become active or have loans or savings associated with them, you cannot delete the client but you may Close the client if they have left the program.")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.DeleteClientsClientIdResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.DeleteClientsClientIdResponse.class))) })
|
|
||||||
public String delete(@PathParam("clientId") @Parameter(description = "clientId") final Long clientId) {
|
public String delete(@PathParam("clientId") @Parameter(description = "clientId") final Long clientId) {
|
||||||
return deleteClient(clientId, null);
|
return deleteClient(clientId, null);
|
||||||
}
|
}
|
||||||
@@ -257,8 +250,7 @@ public class ClientsApiResource {
|
|||||||
+ "Abstraction over the Propose and Accept Client Transfer API's which enable a user with Data Scope over both the Target and Destination Branches to directly transfer a Client to the destination Office.\n\n"
|
+ "Abstraction over the Propose and Accept Client Transfer API's which enable a user with Data Scope over both the Target and Destination Branches to directly transfer a Client to the destination Office.\n\n"
|
||||||
+ "Showing request/response for 'Reject a Client Transfer'")
|
+ "Showing request/response for 'Reject a Client Transfer'")
|
||||||
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.PostClientsClientIdRequest.class)))
|
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.PostClientsClientIdRequest.class)))
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.PostClientsClientIdResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.PostClientsClientIdResponse.class))) })
|
|
||||||
public String activate(@PathParam("clientId") @Parameter(description = "clientId") final Long clientId,
|
public String activate(@PathParam("clientId") @Parameter(description = "clientId") final Long clientId,
|
||||||
@QueryParam("command") @Parameter(description = "command") final String commandParam,
|
@QueryParam("command") @Parameter(description = "command") final String commandParam,
|
||||||
@Parameter(hidden = true) final String apiRequestBodyAsJson) {
|
@Parameter(hidden = true) final String apiRequestBodyAsJson) {
|
||||||
@@ -272,9 +264,8 @@ public class ClientsApiResource {
|
|||||||
@Operation(summary = "Retrieve client accounts overview", 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", 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 "
|
+ "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")
|
+ "\n" + "clients/1/accounts\n" + "\n" + "clients/1/accounts?fields=loanAccounts,savingsAccounts")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.GetClientsClientIdAccountsResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.GetClientsClientIdAccountsResponse.class))),
|
@ApiResponse(responseCode = "400", description = "Bad Request")
|
||||||
@ApiResponse(responseCode = "400", description = "Bad Request") })
|
|
||||||
public String retrieveAssociatedAccounts(@PathParam("clientId") @Parameter(description = "clientId") final Long clientId,
|
public String retrieveAssociatedAccounts(@PathParam("clientId") @Parameter(description = "clientId") final Long clientId,
|
||||||
@Context final UriInfo uriInfo) {
|
@Context final UriInfo uriInfo) {
|
||||||
return retrieveClientAccounts(clientId, null, uriInfo);
|
return retrieveClientAccounts(clientId, null, uriInfo);
|
||||||
@@ -305,9 +296,8 @@ public class ClientsApiResource {
|
|||||||
@Path("{clientId}/obligeedetails")
|
@Path("{clientId}/obligeedetails")
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Retrieve client obligee details", description = "Retrieve client obligee details")
|
@Operation(summary = "Retrieve client obligee details", description = "Retrieve client obligee details")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.GetClientObligeeDetailsResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.GetClientObligeeDetailsResponse.class))),
|
@ApiResponse(responseCode = "400", description = "Bad Request")
|
||||||
@ApiResponse(responseCode = "400", description = "Bad Request") })
|
|
||||||
public String retrieveObligeeDetails(@PathParam("clientId") final Long clientId, @Context final UriInfo uriInfo) {
|
public String retrieveObligeeDetails(@PathParam("clientId") final Long clientId, @Context final UriInfo uriInfo) {
|
||||||
return retrieveClientObligeeDetails(clientId, null);
|
return retrieveClientObligeeDetails(clientId, null);
|
||||||
}
|
}
|
||||||
@@ -316,9 +306,8 @@ public class ClientsApiResource {
|
|||||||
@Path("{clientId}/transferproposaldate")
|
@Path("{clientId}/transferproposaldate")
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Retrieve client transfer template", description = "Retrieve client transfer template")
|
@Operation(summary = "Retrieve client transfer template", description = "Retrieve client transfer template")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.GetClientTransferProposalDateResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.GetClientTransferProposalDateResponse.class))),
|
@ApiResponse(responseCode = "400", description = "Bad Request")
|
||||||
@ApiResponse(responseCode = "400", description = "Bad Request") })
|
|
||||||
public String retrieveTransferTemplate(@PathParam("clientId") final Long clientId, @Context final UriInfo uriInfo) {
|
public String retrieveTransferTemplate(@PathParam("clientId") final Long clientId, @Context final UriInfo uriInfo) {
|
||||||
return retrieveClientTransferTemplate(clientId, null);
|
return retrieveClientTransferTemplate(clientId, null);
|
||||||
}
|
}
|
||||||
@@ -328,8 +317,7 @@ public class ClientsApiResource {
|
|||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Retrieve a Client by External Id", description = "Example Requests:\n" + "\n" + "clients/123-456\n" + "\n" + "\n"
|
@Operation(summary = "Retrieve a Client by External Id", 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")
|
+ "clients/123-456?template=true\n" + "\n" + "\n" + "clients/123-456?fields=id,displayName,officeName")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.GetClientsClientIdResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.GetClientsClientIdResponse.class))) })
|
|
||||||
public String retrieveOne(@PathParam("externalId") @Parameter(description = "externalId") final String externalId,
|
public String retrieveOne(@PathParam("externalId") @Parameter(description = "externalId") final String externalId,
|
||||||
@Context final UriInfo uriInfo,
|
@Context final UriInfo uriInfo,
|
||||||
@DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") @Parameter(description = "staffInSelectedOfficeOnly") final boolean staffInSelectedOfficeOnly) {
|
@DefaultValue("false") @QueryParam("staffInSelectedOfficeOnly") @Parameter(description = "staffInSelectedOfficeOnly") final boolean staffInSelectedOfficeOnly) {
|
||||||
@@ -342,9 +330,8 @@ public class ClientsApiResource {
|
|||||||
@Operation(summary = "Retrieve client accounts overview", 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", 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 "
|
+ "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")
|
+ "\n" + "clients/123-456/accounts\n" + "\n" + "clients/123-456/accounts?fields=loanAccounts,savingsAccounts")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.GetClientsClientIdAccountsResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.GetClientsClientIdAccountsResponse.class))),
|
@ApiResponse(responseCode = "400", description = "Bad Request")
|
||||||
@ApiResponse(responseCode = "400", description = "Bad Request") })
|
|
||||||
public String retrieveAssociatedAccounts(@PathParam("externalId") @Parameter(description = "externalId") final String externalId,
|
public String retrieveAssociatedAccounts(@PathParam("externalId") @Parameter(description = "externalId") final String externalId,
|
||||||
@Context final UriInfo uriInfo) {
|
@Context final UriInfo uriInfo) {
|
||||||
return retrieveClientAccounts(null, externalId, uriInfo);
|
return retrieveClientAccounts(null, externalId, uriInfo);
|
||||||
@@ -359,8 +346,7 @@ public class ClientsApiResource {
|
|||||||
+ "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"
|
+ "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.")
|
+ "\n" + "The relationship between a client and a group must be removed through the Groups API.")
|
||||||
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.PutClientsClientIdRequest.class)))
|
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.PutClientsClientIdRequest.class)))
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.PutClientsClientIdResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.PutClientsClientIdResponse.class))) })
|
|
||||||
public String update(@Parameter(description = "externalId") @PathParam("externalId") final String externalId,
|
public String update(@Parameter(description = "externalId") @PathParam("externalId") final String externalId,
|
||||||
@Parameter(hidden = true) final String apiRequestBodyAsJson) {
|
@Parameter(hidden = true) final String apiRequestBodyAsJson) {
|
||||||
return updateClient(null, externalId, apiRequestBodyAsJson);
|
return updateClient(null, externalId, apiRequestBodyAsJson);
|
||||||
@@ -401,8 +387,7 @@ public class ClientsApiResource {
|
|||||||
+ "Abstraction over the Propose and Accept Client Transfer API's which enable a user with Data Scope over both the Target and Destination Branches to directly transfer a Client to the destination Office.\n\n"
|
+ "Abstraction over the Propose and Accept Client Transfer API's which enable a user with Data Scope over both the Target and Destination Branches to directly transfer a Client to the destination Office.\n\n"
|
||||||
+ "Showing request/response for 'Reject a Client Transfer'")
|
+ "Showing request/response for 'Reject a Client Transfer'")
|
||||||
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.PostClientsClientIdRequest.class)))
|
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.PostClientsClientIdRequest.class)))
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.PostClientsClientIdResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.PostClientsClientIdResponse.class))) })
|
|
||||||
public String applyCommand(@PathParam("externalId") @Parameter(description = "externalId") final String externalId,
|
public String applyCommand(@PathParam("externalId") @Parameter(description = "externalId") final String externalId,
|
||||||
@QueryParam("command") @Parameter(description = "command") final String commandParam,
|
@QueryParam("command") @Parameter(description = "command") final String commandParam,
|
||||||
@Parameter(hidden = true) final String apiRequestBodyAsJson) {
|
@Parameter(hidden = true) final String apiRequestBodyAsJson) {
|
||||||
@@ -414,8 +399,7 @@ public class ClientsApiResource {
|
|||||||
@Consumes({ MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.APPLICATION_JSON })
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Delete a Client", description = "If a client is in Pending state, you are allowed to Delete it. The delete is a 'hard delete' and cannot be recovered from. Once clients become active or have loans or savings associated with them, you cannot delete the client but you may Close the client if they have left the program.")
|
@Operation(summary = "Delete a Client", description = "If a client is in Pending state, you are allowed to Delete it. The delete is a 'hard delete' and cannot be recovered from. Once clients become active or have loans or savings associated with them, you cannot delete the client but you may Close the client if they have left the program.")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.DeleteClientsClientIdResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.DeleteClientsClientIdResponse.class))) })
|
|
||||||
public String delete(@PathParam("externalId") @Parameter(description = "externalId") final String externalId) {
|
public String delete(@PathParam("externalId") @Parameter(description = "externalId") final String externalId) {
|
||||||
return deleteClient(null, externalId);
|
return deleteClient(null, externalId);
|
||||||
}
|
}
|
||||||
@@ -424,9 +408,8 @@ public class ClientsApiResource {
|
|||||||
@Path("/external-id/{externalId}/obligeedetails")
|
@Path("/external-id/{externalId}/obligeedetails")
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Retrieve client obligee details", description = "Retrieve client obligee details using the client external Id")
|
@Operation(summary = "Retrieve client obligee details", description = "Retrieve client obligee details using the client external Id")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.GetClientObligeeDetailsResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.GetClientObligeeDetailsResponse.class))),
|
@ApiResponse(responseCode = "400", description = "Bad Request")
|
||||||
@ApiResponse(responseCode = "400", description = "Bad Request") })
|
|
||||||
public String retrieveObligeeDetails(@PathParam("externalId") final String externalId, @Context final UriInfo uriInfo) {
|
public String retrieveObligeeDetails(@PathParam("externalId") final String externalId, @Context final UriInfo uriInfo) {
|
||||||
return retrieveClientObligeeDetails(null, externalId);
|
return retrieveClientObligeeDetails(null, externalId);
|
||||||
}
|
}
|
||||||
@@ -435,9 +418,8 @@ public class ClientsApiResource {
|
|||||||
@Path("/external-id/{externalId}/transferproposaldate")
|
@Path("/external-id/{externalId}/transferproposaldate")
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Retrieve client transfer template", description = "Retrieve client transfer template using the client external Id")
|
@Operation(summary = "Retrieve client transfer template", description = "Retrieve client transfer template using the client external Id")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.GetClientTransferProposalDateResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = ClientsApiResourceSwagger.GetClientTransferProposalDateResponse.class))),
|
@ApiResponse(responseCode = "400", description = "Bad Request")
|
||||||
@ApiResponse(responseCode = "400", description = "Bad Request") })
|
|
||||||
public String retrieveTransferTemplate(@PathParam("externalId") final String externalId, @Context final UriInfo uriInfo) {
|
public String retrieveTransferTemplate(@PathParam("externalId") final String externalId, @Context final UriInfo uriInfo) {
|
||||||
return retrieveClientTransferTemplate(null, externalId);
|
return retrieveClientTransferTemplate(null, externalId);
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-9
@@ -24,7 +24,6 @@ import io.swagger.v3.oas.annotations.media.Content;
|
|||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.ws.rs.Consumes;
|
import jakarta.ws.rs.Consumes;
|
||||||
import jakarta.ws.rs.DELETE;
|
import jakarta.ws.rs.DELETE;
|
||||||
@@ -108,8 +107,7 @@ public class CollateralsApiResource {
|
|||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@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", description = "Example Requests:\n" + "\n" + "/loans/1/collaterals/1\n" + "\n" + "\n"
|
||||||
+ "/loans/1/collaterals/1?fields=description,description")
|
+ "/loans/1/collaterals/1?fields=description,description")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CollateralsApiResourceSwagger.GetLoansLoanIdCollateralsResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CollateralsApiResourceSwagger.GetLoansLoanIdCollateralsResponse.class))) })
|
|
||||||
public String retrieveCollateralDetails(@Context final UriInfo uriInfo,
|
public String retrieveCollateralDetails(@Context final UriInfo uriInfo,
|
||||||
@PathParam("loanId") @Parameter(description = "loanId") final Long loanId,
|
@PathParam("loanId") @Parameter(description = "loanId") final Long loanId,
|
||||||
@PathParam("collateralId") @Parameter(description = "collateralId") final Long CollateralId) {
|
@PathParam("collateralId") @Parameter(description = "collateralId") final Long CollateralId) {
|
||||||
@@ -132,8 +130,7 @@ public class CollateralsApiResource {
|
|||||||
@Produces({ 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", description = "Note: Currently, Collaterals may be added only before a Loan is approved")
|
||||||
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = LoansLoanIdCollateralsRequest.class)))
|
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = LoansLoanIdCollateralsRequest.class)))
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CollateralsApiResourceSwagger.PostLoansLoanIdCollateralsResponse.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,
|
public CommandProcessingResult createCollateral(@PathParam("loanId") @Parameter(description = "loanId") final Long loanId,
|
||||||
@Parameter(hidden = true) final LoansLoanIdCollateralsRequest loansLoanIdCollateralsRequest) {
|
@Parameter(hidden = true) final LoansLoanIdCollateralsRequest loansLoanIdCollateralsRequest) {
|
||||||
|
|
||||||
@@ -149,8 +146,7 @@ public class CollateralsApiResource {
|
|||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Update a Collateral")
|
@Operation(summary = "Update a Collateral")
|
||||||
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = LoansLoandIdCollateralsCollateralIdRequest.class)))
|
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = LoansLoandIdCollateralsCollateralIdRequest.class)))
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CollateralsApiResourceSwagger.PutLoansLoanIdCollateralsCollateralIdResponse.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,
|
public CommandProcessingResult updateCollateral(@PathParam("loanId") @Parameter(description = "loanId") final Long loanId,
|
||||||
@PathParam("collateralId") @Parameter(description = "collateralId") final Long collateralId,
|
@PathParam("collateralId") @Parameter(description = "collateralId") final Long collateralId,
|
||||||
@Parameter(hidden = true) final LoansLoandIdCollateralsCollateralIdRequest loansLoandIdCollateralsCollateralIdRequest) {
|
@Parameter(hidden = true) final LoansLoandIdCollateralsCollateralIdRequest loansLoandIdCollateralsCollateralIdRequest) {
|
||||||
@@ -165,8 +161,7 @@ public class CollateralsApiResource {
|
|||||||
@Consumes({ MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.APPLICATION_JSON })
|
||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@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", description = "Note: A collateral can only be removed from Loans that are not yet approved.")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CollateralsApiResourceSwagger.DeleteLoansLoanIdCollateralsCollateralIdResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CollateralsApiResourceSwagger.DeleteLoansLoanIdCollateralsCollateralIdResponse.class))) })
|
|
||||||
public CommandProcessingResult deleteCollateral(@PathParam("loanId") @Parameter(description = "loanId") final Long loanId,
|
public CommandProcessingResult deleteCollateral(@PathParam("loanId") @Parameter(description = "loanId") final Long loanId,
|
||||||
@PathParam("collateralId") @Parameter(description = "collateralId") final Long collateralId) {
|
@PathParam("collateralId") @Parameter(description = "collateralId") final Long collateralId) {
|
||||||
final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteCollateral(loanId, collateralId).build();
|
final CommandWrapper commandRequest = new CommandWrapperBuilder().deleteCollateral(loanId, collateralId).build();
|
||||||
|
|||||||
+3
-7
@@ -24,7 +24,6 @@ import io.swagger.v3.oas.annotations.media.Content;
|
|||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
import io.swagger.v3.oas.annotations.responses.ApiResponse;
|
||||||
import io.swagger.v3.oas.annotations.responses.ApiResponses;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import jakarta.ws.rs.Consumes;
|
import jakarta.ws.rs.Consumes;
|
||||||
import jakarta.ws.rs.DELETE;
|
import jakarta.ws.rs.DELETE;
|
||||||
@@ -69,8 +68,7 @@ public class CollateralManagementApiResource {
|
|||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Create a new collateral", description = "Collateral Creation")
|
@Operation(summary = "Create a new collateral", description = "Collateral Creation")
|
||||||
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = CollateralManagementProductRequest.class)))
|
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = CollateralManagementProductRequest.class)))
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CollateralManagementApiResourceSwagger.PostCollateralManagementProductResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CollateralManagementApiResourceSwagger.PostCollateralManagementProductResponse.class))) })
|
|
||||||
public CommandProcessingResult createCollateral(
|
public CommandProcessingResult createCollateral(
|
||||||
@Parameter(hidden = true) final CollateralManagementProductRequest collateralManagementProductRequest) {
|
@Parameter(hidden = true) final CollateralManagementProductRequest collateralManagementProductRequest) {
|
||||||
final CommandWrapper commandWrapper = new CommandWrapperBuilder().createCollateral()
|
final CommandWrapper commandWrapper = new CommandWrapperBuilder().createCollateral()
|
||||||
@@ -117,8 +115,7 @@ public class CollateralManagementApiResource {
|
|||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Update Collateral", description = "Update Collateral")
|
@Operation(summary = "Update Collateral", description = "Update Collateral")
|
||||||
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = CollateralProductRequest.class)))
|
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = CollateralProductRequest.class)))
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CollateralManagementApiResourceSwagger.PutCollateralProductResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CollateralManagementApiResourceSwagger.PutCollateralProductResponse.class))) })
|
|
||||||
public CommandProcessingResult updateCollateral(
|
public CommandProcessingResult updateCollateral(
|
||||||
@PathParam("collateralId") @Parameter(description = "collateralId") final Long collateralId,
|
@PathParam("collateralId") @Parameter(description = "collateralId") final Long collateralId,
|
||||||
@Parameter(hidden = true) final CollateralProductRequest collateralProductRequest) {
|
@Parameter(hidden = true) final CollateralProductRequest collateralProductRequest) {
|
||||||
@@ -133,8 +130,7 @@ public class CollateralManagementApiResource {
|
|||||||
@Produces({ MediaType.APPLICATION_JSON })
|
@Produces({ MediaType.APPLICATION_JSON })
|
||||||
@Consumes({ MediaType.APPLICATION_JSON })
|
@Consumes({ MediaType.APPLICATION_JSON })
|
||||||
@Operation(summary = "Delete a Collateral", description = "Delete Collateral")
|
@Operation(summary = "Delete a Collateral", description = "Delete Collateral")
|
||||||
@ApiResponses({
|
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CollateralManagementApiResourceSwagger.DeleteCollateralProductResponse.class)))
|
||||||
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CollateralManagementApiResourceSwagger.DeleteCollateralProductResponse.class))) })
|
|
||||||
public CommandProcessingResult deleteCollateral(
|
public CommandProcessingResult deleteCollateral(
|
||||||
@PathParam("collateralId") @Parameter(description = "collateralId") final Long collateralId) {
|
@PathParam("collateralId") @Parameter(description = "collateralId") final Long collateralId) {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user