Skip to content
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

restdocs 문서가 깨지는 문제 해결 #719

Merged
merged 2 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions backend/ddang/src/docs/asciidoc/docs.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ include::{snippets}/authentication-controller-test/access-token과_refresh-token
==== 요청

include::{snippets}/authentication-controller-test/ouath2-type과_access-token과_refresh-token을_전달하면_탈퇴한다/http-request.adoc[]
include::{snippets}/authentication-controller-test/ouath2-type과_access-token과_refresh-token을_전달하면_탈퇴한다/path-parameters.adoc[]
include::{snippets}/authentication-controller-test/ouath2-type과_access-token과_refresh-token을_전달하면_탈퇴한다/request-headers.adoc[]
include::{snippets}/authentication-controller-test/ouath2-type과_access-token과_refresh-token을_전달하면_탈퇴한다/request-fields.adoc[]

Expand Down Expand Up @@ -464,7 +463,7 @@ include::{snippets}/report-controller-test/질문_신고를_등록한다/request

include::{snippets}/report-controller-test/질문_신고를_등록한다/http-response.adoc[]

=== 채팅방 신고 조회
=== 질문 신고 조회

==== 요청

Expand All @@ -487,7 +486,7 @@ include::{snippets}/report-controller-test/답변_신고를_등록한다/request

include::{snippets}/report-controller-test/답변_신고를_등록한다/http-response.adoc[]

=== 채팅방 신고 조회
=== 답변 신고 조회

==== 요청

Expand Down Expand Up @@ -549,7 +548,7 @@ include::{snippets}/review-controller-test/주어진_사용자가_받은_평가_
include::{snippets}/review-controller-test/주어진_사용자가_받은_평가_목록을_최신순으로_조회한다/http-response.adoc[]
include::{snippets}/review-controller-test/주어진_사용자가_받은_평가_목록을_최신순으로_조회한다/response-fields.adoc[]

=== 사용자가_경매_거래_상대에게_작성한_평가를_조회한다
=== 사용자가 경매 거래 상대에게 작성한 평가를 조회한다

==== 요청
include::{snippets}/auction-review-controller-test/사용자가_경매_거래에_작성한_평가를_조회한다/http-request.adoc[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
@Entity
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Getter
@EqualsAndHashCode(of = "id")
@EqualsAndHashCode(of = "id", callSuper = false)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

칭찬

감사합니다🙇🏻‍♀️

@ToString(of = {"id", "contents"})
public class Message extends BaseCreateTimeEntity {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
@Entity
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Getter
@EqualsAndHashCode(of = "id")
@EqualsAndHashCode(of = "id", callSuper = false)
@ToString(of = {"id", "description"})
public class AnswerReport extends BaseCreateTimeEntity {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
@Entity
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Getter
@EqualsAndHashCode(of = "id")
@EqualsAndHashCode(of = "id", callSuper = false)
@ToString(of = {"id", "description"})
public class AuctionReport extends BaseCreateTimeEntity {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
@Entity
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@Getter
@EqualsAndHashCode(of = "id")
@EqualsAndHashCode(of = "id", callSuper = false)
@ToString(of = {"id", "description"})
public class ChatRoomReport extends BaseCreateTimeEntity {

Expand Down
70 changes: 35 additions & 35 deletions backend/ddang/src/main/resources/static/docs/docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -516,9 +516,9 @@ <h1>땅땅땅 API 문서</h1>
<li><a href="#_채팅방_신고_등록">채팅방 신고 등록</a></li>
<li><a href="#_채팅방_신고_조회">채팅방 신고 조회</a></li>
<li><a href="#_질문_신고_등록">질문 신고 등록</a></li>
<li><a href="#_채팅방_신고_조회_2">채팅방 신고 조회</a></li>
<li><a href="#_질문_신고_조회">질문 신고 조회</a></li>
<li><a href="#_답변_신고_등록">답변 신고 등록</a></li>
<li><a href="#_채팅방_신고_조회_3">채팅방 신고 조회</a></li>
<li><a href="#_답변_신고_조회">답변 신고 조회</a></li>
</ul>
</li>
<li><a href="#_디바이스_토큰_api">디바이스 토큰 API</a>
Expand All @@ -531,7 +531,7 @@ <h1>땅땅땅 API 문서</h1>
<li><a href="#_사용자_평가_등록">사용자 평가 등록</a></li>
<li><a href="#_지정한_평가_아이디에_해당하는_평가_조회">지정한 평가 아이디에 해당하는 평가 조회</a></li>
<li><a href="#_지정한_사용자가_받은_평가_목록_조회">지정한 사용자가 받은 평가 목록 조회</a></li>
<li><a href="#_사용자가_경매_거래_상대에게_작성한_평가를_조회한다">사용자가_경매_거래_상대에게_작성한_평가를_조회한다</a></li>
<li><a href="#_사용자가_경매_거래_상대에게_작성한_평가를_조회한다">사용자가 경매 거래 상대에게 작성한 평가를 조회한다</a></li>
</ul>
</li>
</ul>
Expand Down Expand Up @@ -914,7 +914,7 @@ <h4 id="_요청_5"><a class="link" href="#_요청_5">요청</a></h4>
</div>
</div>
<div class="paragraph">
<p>Unresolved directive in docs.adoc - include::/Users/labtop/intellij/test-ddang/2023-3-ddang/backend/ddang/build/generated-snippets/authentication-controller-test/ouath2-type과_access-token과_refresh-token을_전달하면_탈퇴한다/path-parameters.adoc[]</p>
<p>Unresolved directive in docs.adoc - include::/Users/jamie/Documents/IntelliJ_Project/2023-3-ddang/backend/ddang/build/generated-snippets/authentication-controller-test/ouath2-type과_access-token과_refresh-token을_전달하면_탈퇴한다/path-parameters.adoc[]</p>
</div>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
Expand Down Expand Up @@ -1453,7 +1453,7 @@ <h4 id="_요청_13"><a class="link" href="#_요청_13">요청</a></h4>
Content-Disposition: form-data; name=request; filename=request
Content-Type: application/json

{"title":"제목","description":"내용","bidUnit":1000,"startPrice":1000,"closingTime":"2023-10-18T21:12:06.450773","subCategoryId":2,"thirdRegionIds":[3]}
{"title":"제목","description":"내용","bidUnit":1000,"startPrice":1000,"closingTime":"2023-10-22T13:47:37.536222","subCategoryId":2,"thirdRegionIds":[3]}
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm--</code></pre>
</div>
</div>
Expand Down Expand Up @@ -2060,8 +2060,8 @@ <h4 id="_응답_17"><a class="link" href="#_응답_17">응답</a></h4>
"lastBidPrice" : null,
"status" : "UNBIDDEN",
"bidUnit" : 1000,
"registerTime" : "2023-10-15T21:12:06",
"closingTime" : "2023-10-15T21:12:06",
"registerTime" : "2023-10-19T13:47:37",
"closingTime" : "2023-10-19T13:47:37",
"directRegions" : [ {
"first" : "서울특별시",
"second" : "강서구",
Expand Down Expand Up @@ -2589,7 +2589,7 @@ <h4 id="_응답_23"><a class="link" href="#_응답_23">응답</a></h4>
"name" : "질문자",
"image" : "http://localhost:8080/users/images/1"
},
"createdTime" : "2023-10-15T21:12:06",
"createdTime" : "2023-10-19T13:47:37",
"content" : "질문1",
"isQuestioner" : false
},
Expand All @@ -2600,7 +2600,7 @@ <h4 id="_응답_23"><a class="link" href="#_응답_23">응답</a></h4>
"name" : "판매자",
"image" : "http://localhost:8080/users/images/2"
},
"createdTime" : "2023-10-15T21:12:06",
"createdTime" : "2023-10-19T13:47:37",
"content" : "답변1"
}
}, {
Expand All @@ -2611,7 +2611,7 @@ <h4 id="_응답_23"><a class="link" href="#_응답_23">응답</a></h4>
"name" : "질문자",
"image" : "http://localhost:8080/users/images/1"
},
"createdTime" : "2023-10-15T21:12:06",
"createdTime" : "2023-10-19T13:47:37",
"content" : "질문2",
"isQuestioner" : false
},
Expand All @@ -2622,7 +2622,7 @@ <h4 id="_응답_23"><a class="link" href="#_응답_23">응답</a></h4>
"name" : "판매자",
"image" : "http://localhost:8080/users/images/2"
},
"createdTime" : "2023-10-15T21:12:06",
"createdTime" : "2023-10-19T13:47:37",
"content" : "답변1"
}
} ]
Expand Down Expand Up @@ -2819,7 +2819,7 @@ <h3 id="_입찰_조회"><a class="link" href="#_입찰_조회">입찰 조회</a>
<h4 id="_요청_25"><a class="link" href="#_요청_25">요청</a></h4>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight nowrap"><code class="language-http hljs" data-lang="http">GET /bids/-999 HTTP/1.1
<pre class="highlightjs highlight nowrap"><code class="language-http hljs" data-lang="http">GET /bids/1 HTTP/1.1
Content-Type: application/json</code></pre>
</div>
</div>
Expand All @@ -2835,12 +2835,12 @@ <h4 id="_응답_25"><a class="link" href="#_응답_25">응답</a></h4>
"name" : "사용자1",
"profileImage" : "http://localhost:8080/users/images/1",
"price" : 10000,
"bidTime" : "2023-10-15T21:12:13"
"bidTime" : "2023-10-19T13:47:42"
}, {
"name" : "사용자2",
"profileImage" : "http://localhost:8080/users/images/2",
"price" : 12000,
"bidTime" : "2023-10-15T21:12:13"
"bidTime" : "2023-10-19T13:47:42"
} ]</code></pre>
</div>
</div>
Expand Down Expand Up @@ -3034,7 +3034,7 @@ <h4 id="_응답_27"><a class="link" href="#_응답_27">응답</a></h4>
"price" : 10000
},
"lastMessage" : {
"createdAt" : "2023-10-15T21:12:16",
"createdAt" : "2023-10-19T13:47:44",
"contents" : "메시지1"
},
"isChatAvailable" : true
Expand All @@ -3052,7 +3052,7 @@ <h4 id="_응답_27"><a class="link" href="#_응답_27">응답</a></h4>
"price" : 20000
},
"lastMessage" : {
"createdAt" : "2023-10-15T21:12:16",
"createdAt" : "2023-10-19T13:47:44",
"contents" : "메시지2"
},
"isChatAvailable" : true
Expand Down Expand Up @@ -3490,7 +3490,7 @@ <h4 id="_응답_30"><a class="link" href="#_응답_30">응답</a></h4>

[ {
"id" : 1,
"createdAt" : "2023-10-15T21:12:16",
"createdAt" : "2023-10-19T13:47:44",
"isMyMessage" : true,
"contents" : "메시지내용"
} ]</code></pre>
Expand Down Expand Up @@ -3640,7 +3640,7 @@ <h4 id="_응답_32"><a class="link" href="#_응답_32">응답</a></h4>
"id" : 2,
"name" : "회원1"
},
"createdTime" : "2023-10-15T21:12:26",
"createdTime" : "2023-10-19T13:47:52",
"auction" : {
"id" : 1,
"title" : "제목"
Expand All @@ -3652,7 +3652,7 @@ <h4 id="_응답_32"><a class="link" href="#_응답_32">응답</a></h4>
"id" : 3,
"name" : "회원2"
},
"createdTime" : "2023-10-15T21:12:26",
"createdTime" : "2023-10-19T13:47:52",
"auction" : {
"id" : 1,
"title" : "제목"
Expand All @@ -3664,7 +3664,7 @@ <h4 id="_응답_32"><a class="link" href="#_응답_32">응답</a></h4>
"id" : 4,
"name" : "회원3"
},
"createdTime" : "2023-10-15T21:12:26",
"createdTime" : "2023-10-19T13:47:52",
"auction" : {
"id" : 1,
"title" : "제목"
Expand Down Expand Up @@ -3828,7 +3828,7 @@ <h4 id="_응답_34"><a class="link" href="#_응답_34">응답</a></h4>
"id" : 2,
"name" : "구매자1"
},
"createdTime" : "2023-10-15T21:12:27",
"createdTime" : "2023-10-19T13:47:52",
"chatRoom" : {
"id" : 1
},
Expand All @@ -3839,7 +3839,7 @@ <h4 id="_응답_34"><a class="link" href="#_응답_34">응답</a></h4>
"id" : 3,
"name" : "구매자2"
},
"createdTime" : "2023-10-15T21:12:27",
"createdTime" : "2023-10-19T13:47:52",
"chatRoom" : {
"id" : 1
},
Expand All @@ -3850,7 +3850,7 @@ <h4 id="_응답_34"><a class="link" href="#_응답_34">응답</a></h4>
"id" : 3,
"name" : "구매자2"
},
"createdTime" : "2023-10-15T21:12:27",
"createdTime" : "2023-10-19T13:47:52",
"chatRoom" : {
"id" : 1
},
Expand Down Expand Up @@ -3990,7 +3990,7 @@ <h4 id="_응답_35"><a class="link" href="#_응답_35">응답</a></h4>
</div>
</div>
<div class="sect2">
<h3 id="_채팅방_신고_조회_2"><a class="link" href="#_채팅방_신고_조회_2">채팅방 신고 조회</a></h3>
<h3 id="_질문_신고_조회"><a class="link" href="#_질문_신고_조회">질문 신고 조회</a></h3>
<div class="sect3">
<h4 id="_요청_36"><a class="link" href="#_요청_36">요청</a></h4>
<div class="listingblock">
Expand All @@ -4014,7 +4014,7 @@ <h4 id="_응답_36"><a class="link" href="#_응답_36">응답</a></h4>
"id" : 2,
"name" : "구매자1"
},
"createdTime" : "2023-10-15T21:12:27",
"createdTime" : "2023-10-19T13:47:52",
"question" : {
"id" : 1
},
Expand All @@ -4025,7 +4025,7 @@ <h4 id="_응답_36"><a class="link" href="#_응답_36">응답</a></h4>
"id" : 2,
"name" : "구매자1"
},
"createdTime" : "2023-10-15T21:12:27",
"createdTime" : "2023-10-19T13:47:52",
"question" : {
"id" : 2
},
Expand All @@ -4036,7 +4036,7 @@ <h4 id="_응답_36"><a class="link" href="#_응답_36">응답</a></h4>
"id" : 2,
"name" : "구매자1"
},
"createdTime" : "2023-10-15T21:12:27",
"createdTime" : "2023-10-19T13:47:52",
"question" : {
"id" : 3
},
Expand Down Expand Up @@ -4176,7 +4176,7 @@ <h4 id="_응답_37"><a class="link" href="#_응답_37">응답</a></h4>
</div>
</div>
<div class="sect2">
<h3 id="_채팅방_신고_조회_3"><a class="link" href="#_채팅방_신고_조회_3">채팅방 신고 조회</a></h3>
<h3 id="_답변_신고_조회"><a class="link" href="#_답변_신고_조회">답변 신고 조회</a></h3>
<div class="sect3">
<h4 id="_요청_38"><a class="link" href="#_요청_38">요청</a></h4>
<div class="listingblock">
Expand All @@ -4200,7 +4200,7 @@ <h4 id="_응답_38"><a class="link" href="#_응답_38">응답</a></h4>
"id" : 2,
"name" : "구매자1"
},
"createdTime" : "2023-10-15T21:12:27",
"createdTime" : "2023-10-19T13:47:52",
"answer" : {
"id" : 1
},
Expand All @@ -4211,7 +4211,7 @@ <h4 id="_응답_38"><a class="link" href="#_응답_38">응답</a></h4>
"id" : 2,
"name" : "구매자1"
},
"createdTime" : "2023-10-15T21:12:27",
"createdTime" : "2023-10-19T13:47:52",
"answer" : {
"id" : 2
},
Expand All @@ -4222,7 +4222,7 @@ <h4 id="_응답_38"><a class="link" href="#_응답_38">응답</a></h4>
"id" : 2,
"name" : "구매자1"
},
"createdTime" : "2023-10-15T21:12:27",
"createdTime" : "2023-10-19T13:47:52",
"answer" : {
"id" : 3
},
Expand Down Expand Up @@ -4558,7 +4558,7 @@ <h4 id="_응답_42"><a class="link" href="#_응답_42">응답</a></h4>
},
"content" : "친절하다.",
"score" : 5.0,
"createdTime" : "2023-10-15T21:12:29"
"createdTime" : "2023-10-19T13:47:53"
}, {
"id" : 2,
"writer" : {
Expand All @@ -4568,7 +4568,7 @@ <h4 id="_응답_42"><a class="link" href="#_응답_42">응답</a></h4>
},
"content" : "친절하다.",
"score" : 5.0,
"createdTime" : "2023-10-15T21:12:29"
"createdTime" : "2023-10-19T13:47:53"
} ]</code></pre>
</div>
</div>
Expand Down Expand Up @@ -4631,7 +4631,7 @@ <h4 id="_응답_42"><a class="link" href="#_응답_42">응답</a></h4>
</div>
</div>
<div class="sect2">
<h3 id="_사용자가_경매_거래_상대에게_작성한_평가를_조회한다"><a class="link" href="#_사용자가_경매_거래_상대에게_작성한_평가를_조회한다">사용자가_경매_거래_상대에게_작성한_평가를_조회한다</a></h3>
<h3 id="_사용자가_경매_거래_상대에게_작성한_평가를_조회한다"><a class="link" href="#_사용자가_경매_거래_상대에게_작성한_평가를_조회한다">사용자가 경매 거래 상대에게 작성한 평가를 조회한다</a></h3>
<div class="sect3">
<h4 id="_요청_43"><a class="link" href="#_요청_43">요청</a></h4>
<div class="listingblock">
Expand Down Expand Up @@ -4726,7 +4726,7 @@ <h4 id="_응답_43"><a class="link" href="#_응답_43">응답</a></h4>
<div id="footer">
<div id="footer-text">
Version 0.0.1-SNAPSHOT<br>
Last updated 2023-10-11 10:23:49 +0900
Last updated 2023-10-19 13:22:15 +0900
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.3/highlight.min.js"></script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class BidControllerFixture extends CommonControllerSliceTest {
protected PrivateClaims 존재하지_않는_사용자_ID_클레임 = new PrivateClaims(-999L);
protected Long 생성된_입찰_아이디 = 1L;
protected String 액세스_토큰_값 = "Bearer accessToken";
protected Long 조회하려는_경매_아이디 = -999L;
protected Long 조회하려는_경매_아이디 = 1L;
protected Long 존재하지_않는_경매_아이디 = -999L;

protected CreateBidRequest 입찰_request = new CreateBidRequest(1L, 10_000);
Expand Down
Loading