Skip to content

Commit

Permalink
Feat: 스웨거 태그 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
tokyj515 committed Jul 30, 2023
1 parent 84e53b6 commit 7c60524
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
import com.example.neoul.global.entity.BaseEntity;
import com.example.neoul.global.exception.BadRequestException;
import com.example.neoul.service.AuthService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;


@RestController
@Api(tags={"01.user"})
@RequestMapping("/oauth")
@RequiredArgsConstructor
public class AuthController {
Expand All @@ -22,7 +24,8 @@ public class AuthController {
* https://kauth.kakao.com/oauth/authorize?response_type=code&client_id=abf4119e38a436ab64718033228aad2d&redirect_uri=http://localhost:8080/oauth/kakao
* */
@ApiOperation(value = "인가코드 캐치를 위한 api, 사용x, 백엔드 터미널로 반환중",
notes = "원래는 프론트엔드가 첫 회원가입 링크로 들어가서 code를 받고, 그 받은 코드로 이 api에 접근해서" +
notes = "https://kauth.kakao.com/oauth/authorize?response_type=code&client_id=abf4119e38a436ab64718033228aad2d&redirect_uri=http://localhost:8080/oauth/kakao" +
"원래는 프론트엔드가 첫 회원가입 링크로 들어가서 code를 받고, 그 받은 코드로 이 api에 접근해서" +
"카카오의 access_token을 반환 후" +
"access_token을 /kakao/login의 요청에 넣어서 우리 사이트의 로그인하고 그 결과를 얻음")
@GetMapping("/kakao")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import com.example.neoul.global.entity.ApiResponse;
import com.example.neoul.global.exception.BadRequestException;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
Expand All @@ -12,6 +14,7 @@

@Slf4j
@RestController
@Api(tags={"00.test"})
@RequestMapping("/test")
public class TestController {
@GetMapping("/testapi")
Expand All @@ -21,7 +24,7 @@ public ResponseEntity test(){
}


//API 응답 반환 형식 예
@ApiOperation(value = "API 응답 반환 형식 예", notes = "API 응답 반환 형식 예")
@GetMapping("")
public ApiResponse<String> test2(@RequestParam(required = false) String s){

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@


import com.example.neoul.service.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
Expand All @@ -11,6 +12,7 @@

@RequiredArgsConstructor
@RestController
@Api(tags={"01.user"})
@RequestMapping("/user")
public class UserController {

Expand Down
4 changes: 4 additions & 0 deletions src/main/java/com/example/neoul/entity/user/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ public class User extends BaseEntity {

private String social;

@Column(name = "first_login")
private boolean firstLogin;




@JsonIgnore
Expand Down

0 comments on commit 7c60524

Please sign in to comment.