-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
✨ [FEAT] swagger 추가 및 인증 로직 스케줄러 구현
- Loading branch information
Showing
9 changed files
with
235 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
src/main/java/com/carely/backend/controller/docs/EasyCodefAPI.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package com.carely.backend.controller.docs; | ||
|
||
import com.carely.backend.dto.easyCodef.AdditionalAuthDTO; | ||
import com.carely.backend.dto.easyCodef.RequestUserIdentityDTO; | ||
import com.carely.backend.dto.response.ErrorResponseDTO; | ||
import com.carely.backend.dto.response.ResponseDTO; | ||
import com.carely.backend.service.EasyCodef.EasyCodefResponse; | ||
import com.fasterxml.jackson.core.JsonProcessingException; | ||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.media.Content; | ||
import io.swagger.v3.oas.annotations.media.ExampleObject; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponse; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponses; | ||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
|
||
import java.io.UnsupportedEncodingException; | ||
|
||
public interface EasyCodefAPI { | ||
@Operation(summary = "주민번호 인증", description = "주민등록번호를 인증합니다.") | ||
@ApiResponses(value = { | ||
@ApiResponse(responseCode = "200", description = "주민번호 인증에 성공했을 경우", | ||
content = @Content(mediaType = "application/json", | ||
schema = @Schema(implementation = ResponseDTO.class), | ||
examples = @ExampleObject(value = """ | ||
{ | ||
"status": 200, | ||
"code": "SUCCESS_GET_IDENTITY", | ||
"message": "주민등록번호가 인증되었습니다.", | ||
"data": null | ||
} | ||
"""))), | ||
|
||
@ApiResponse(responseCode = "404", description = "주민등록번호가 유효하지 않거나, 인증되지 않은 경우", | ||
content = @Content(mediaType = "application/json", | ||
schema = @Schema(implementation = ErrorResponseDTO.class), | ||
examples = { | ||
@ExampleObject(value = """ | ||
{ | ||
"status": 404, | ||
"code": "NOT_IDENTITY_USER", | ||
"message": "주민등록번호가 유효하지 않습니다..", | ||
"data": null | ||
} | ||
""") | ||
})) | ||
}) | ||
public ResponseEntity<ResponseDTO> connectAPI(@RequestBody RequestUserIdentityDTO requestUserIdentityDTO) throws InterruptedException, UnsupportedEncodingException, JsonProcessingException; | ||
} |
19 changes: 19 additions & 0 deletions
19
src/main/java/com/carely/backend/dto/document/ResponseDocumentDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.carely.backend.dto.document; | ||
|
||
import lombok.Builder; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
@Builder | ||
public class ResponseDocumentDTO { | ||
private String myType; | ||
private String myName; | ||
private String volunteerSessionType; | ||
private String partnerType; | ||
private String partnerName; | ||
private String volunteerDate; | ||
private String myIdentity; | ||
private String address; | ||
private int durationTimes; | ||
private String content; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/main/java/com/carely/backend/exception/IdentityNotAcceptableException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.carely.backend.exception; | ||
|
||
public class IdentityNotAcceptableException extends RuntimeException{ | ||
public IdentityNotAcceptableException(String message) { | ||
super(message); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.