update swagger configure

This commit is contained in:
Mohd-Arham
2025-12-09 18:30:22 +05:30
parent 74e4f86d67
commit 13bfd34bbd
11 changed files with 322 additions and 119 deletions
@@ -11,6 +11,14 @@ import org.springframework.web.bind.annotation.RestController;
import com.billpaymentservice.bbps.dto.ResponseModel;
import com.billpaymentservice.bbps.dto.request.PollBackRequest;
import com.billpaymentservice.bbps.service.PollBackService;
import com.billpaymentservice.bbps.util.ApiDocCommonResponses;
import com.billpaymentservice.bbps.util.BBPSConstant;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
@RequestMapping("/payment")
@RestController
@@ -21,9 +29,14 @@ public class PaymentPollBackController {
public PaymentPollBackController(PollBackService pollBackService) {
this.pollBackService = pollBackService;
}
@PostMapping(value = "/pollback", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<ResponseModel> startIntentPayment(@Validated @RequestBody PollBackRequest pollBackRequest) {
ResponseModel response = pollBackService.managePollBack(pollBackRequest);
return ResponseEntity.ok(response);
}
@PostMapping(value = "/pollback")
@Operation(summary = "Process poll-back request", description = "This API handles the poll-back request from biller.")
@ApiResponses(value = {
@ApiResponse(responseCode = BBPSConstant.OK_STR, description = "Poll Back processed successfully", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ResponseModel.class))) })
@ApiDocCommonResponses
public ResponseEntity<ResponseModel> startIntentPayment(@Validated @RequestBody PollBackRequest pollBackRequest) {
ResponseModel response = pollBackService.managePollBack(pollBackRequest);
return ResponseEntity.ok(response);
}
}