update swagger configure
This commit is contained in:
+18
-5
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user