<aside> 💡 http://{ ip주소}:8080/swagger-ui/index.html#

</aside>

규칙

Controller

@Tag(name = "Test", description = "Test 관련 API 입니다.")
@RequestMapping("/api/v1/test")
@RestController
public class TestController {

    @Autowired
    private UserTestRepository userTestRepository;

    @Operation(summary = "회원가입", description = "회원가입을 합니다.")
    @PostMapping("/user/register")
    public ResponseEntity<?> registerUser(@RequestBody UserTestDto dto){
					...
        return ResponseEntity.ok(registeredUser);

    }
    @Operation(summary = "회원 조회", description = "id로 회원을 조회합니다.")
    @Parameter(name = "id", description = "회원 ID" ,example = "107")
    @GetMapping("/userInfo/{id}")
    public ResponseEntity<?> getUserInfo(@PathVariable("id")Integer id){
						...
        return ResponseEntity.ok(dto);
  

RequestDto

public class UserTestDto {

    @Schema(description = "이메일")
    private String email;

    @Schema(description = "비밀번호")
    private String password;

    @Schema(description = "생년월일",example = "1999-01-01")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "Asia/Seoul")
    private LocalDate birth;

    @Schema(description = "핸드폰번호")
    private String phone;

    @Schema(description = "성별", example = "M")
    @Pattern(regexp = "^[MF]$")
    private String gender;

    @Schema(description = "권한", defaultValue = "1")
    private String role;

    @Schema(description = "활성상태", defaultValue = "1")
    private int status;

    @Schema(description = "닉네임")
    private String nickname;

    @Schema(description = "이미지url")
    private String imgUrl;

    @Schema(description = "소셜 로그인 제공자")
    private String provider;

    @Schema(description = "유저 식별자")
    private String providerId;

}