diff --git a/backend/memetory/src/main/java/com/example/memetory/domain/member/controller/MemberApi.java b/backend/memetory/src/main/java/com/example/memetory/domain/member/controller/MemberApi.java new file mode 100644 index 00000000..922de8ae --- /dev/null +++ b/backend/memetory/src/main/java/com/example/memetory/domain/member/controller/MemberApi.java @@ -0,0 +1,31 @@ +package com.example.memetory.domain.member.controller; + +import com.example.memetory.domain.member.dto.MemberSignUpRequest; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.responses.ApiResponses; +import io.swagger.v3.oas.annotations.security.SecurityRequirement; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; + +@Tag(name = "Member") +public interface MemberApi { + + @Operation( + summary = "회원가입", + description = "첫 소셜로그인 후 추가 정보 기입", + security = {@SecurityRequirement(name = "access_token")} + ) + @ApiResponses(value = { + @ApiResponse( + responseCode = "200", + description = "회원가입 성공!" + ) + }) + ResponseEntity register( + MemberSignUpRequest memberSignUpRequest, + @Parameter(hidden = true) String email + ); +} diff --git a/backend/memetory/src/main/java/com/example/memetory/domain/member/controller/MemberController.java b/backend/memetory/src/main/java/com/example/memetory/domain/member/controller/MemberController.java index e588582a..a5798255 100644 --- a/backend/memetory/src/main/java/com/example/memetory/domain/member/controller/MemberController.java +++ b/backend/memetory/src/main/java/com/example/memetory/domain/member/controller/MemberController.java @@ -8,7 +8,6 @@ import com.example.memetory.domain.member.dto.MemberServiceDto; import com.example.memetory.domain.member.dto.MemberSignUpRequest; -import com.example.memetory.domain.member.entity.Member; import com.example.memetory.domain.member.service.MemberService; import com.example.memetory.global.annotation.LoginMemberEmail; @@ -16,17 +15,18 @@ @RestController @RequiredArgsConstructor -public class MemberController { +public class MemberController implements MemberApi { - private final MemberService memberService; + private final MemberService memberService; - @PostMapping("/sign-up") - public ResponseEntity register(@RequestBody MemberSignUpRequest memberSignUpRequest, - @LoginMemberEmail String email) { - MemberServiceDto memberServiceDto = memberSignUpRequest.toServiceDto(email); + @PostMapping("/sign-up") + @Override + public ResponseEntity register(@RequestBody MemberSignUpRequest memberSignUpRequest, + @LoginMemberEmail String email) { + MemberServiceDto memberServiceDto = memberSignUpRequest.toServiceDto(email); - memberService.register(memberServiceDto); + memberService.register(memberServiceDto); - return ResponseEntity.status(HttpStatus.OK).build(); - } + return ResponseEntity.status(HttpStatus.OK).build(); + } }