FINERACT-2421: Refractor - remove ApiResponses annotations (Phase 6)

This commit is contained in:
Aman Mittal
2026-01-26 15:48:24 +01:00
committed by Adam Saghy
parent c74e661281
commit 6aafb308ea
24 changed files with 115 additions and 238 deletions
@@ -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.parameters.RequestBody;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.ws.rs.Consumes;
import jakarta.ws.rs.DELETE;
@@ -67,8 +66,7 @@ public class LoanInterestPauseApiResource {
@Consumes({ MediaType.APPLICATION_JSON })
@Produces({ MediaType.APPLICATION_JSON })
@Operation(summary = "Create a new interest pause period for a loan", description = "Allows users to define a period during which no interest will be accrued for a specific loan.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "Command successfully processed", content = @Content(schema = @Schema(implementation = CommandProcessingResult.class))) })
@ApiResponse(responseCode = "200", description = "Command successfully processed", content = @Content(schema = @Schema(implementation = CommandProcessingResult.class)))
public CommandProcessingResult createInterestPause(@PathParam("loanId") @Parameter(description = "loanId") final Long loanId,
@RequestBody(required = true) final InterestPauseRequestDto request) {
@@ -84,8 +82,7 @@ public class LoanInterestPauseApiResource {
@Consumes({ MediaType.APPLICATION_JSON })
@Produces({ MediaType.APPLICATION_JSON })
@Operation(summary = "Create a new interest pause for a loan using external ID", description = "Allows users to define a period during which no interest will be accrued for a specific loan using the external loan ID.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "Command successfully processed", content = @Content(schema = @Schema(implementation = CommandProcessingResult.class))) })
@ApiResponse(responseCode = "200", description = "Command successfully processed", content = @Content(schema = @Schema(implementation = CommandProcessingResult.class)))
public CommandProcessingResult createInterestPauseByExternalId(
@PathParam("loanExternalId") @Parameter(description = "loanExternalId") final String loanExternalId,
@RequestBody(required = true) final InterestPauseRequestDto request) {
@@ -102,8 +99,7 @@ public class LoanInterestPauseApiResource {
@Path("/{loanId}/interest-pauses")
@Produces({ MediaType.APPLICATION_JSON })
@Operation(summary = "Retrieve all interest pause periods for a loan", description = "Fetches a list of all active interest pause periods for a specific loan.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "List of interest pause periods", content = @Content(array = @ArraySchema(schema = @Schema(implementation = InterestPauseResponseDto.class)))) })
@ApiResponse(responseCode = "200", description = "List of interest pause periods", content = @Content(array = @ArraySchema(schema = @Schema(implementation = InterestPauseResponseDto.class))))
public List<InterestPauseResponseDto> retrieveInterestPauses(
@PathParam("loanId") @Parameter(description = "loanId") final Long loanId) {
@@ -116,8 +112,7 @@ public class LoanInterestPauseApiResource {
@Path("/external-id/{loanExternalId}/interest-pauses")
@Produces({ MediaType.APPLICATION_JSON })
@Operation(summary = "Retrieve all interest pause periods for a loan using external ID", description = "Fetches a list of all active interest pause periods for a specific loan using the external loan ID.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "List of interest pause periods", content = @Content(array = @ArraySchema(schema = @Schema(implementation = InterestPauseResponseDto.class)))) })
@ApiResponse(responseCode = "200", description = "List of interest pause periods", content = @Content(array = @ArraySchema(schema = @Schema(implementation = InterestPauseResponseDto.class))))
public List<InterestPauseResponseDto> retrieveInterestPausesByExternalId(
@PathParam("loanExternalId") @Parameter(description = "loanExternalId") final String loanExternalId) {
@@ -129,7 +124,7 @@ public class LoanInterestPauseApiResource {
@DELETE
@Path("/{loanId}/interest-pauses/{variationId}")
@Operation(summary = "Delete an interest pause period", description = "Deletes a specific interest pause period by its variation ID.")
@ApiResponses({ @ApiResponse(responseCode = "204", description = "No Content") })
@ApiResponse(responseCode = "204", description = "No Content")
public Response deleteInterestPause(@PathParam("loanId") @Parameter(description = "loanId") final Long loanId,
@PathParam("variationId") @Parameter(description = "variationId") final Long variationId) {
@@ -145,7 +140,7 @@ public class LoanInterestPauseApiResource {
@DELETE
@Path("/external-id/{loanExternalId}/interest-pauses/{variationId}")
@Operation(summary = "Delete an interest pause period by external id", description = "Deletes a specific interest pause period by its variation ID.")
@ApiResponses({ @ApiResponse(responseCode = "204", description = "No Content") })
@ApiResponse(responseCode = "204", description = "No Content")
public Response deleteInterestPauseByExternalId(
@PathParam("loanExternalId") @Parameter(description = "loanExternalId") final String loanExternalId,
@PathParam("variationId") @Parameter(description = "variationId") final Long variationId) {
@@ -164,8 +159,7 @@ public class LoanInterestPauseApiResource {
@Consumes({ MediaType.APPLICATION_JSON })
@Produces({ MediaType.APPLICATION_JSON })
@Operation(summary = "Update an interest pause period", description = "Updates a specific interest pause period by its variation ID.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "Command successfully processed", content = @Content(schema = @Schema(implementation = CommandProcessingResult.class))) })
@ApiResponse(responseCode = "200", description = "Command successfully processed", content = @Content(schema = @Schema(implementation = CommandProcessingResult.class)))
public CommandProcessingResult updateInterestPause(@PathParam("loanId") @Parameter(description = "loanId") final Long loanId,
@PathParam("variationId") @Parameter(description = "variationId") final Long variationId,
@RequestBody(required = true) final InterestPauseRequestDto request) {
@@ -183,8 +177,7 @@ public class LoanInterestPauseApiResource {
@Consumes({ MediaType.APPLICATION_JSON })
@Produces({ MediaType.APPLICATION_JSON })
@Operation(summary = "Update an interest pause period by external id", description = "Updates a specific interest pause period by its variation ID.")
@ApiResponses({
@ApiResponse(responseCode = "200", description = "Command successfully processed", content = @Content(schema = @Schema(implementation = CommandProcessingResult.class))) })
@ApiResponse(responseCode = "200", description = "Command successfully processed", content = @Content(schema = @Schema(implementation = CommandProcessingResult.class)))
public CommandProcessingResult updateInterestPauseByExternalId(
@PathParam("loanExternalId") @Parameter(description = "loanExternalId") final String loanExternalId,
@PathParam("variationId") @Parameter(description = "variationId") final Long variationId,
@@ -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.parameters.RequestBody;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.ws.rs.Consumes;
import jakarta.ws.rs.POST;
@@ -72,8 +71,7 @@ public class LoanScheduleApiResource {
+ "It updates the loan repayment schedule by removing Loan term variations\n\n"
+ "Showing request/response for 'Updates loan repayment schedule by removing Loan term variations'")
@RequestBody(required = true, content = @Content(schema = @Schema(implementation = LoanScheduleApiResourceSwagger.PostLoansLoanIdScheduleRequest.class)))
@ApiResponses({
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoanScheduleApiResourceSwagger.PostLoansLoanIdScheduleResponse.class))) })
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoanScheduleApiResourceSwagger.PostLoansLoanIdScheduleResponse.class)))
public String calculateLoanScheduleOrSubmitVariableSchedule(@PathParam("loanId") @Parameter(description = "loanId") final Long loanId,
@QueryParam("command") @Parameter(description = "command") final String commandParam, @Context final UriInfo uriInfo,
@Parameter(hidden = true) final String apiRequestBodyAsJson) {