-
Notifications
You must be signed in to change notification settings - Fork 4
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
사용자 정보 조회 api 추가 #256
사용자 정보 조회 api 추가 #256
Changes from 1 commit
54efd51
c2db49b
c376e7b
b6a2af8
8ed7519
e8bc894
98d6322
837b7d0
7cb34cc
a88573d
029f489
eb31921
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,9 +3,9 @@ | |
import com.ddang.ddang.chat.application.dto.ReadParticipatingChatRoomDto; | ||
import com.ddang.ddang.chat.application.exception.ChatRoomNotFoundException; | ||
import com.ddang.ddang.chat.application.exception.UserNotAccessibleException; | ||
import com.ddang.ddang.chat.application.exception.UserNotFoundException; | ||
import com.ddang.ddang.chat.domain.ChatRoom; | ||
import com.ddang.ddang.chat.infrastructure.persistence.JpaChatRoomRepository; | ||
import com.ddang.ddang.user.application.exception.UserNotFoundException; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 예외 통일 좋습니다 👍 |
||
import com.ddang.ddang.user.domain.User; | ||
import com.ddang.ddang.user.infrastructure.persistence.JpaUserRepository; | ||
import lombok.RequiredArgsConstructor; | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
import com.ddang.ddang.auction.application.dto.ReadRegionsDto; | ||
import com.ddang.ddang.auction.application.exception.AuctionNotFoundException; | ||
import com.ddang.ddang.auction.presentation.dto.request.CreateAuctionRequest; | ||
import com.ddang.ddang.bid.application.exception.UserNotFoundException; | ||
import com.ddang.ddang.user.application.exception.UserNotFoundException; | ||
import com.ddang.ddang.category.application.exception.CategoryNotFoundException; | ||
import com.ddang.ddang.configuration.RestDocsConfiguration; | ||
import com.ddang.ddang.exception.GlobalExceptionHandler; | ||
|
@@ -150,7 +150,8 @@ void setUp(@Autowired RestDocumentationContextProvider provider) { | |
fieldWithPath("image").type(JsonFieldType.STRING).description("경매 대표 이미지"), | ||
fieldWithPath("auctionPrice").type(JsonFieldType.NUMBER).description("시작가"), | ||
fieldWithPath("status").type(JsonFieldType.STRING).description("경매 상태"), | ||
fieldWithPath("auctioneerCount").type(JsonFieldType.NUMBER).description("경매 참여자 수") | ||
fieldWithPath("auctioneerCount").type(JsonFieldType.NUMBER) | ||
.description("경매 참여자 수") | ||
) | ||
) | ||
); | ||
|
@@ -432,7 +433,8 @@ void setUp(@Autowired RestDocumentationContextProvider provider) { | |
given(auctionService.readByAuctionId(anyLong())).willReturn(auction); | ||
|
||
// when & then | ||
mockMvc.perform(RestDocumentationRequestBuilders.get("/auctions/{auctionId}", auction.id()).contentType(MediaType.APPLICATION_JSON)) | ||
mockMvc.perform(RestDocumentationRequestBuilders.get("/auctions/{auctionId}", auction.id()) | ||
.contentType(MediaType.APPLICATION_JSON)) | ||
.andExpectAll( | ||
status().isOk(), | ||
jsonPath("$.auction.id", is(auction.id()), Long.class), | ||
|
@@ -453,27 +455,43 @@ void setUp(@Autowired RestDocumentationContextProvider provider) { | |
fieldWithPath("auction.id").type(JsonFieldType.NUMBER).description("경매 글 ID"), | ||
fieldWithPath("auction.images").type(JsonFieldType.ARRAY).description("경매 이미지"), | ||
fieldWithPath("auction.title").type(JsonFieldType.STRING).description("경매 글 제목"), | ||
fieldWithPath("auction.category").type(JsonFieldType.OBJECT).description("경매 카테고리"), | ||
fieldWithPath("auction.category.main").type(JsonFieldType.STRING).description("상위 카테고리"), | ||
fieldWithPath("auction.category.sub").type(JsonFieldType.STRING).description("하위 카테고리"), | ||
fieldWithPath("auction.description").type(JsonFieldType.STRING).description("경매 본문"), | ||
fieldWithPath("auction.startPrice").type(JsonFieldType.NUMBER).description("시작가"), | ||
fieldWithPath("auction.category").type(JsonFieldType.OBJECT) | ||
.description("경매 카테고리"), | ||
fieldWithPath("auction.category.main").type(JsonFieldType.STRING) | ||
.description("상위 카테고리"), | ||
fieldWithPath("auction.category.sub").type(JsonFieldType.STRING) | ||
.description("하위 카테고리"), | ||
fieldWithPath("auction.description").type(JsonFieldType.STRING) | ||
.description("경매 본문"), | ||
fieldWithPath("auction.startPrice").type(JsonFieldType.NUMBER) | ||
.description("시작가"), | ||
fieldWithPath("auction.lastBidPrice").description("마지막 입찰가"), | ||
fieldWithPath("auction.status").description("경매 상태"), | ||
fieldWithPath("auction.bidUnit").type(JsonFieldType.NUMBER).description("입찰 단위"), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 461번째 줄 부터 470번째 줄 까지도 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. 오! 그렇게 결정했었군요! 그렇다면 죄송..함다.. |
||
fieldWithPath("auction.registerTime").type(JsonFieldType.STRING).description("경매 등록시간"), | ||
fieldWithPath("auction.closingTime").type(JsonFieldType.STRING).description("경매 마감시간"), | ||
fieldWithPath("auction.directRegions").type(JsonFieldType.ARRAY).description("모든 직거래 지역"), | ||
fieldWithPath("auction.directRegions.[]").type(JsonFieldType.ARRAY).description("단일 직거래 지역"), | ||
fieldWithPath("auction.directRegions.[].first").type(JsonFieldType.STRING).description("첫 번째 직거래 지역"), | ||
fieldWithPath("auction.directRegions.[].second").type(JsonFieldType.STRING).description("두 번째 직거래 지역"), | ||
fieldWithPath("auction.directRegions.[].third").type(JsonFieldType.STRING).description("세 번째 직거래 지역"), | ||
fieldWithPath("auction.auctioneerCount").type(JsonFieldType.NUMBER).description("경매 참여자 수"), | ||
fieldWithPath("auction.registerTime").type(JsonFieldType.STRING) | ||
.description("경매 등록시간"), | ||
fieldWithPath("auction.closingTime").type(JsonFieldType.STRING) | ||
.description("경매 마감시간"), | ||
fieldWithPath("auction.directRegions").type(JsonFieldType.ARRAY) | ||
.description("모든 직거래 지역"), | ||
fieldWithPath("auction.directRegions.[]").type(JsonFieldType.ARRAY) | ||
.description("단일 직거래 지역"), | ||
fieldWithPath("auction.directRegions.[].first").type(JsonFieldType.STRING) | ||
.description("첫 번째 직거래 지역"), | ||
fieldWithPath("auction.directRegions.[].second").type(JsonFieldType.STRING) | ||
.description("두 번째 직거래 지역"), | ||
fieldWithPath("auction.directRegions.[].third").type(JsonFieldType.STRING) | ||
.description("세 번째 직거래 지역"), | ||
fieldWithPath("auction.auctioneerCount").type(JsonFieldType.NUMBER) | ||
.description("경매 참여자 수"), | ||
fieldWithPath("seller").type(JsonFieldType.OBJECT).description("판매자 정보"), | ||
fieldWithPath("seller.id").type(JsonFieldType.NUMBER).description("판매자 ID"), | ||
fieldWithPath("seller.image").type(JsonFieldType.STRING).description("판매자 프로필 이미지 주소"), | ||
fieldWithPath("seller.nickname").type(JsonFieldType.STRING).description("판매자 닉네임"), | ||
fieldWithPath("seller.reliability").type(JsonFieldType.NUMBER).description("판매자 신뢰도") | ||
fieldWithPath("seller.image").type(JsonFieldType.STRING) | ||
.description("판매자 프로필 이미지 주소"), | ||
fieldWithPath("seller.nickname").type(JsonFieldType.STRING) | ||
.description("판매자 닉네임"), | ||
fieldWithPath("seller.reliability").type(JsonFieldType.NUMBER) | ||
.description("판매자 신뢰도") | ||
) | ||
) | ||
); | ||
|
@@ -550,7 +568,7 @@ void setUp(@Autowired RestDocumentationContextProvider provider) { | |
|
||
// when & then | ||
mockMvc.perform(get("/auctions").contentType(MediaType.APPLICATION_JSON) | ||
.queryParam("size", "10") | ||
.queryParam("size", "10") | ||
) | ||
.andExpectAll( | ||
status().isOk(), | ||
|
@@ -575,13 +593,19 @@ void setUp(@Autowired RestDocumentationContextProvider provider) { | |
), | ||
responseFields( | ||
fieldWithPath("auctions").type(JsonFieldType.ARRAY).description("조회한 경매 목록"), | ||
fieldWithPath("auctions.[]").type(JsonFieldType.ARRAY).description("조회한 단일 경매 정보"), | ||
fieldWithPath("auctions.[]").type(JsonFieldType.ARRAY) | ||
.description("조회한 단일 경매 정보"), | ||
fieldWithPath("auctions.[].id").type(JsonFieldType.NUMBER).description("경매 ID"), | ||
fieldWithPath("auctions.[].title").type(JsonFieldType.STRING).description("경매 글 제목"), | ||
fieldWithPath("auctions.[].image").type(JsonFieldType.STRING).description("경매 대표 이미지"), | ||
fieldWithPath("auctions.[].auctionPrice").type(JsonFieldType.NUMBER).description("경매가(시작가, 현재가, 낙찰가 중 하나)"), | ||
fieldWithPath("auctions.[].status").type(JsonFieldType.STRING).description("경매 상태"), | ||
fieldWithPath("auctions.[].auctioneerCount").type(JsonFieldType.NUMBER).description("경매 참여자 수"), | ||
fieldWithPath("auctions.[].title").type(JsonFieldType.STRING) | ||
.description("경매 글 제목"), | ||
fieldWithPath("auctions.[].image").type(JsonFieldType.STRING) | ||
.description("경매 대표 이미지"), | ||
fieldWithPath("auctions.[].auctionPrice").type(JsonFieldType.NUMBER) | ||
.description("경매가(시작가, 현재가, 낙찰가 중 하나)"), | ||
fieldWithPath("auctions.[].status").type(JsonFieldType.STRING) | ||
.description("경매 상태"), | ||
fieldWithPath("auctions.[].auctioneerCount").type(JsonFieldType.NUMBER) | ||
.description("경매 참여자 수"), | ||
fieldWithPath("isLast").type(JsonFieldType.BOOLEAN).description("마지막 페이지 여부") | ||
) | ||
) | ||
|
@@ -594,7 +618,8 @@ void setUp(@Autowired RestDocumentationContextProvider provider) { | |
willDoNothing().given(auctionService).deleteByAuctionId(anyLong(), anyLong()); | ||
|
||
// when & then | ||
mockMvc.perform(RestDocumentationRequestBuilders.delete("/auctions/{auctionId}", 1L).contentType(MediaType.APPLICATION_JSON)) | ||
mockMvc.perform(RestDocumentationRequestBuilders.delete("/auctions/{auctionId}", 1L) | ||
.contentType(MediaType.APPLICATION_JSON)) | ||
.andExpectAll(status().isNoContent()) | ||
.andDo( | ||
restDocs.document( | ||
|
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.
import 관련 정렬이 안 된 곳이 있었나 봐요... 허허
혹은 각각 intellij 설정이 약간씩 다른 것일 수도..?!