Skip to content

Commit 45f0aa3

Browse files
committed
feat(center-login): 기관 로그인 스웨거 명세 추가
1 parent e073168 commit 45f0aa3

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

src/main/java/com/somemore/center/controller/CenterSignController.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,37 @@
11
package com.somemore.center.controller;
22

33
import com.somemore.auth.signout.usecase.SignOutUseCase;
4+
import com.somemore.center.dto.request.CenterSignRequestDto;
45
import com.somemore.global.common.response.ApiResponse;
6+
import io.swagger.v3.oas.annotations.Parameter;
57
import io.swagger.v3.oas.annotations.tags.Tag;
68
import jakarta.servlet.http.HttpServletResponse;
79
import lombok.RequiredArgsConstructor;
810
import lombok.extern.slf4j.Slf4j;
911
import org.springframework.security.core.annotation.AuthenticationPrincipal;
1012
import org.springframework.web.bind.annotation.PostMapping;
13+
import org.springframework.web.bind.annotation.RequestBody;
1114
import org.springframework.web.bind.annotation.RequestMapping;
15+
import org.springframework.web.bind.annotation.RequestParam;
1216
import org.springframework.web.bind.annotation.RestController;
1317

1418
@RestController
1519
@Slf4j
1620
@RequiredArgsConstructor
1721
@RequestMapping("/api/center")
18-
@Tag(name = "center Sign API", description = "기관 로그아웃")
22+
@Tag(name = "center Sign API", description = "기관 로그인, 로그아웃")
1923
public class CenterSignController {
2024

2125
private final SignOutUseCase signOutUseCase;
2226

27+
@PostMapping("/sign-in")
28+
public ApiResponse<String> signIn(
29+
@RequestBody CenterSignRequestDto requestDto
30+
) {
31+
32+
return ApiResponse.ok("로그인되었습니다.");
33+
}
34+
2335
@PostMapping("/sign-out")
2436
public ApiResponse<String> signOut(
2537
HttpServletResponse response,
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package com.somemore.center.dto.request;
2+
3+
import com.fasterxml.jackson.databind.PropertyNamingStrategies.SnakeCaseStrategy;
4+
import com.fasterxml.jackson.databind.annotation.JsonNaming;
5+
import io.swagger.v3.oas.annotations.media.Schema;
6+
import lombok.Builder;
7+
8+
@JsonNaming(SnakeCaseStrategy.class)
9+
@Builder
10+
public record CenterSignRequestDto(
11+
@Schema(description = "기관 아이디", example = "somemore")
12+
String accountId,
13+
@Schema(description = "기관 패스워드", example = "password1234")
14+
String accountPassword
15+
) {
16+
17+
}

0 commit comments

Comments
 (0)