11package com .ittovative .otpservice .config ;
22
3- import com .ittovative .otpservice .dto .OtpRequestDto ;
4- import com .ittovative .otpservice .dto .TokenDto ;
3+ import com .ittovative .otpservice .dto .OTPRequestDTO ;
4+ import com .ittovative .otpservice .dto .TokenDTO ;
5+ import com .ittovative .otpservice .util .APIResponse ;
56import io .swagger .v3 .oas .annotations .Operation ;
67import io .swagger .v3 .oas .annotations .media .Content ;
78import io .swagger .v3 .oas .annotations .media .ExampleObject ;
89import io .swagger .v3 .oas .annotations .media .Schema ;
910import io .swagger .v3 .oas .annotations .parameters .RequestBody ;
1011import io .swagger .v3 .oas .annotations .responses .ApiResponse ;
1112import org .apache .coyote .BadRequestException ;
12- import org .springframework .http .ResponseEntity ;
1313
14- import static com .ittovative .otpservice .constant .HttpConstant .APPLICATION_JSON ;
15- import static com .ittovative .otpservice .constant .HttpConstant .BAD_REQUEST ;
16- import static com .ittovative .otpservice .constant .HttpConstant .CREATED ;
17- import static com .ittovative .otpservice .constant .HttpConstant .NOT_FOUND ;
18- import static com .ittovative .otpservice .constant .HttpConstant .OK ;
14+ import static com .ittovative .otpservice .constant .HTTPConstant .APPLICATION_JSON ;
15+ import static com .ittovative .otpservice .constant .HTTPConstant .BAD_REQUEST ;
16+ import static com .ittovative .otpservice .constant .HTTPConstant .CREATED ;
17+ import static com .ittovative .otpservice .constant .HTTPConstant .NOT_FOUND ;
18+ import static com .ittovative .otpservice .constant .HTTPConstant .OK ;
1919import static com .ittovative .otpservice .constant .SwaggerConstant .INVALID_PHONE_NUMBER_FORMAT_RESPONSE_DESCRIPTION ;
2020import static com .ittovative .otpservice .constant .SwaggerConstant .INVALID_PHONE_NUMBER_FORMAT_RESPONSE_EXAMPLE ;
2121import static com .ittovative .otpservice .constant .SwaggerConstant .INVALID_TOKEN_RESPONSE_DESCRIPTION ;
@@ -43,7 +43,7 @@ public interface SwaggerConfig {
4343 description = SEND_OTP_REQUEST_BODY_DESCRIPTION ,
4444 content = @ Content (
4545 mediaType = APPLICATION_JSON ,
46- schema = @ Schema (implementation = OtpRequestDto .class ),
46+ schema = @ Schema (implementation = OTPRequestDTO .class ),
4747 examples = @ ExampleObject (value = SEND_OTP_REQUEST_BODY_EXAMPLE )
4848 )
4949 ),
@@ -53,7 +53,7 @@ public interface SwaggerConfig {
5353 description = OTP_SENT_RESPONSE_DESCRIPTION ,
5454 content = @ Content (
5555 mediaType = APPLICATION_JSON ,
56- schema = @ Schema (implementation = com . ittovative . otpservice . util . ApiResponse .class ),
56+ schema = @ Schema (implementation = APIResponse .class ),
5757 examples = @ ExampleObject (value = OTP_SENT_RESPONSE_EXAMPLE )
5858 )
5959 ),
@@ -62,21 +62,21 @@ public interface SwaggerConfig {
6262 description = INVALID_PHONE_NUMBER_FORMAT_RESPONSE_DESCRIPTION ,
6363 content = @ Content (
6464 mediaType = APPLICATION_JSON ,
65- schema = @ Schema (implementation = com . ittovative . otpservice . util . ApiResponse .class ),
65+ schema = @ Schema (implementation = APIResponse .class ),
6666 examples = @ ExampleObject (value = INVALID_PHONE_NUMBER_FORMAT_RESPONSE_EXAMPLE )
6767 )
6868 )
6969 }
7070 )
71- ResponseEntity < com . ittovative . otpservice . util . ApiResponse < String >> sendMessage (OtpRequestDto otpRequestDto );
71+ APIResponse < String > sendMessage (OTPRequestDTO otpRequestDto );
7272
7373 @ Operation (summary = VERIFY_TOKEN_SUMMARY , description = VERIFY_TOKEN_DESCRIPTION ,
7474 requestBody = @ RequestBody (
7575 required = true ,
7676 description = VERIFY_TOKEN_REQUEST_BODY_DESCRIPTION ,
7777 content = @ Content (
7878 mediaType = APPLICATION_JSON ,
79- schema = @ Schema (implementation = OtpRequestDto .class ),
79+ schema = @ Schema (implementation = OTPRequestDTO .class ),
8080 examples = @ ExampleObject (value = VERIFY_TOKEN_REQUEST_BODY_EXAMPLE )
8181 )
8282 ),
@@ -86,7 +86,7 @@ public interface SwaggerConfig {
8686 description = TOKEN_VERIFIED_RESPONSE_DESCRIPTION ,
8787 content = @ Content (
8888 mediaType = APPLICATION_JSON ,
89- schema = @ Schema (implementation = com . ittovative . otpservice . util . ApiResponse .class ),
89+ schema = @ Schema (implementation = APIResponse .class ),
9090 examples = @ ExampleObject (value = TOKEN_VERIFIED_RESPONSE_EXAMPLE )
9191 )
9292 ),
@@ -95,7 +95,7 @@ public interface SwaggerConfig {
9595 description = TOKEN_EXPIRED_RESPONSE_DESCRIPTION ,
9696 content = @ Content (
9797 mediaType = APPLICATION_JSON ,
98- schema = @ Schema (implementation = com . ittovative . otpservice . util . ApiResponse .class ),
98+ schema = @ Schema (implementation = APIResponse .class ),
9999 examples = @ ExampleObject (value = TOKEN_EXPIRED_RESPONSE_EXAMPLE )
100100 )
101101 ),
@@ -104,12 +104,11 @@ public interface SwaggerConfig {
104104 description = INVALID_TOKEN_RESPONSE_DESCRIPTION ,
105105 content = @ Content (
106106 mediaType = APPLICATION_JSON ,
107- schema = @ Schema (implementation = com . ittovative . otpservice . util . ApiResponse .class ),
107+ schema = @ Schema (implementation = APIResponse .class ),
108108 examples = @ ExampleObject (value = INVALID_TOKEN_RESPONSE_EXAMPLE )
109109 )
110110 ),
111111 }
112112 )
113- ResponseEntity <com .ittovative .otpservice .util .ApiResponse <String >> verify (
114- TokenDto tokenDto ) throws BadRequestException ;
113+ APIResponse <String > verify (TokenDTO tokenDto ) throws BadRequestException ;
115114}
0 commit comments