Skip to content

Commit

Permalink
#103 Doc: 홈 탭 조회 API 문서화
Browse files Browse the repository at this point in the history
  • Loading branch information
5jisoo committed Feb 16, 2024
1 parent 3c4b615 commit 642bb18
Show file tree
Hide file tree
Showing 3 changed files with 275 additions and 20 deletions.
19 changes: 19 additions & 0 deletions src/docs/asciidoc/post.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,25 @@ ifndef::snippets[]
:snippets: ./build/generated-snippets
endif::[]

== `GET` Home Tab
홈 탭 조회 API

=== Request

include::{snippets}/get-home-tab/http-request.adoc[]

==== request headers
include::{snippets}/get-home-tab/request-headers.adoc[]

==== query params
include::{snippets}/get-home-tab/query-parameters.adoc[]


=== Response
==== response body
include::{snippets}/get-home-tab/response-body.adoc[]
include::{snippets}/get-home-tab/response-fields.adoc[]

== `POST` Post Upload API

게시물 업로드 API
Expand Down
225 changes: 205 additions & 20 deletions src/main/resources/static/docs/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -448,12 +448,11 @@ <h1>POST API</h1>
<div id="toc" class="toc2">
<div id="toctitle">Table of Contents</div>
<ul class="sectlevel1">
<li><a href="#_post_post_upload_api"><code>POST</code> Post Upload API</a>
<li><a href="#_get_home_tab"><code>GET</code> Home Tab</a>
<ul class="sectlevel2">
<li><a href="#_request">Request</a>
<ul class="sectlevel3">
<li><a href="#_request_headers">request headers</a></li>
<li><a href="#_request_parts">request parts</a></li>
<li><a href="#_query_params">query params</a></li>
</ul>
</li>
Expand All @@ -464,12 +463,13 @@ <h1>POST API</h1>
</li>
</ul>
</li>
<li><a href="#_get_post_retrieval_api"><code>GET</code> Post Retrieval API</a>
<li><a href="#_post_post_upload_api"><code>POST</code> Post Upload API</a>
<ul class="sectlevel2">
<li><a href="#_request_2">Request</a>
<ul class="sectlevel3">
<li><a href="#_path_parameters">path parameters</a></li>
<li><a href="#_request_headers_2">request headers</a></li>
<li><a href="#_request_parts">request parts</a></li>
<li><a href="#_query_params_2">query params</a></li>
</ul>
</li>
<li><a href="#_response_2">Response</a>
Expand All @@ -479,11 +479,11 @@ <h1>POST API</h1>
</li>
</ul>
</li>
<li><a href="#_delete_post_delete_api"><code>DELETE</code> Post Delete API</a>
<li><a href="#_get_post_retrieval_api"><code>GET</code> Post Retrieval API</a>
<ul class="sectlevel2">
<li><a href="#_request_3">Request</a>
<ul class="sectlevel3">
<li><a href="#_path_parameters_2">path parameters</a></li>
<li><a href="#_path_parameters">path parameters</a></li>
<li><a href="#_request_headers_3">request headers</a></li>
</ul>
</li>
Expand All @@ -494,18 +494,203 @@ <h1>POST API</h1>
</li>
</ul>
</li>
<li><a href="#_delete_post_delete_api"><code>DELETE</code> Post Delete API</a>
<ul class="sectlevel2">
<li><a href="#_request_4">Request</a>
<ul class="sectlevel3">
<li><a href="#_path_parameters_2">path parameters</a></li>
<li><a href="#_request_headers_4">request headers</a></li>
</ul>
</li>
<li><a href="#_response_4">Response</a>
<ul class="sectlevel3">
<li><a href="#_response_body_4">response body</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div id="content">
<div class="sect1">
<h2 id="_get_home_tab"><a class="link" href="#_get_home_tab"><code>GET</code> Home Tab</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>홈 탭 조회 API</p>
</div>
<div class="sect2">
<h3 id="_request"><a class="link" href="#_request">Request</a></h3>
<div class="listingblock">
<div class="content">
<pre class="highlight nowrap"><code class="language-http" data-lang="http">GET /api/v2/posts HTTP/1.1
Content-Type: application/json;charset=UTF-8
Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJkeHh5bm5pIiwicm9sZSI6IlJPTEVfVVNFUiIsImlhdCI6MTcwNTYyMDMwOCwiZXhwIjoxNzgzMzgwMzA4fQ.2u1cQI59e1n9yPEeCiJxuocU6CR9eMIPRTfJgkFJzX4
Host: localhost:8080</code></pre>
</div>
</div>
<div class="sect3">
<h4 id="_request_headers"><a class="link" href="#_request_headers">request headers</a></h4>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 50%;">
<col style="width: 50%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Name</th>
<th class="tableblock halign-left valign-top">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>Authorization</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Basic auth credentials</p></td>
</tr>
</tbody>
</table>
</div>
<div class="sect3">
<h4 id="_query_params"><a class="link" href="#_query_params">query params</a></h4>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 50%;">
<col style="width: 50%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Parameter</th>
<th class="tableblock halign-left valign-top">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>page</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">조회할 페이지 [default: 0]</p></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="sect2">
<h3 id="_response"><a class="link" href="#_response">Response</a></h3>
<div class="sect3">
<h4 id="_response_body"><a class="link" href="#_response_body">response body</a></h4>
<div class="listingblock">
<div class="content">
<pre class="highlight nowrap"><code class="language-json" data-lang="json">{
"isSuccess" : true,
"code" : "COMMON200",
"message" : "성공입니다.",
"result" : {
"pageInfo" : {
"lastPage" : true,
"totalPages" : 1,
"totalElements" : 3,
"size" : 30
},
"postList" : [ {
"postId" : 106,
"postImage" : "https://pochak-image-upload-bucket.s3.ap-northeast-2.amazonaws.com/post/8925162f-c433-4696-9da8-78d7840811201_fYzWXRMv8Y0OGuqOV8amFA.png"
}, {
"postId" : 100,
"postImage" : "https://pochak-image-upload-bucket.s3.ap-northeast-2.amazonaws.com/post/eaf4830a-88db-4f5b-84ba-384377be87ceImage.png"
}, {
"postId" : 2,
"postImage" : "https://pochak-image-upload-bucket.s3.ap-northeast-2.amazonaws.com/post/f494e235-11b3-4e69-a872-30ddc1d70738basil-932079_640.jpg"
} ]
}
}</code></pre>
</div>
</div>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 33.3333%;">
<col style="width: 33.3333%;">
<col style="width: 33.3334%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">Path</th>
<th class="tableblock halign-left valign-top">Type</th>
<th class="tableblock halign-left valign-top">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>isSuccess</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>Boolean</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">성공 여부</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>code</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>String</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">결과 코드</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>message</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>String</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">결과 메세지</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>result</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>Object</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">결과 데이터</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>result.pageInfo</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>Object</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">게시물 페이징 정보</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>result.pageInfo.lastPage</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>Boolean</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">게시물 페이징 정보: 현재 페이지가 마지막 페이지인지의 여부</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>result.pageInfo.totalPages</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>Number</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">게시물 페이징 정보: 총 페이지 수</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>result.pageInfo.totalElements</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>Number</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">게시물 페이징 정보: 태그된 총 포스트 수</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>result.pageInfo.size</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>Number</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">게시물 페이징 정보: 페이징 사이즈</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>result.postList</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>Array</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">게시물 리스트</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>result.postList[].postId</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>Number</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">게시물 리스트: 게시물 아이디</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>result.postList[].postImage</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>String</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">게시물 리스트: 게시물 이미지</p></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_post_post_upload_api"><a class="link" href="#_post_post_upload_api"><code>POST</code> Post Upload API</a></h2>
<div class="sectionbody">
<div class="paragraph">
<p>게시물 업로드 API</p>
</div>
<div class="sect2">
<h3 id="_request"><a class="link" href="#_request">Request</a></h3>
<h3 id="_request_2"><a class="link" href="#_request_2">Request</a></h3>
<div class="listingblock">
<div class="content">
<pre class="highlight"><code class="language-bash" data-lang="bash">$ curl 'http://localhost:8080/api/v2/posts?taggedMemberHandleList=%5B_skf__11,%20habongee%5D&amp;caption=%EC%95%88%EB%85%95%ED%95%98%EC%84%B8%EC%9A%94.%20%EA%B2%8C%EC%8B%9C%EB%AC%BC%20%EC%97%85%EB%A1%9C%EB%93%9C%EB%A5%BC%20%ED%85%8C%EC%8A%A4%ED%8A%B8%ED%95%B4%EB%B3%B4%EA%B2%A0%EC%8A%B5%EB%8B%88%EB%8B%A4.' -i -X POST \
Expand All @@ -515,7 +700,7 @@ <h3 id="_request"><a class="link" href="#_request">Request</a></h3>
</div>
</div>
<div class="sect3">
<h4 id="_request_headers"><a class="link" href="#_request_headers">request headers</a></h4>
<h4 id="_request_headers_2"><a class="link" href="#_request_headers_2">request headers</a></h4>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 50%;">
Expand Down Expand Up @@ -557,7 +742,7 @@ <h4 id="_request_parts"><a class="link" href="#_request_parts">request parts</a>
</table>
</div>
<div class="sect3">
<h4 id="_query_params"><a class="link" href="#_query_params">query params</a></h4>
<h4 id="_query_params_2"><a class="link" href="#_query_params_2">query params</a></h4>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 50%;">
Expand All @@ -583,9 +768,9 @@ <h4 id="_query_params"><a class="link" href="#_query_params">query params</a></h
</div>
</div>
<div class="sect2">
<h3 id="_response"><a class="link" href="#_response">Response</a></h3>
<h3 id="_response_2"><a class="link" href="#_response_2">Response</a></h3>
<div class="sect3">
<h4 id="_response_body"><a class="link" href="#_response_body">response body</a></h4>
<h4 id="_response_body_2"><a class="link" href="#_response_body_2">response body</a></h4>
<div class="listingblock">
<div class="content">
<pre class="highlight nowrap"><code class="language-json" data-lang="json">{
Expand Down Expand Up @@ -637,7 +822,7 @@ <h2 id="_get_post_retrieval_api"><a class="link" href="#_get_post_retrieval_api"
<p>게시물 상세 페이지 조회 API</p>
</div>
<div class="sect2">
<h3 id="_request_2"><a class="link" href="#_request_2">Request</a></h3>
<h3 id="_request_3"><a class="link" href="#_request_3">Request</a></h3>
<div class="listingblock">
<div class="content">
<pre class="highlight nowrap"><code class="language-http" data-lang="http">GET /api/v2/posts/2 HTTP/1.1
Expand Down Expand Up @@ -669,7 +854,7 @@ <h4 id="_path_parameters"><a class="link" href="#_path_parameters">path paramete
</table>
</div>
<div class="sect3">
<h4 id="_request_headers_2"><a class="link" href="#_request_headers_2">request headers</a></h4>
<h4 id="_request_headers_3"><a class="link" href="#_request_headers_3">request headers</a></h4>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 50%;">
Expand All @@ -692,9 +877,9 @@ <h4 id="_request_headers_2"><a class="link" href="#_request_headers_2">request h
</div>
</div>
<div class="sect2">
<h3 id="_response_2"><a class="link" href="#_response_2">Response</a></h3>
<h3 id="_response_3"><a class="link" href="#_response_3">Response</a></h3>
<div class="sect3">
<h4 id="_response_body_2"><a class="link" href="#_response_body_2">response body</a></h4>
<h4 id="_response_body_3"><a class="link" href="#_response_body_3">response body</a></h4>
<div class="listingblock">
<div class="content">
<pre class="highlight nowrap"><code class="language-json" data-lang="json">{
Expand Down Expand Up @@ -839,7 +1024,7 @@ <h2 id="_delete_post_delete_api"><a class="link" href="#_delete_post_delete_api"
<p>게시물 삭제 API</p>
</div>
<div class="sect2">
<h3 id="_request_3"><a class="link" href="#_request_3">Request</a></h3>
<h3 id="_request_4"><a class="link" href="#_request_4">Request</a></h3>
<div class="listingblock">
<div class="content">
<pre class="highlight nowrap"><code class="language-http" data-lang="http">DELETE /api/v2/posts/2 HTTP/1.1
Expand Down Expand Up @@ -871,7 +1056,7 @@ <h4 id="_path_parameters_2"><a class="link" href="#_path_parameters_2">path para
</table>
</div>
<div class="sect3">
<h4 id="_request_headers_3"><a class="link" href="#_request_headers_3">request headers</a></h4>
<h4 id="_request_headers_4"><a class="link" href="#_request_headers_4">request headers</a></h4>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 50%;">
Expand All @@ -894,9 +1079,9 @@ <h4 id="_request_headers_3"><a class="link" href="#_request_headers_3">request h
</div>
</div>
<div class="sect2">
<h3 id="_response_3"><a class="link" href="#_response_3">Response</a></h3>
<h3 id="_response_4"><a class="link" href="#_response_4">Response</a></h3>
<div class="sect3">
<h4 id="_response_body_3"><a class="link" href="#_response_body_3">response body</a></h4>
<h4 id="_response_body_4"><a class="link" href="#_response_body_4">response body</a></h4>
<div class="listingblock">
<div class="content">
<pre class="highlight nowrap"><code class="language-json" data-lang="json">{
Expand Down Expand Up @@ -945,7 +1130,7 @@ <h4 id="_response_body_3"><a class="link" href="#_response_body_3">response body
<div id="footer">
<div id="footer-text">
Version 0.0.1-SNAPSHOT<br>
Last updated 2024-02-17 05:43:15 +0900
Last updated 2024-02-17 06:04:11 +0900
</div>
</div>
</body>
Expand Down
Loading

0 comments on commit 642bb18

Please sign in to comment.