-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BG-163]: swagger 세팅 (2.5h / 4h) #13
Conversation
security config에 swagger 설정 추가
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dto를 data class로 변환하는 것도 대부분 된 것 같넹!
이거 merge 할 때 그 카드도 같이 옮겨도 되겠당!
고생했엉 👍🏼
import io.swagger.v3.oas.annotations.media.Schema | ||
|
||
data class JwtTokenResponse( | ||
@Schema( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dto도 swagger 관련된 부분 interface로 뺄 수 없을까??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Response로 되어 있는 부분은 전부 controller 영역에서만 호출하게 해놔서
Interface로 빼게 되면 너무 과하지 않을까 싶은데..
어떻게 생각해?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아하!ㅎㅎ
굳이긴 해!
.description("Api Documentation") | ||
|
||
return OpenAPI() | ||
.addServersItem(Server().url("http://localhost:8080").description("Local Server")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요런 주소는 밖에서 주입해주는게 어떨까 싶은뎅!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
좋아~ 👍
ServletUriComponentsBuilder | ||
.fromCurrentRequest() | ||
.path("/{id}") | ||
.buildAndExpand(workspaceFacadeService.createWorkspace(token.id, request.toDto())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이게 Location
헤더에 해당 URI 넣어주려고 하는거지??
근데 workspaceFacadeService.createWorkspace(token.id, request.toDto())
이 결과가 Long
으로 반환되고 있지 않은 것 같아!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
그렇네 pr pull 하는 과정에서 바뀌었넹
👍 좋아용~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아주 좋아용~
Why
swagger 설정을 추가함
How
swagger 설정을 비즈니스 로직에서 안들어내기 위해
Interface 및 Request, Response를 활용함
Result
테스트 변경 사항 없음
Link
BG-163