Skip to content

Commit

Permalink
[ADD] rest docs 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Kim-Dong-Jun99 committed Jul 9, 2023
1 parent f990f89 commit 77f5967
Show file tree
Hide file tree
Showing 2 changed files with 292 additions and 1 deletion.
49 changes: 49 additions & 0 deletions src/docs/asciidoc/api_doc.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -675,3 +675,52 @@ include::{snippets}/accountBook/create/success/http-request.adoc[]

include::{snippets}/accountBook/create/success/http-response.adoc[]

=== 가계부 멤버 초대

**요청 필드**

include::{snippets}/accountBook/invitation/success/request-fields.adoc[]

**응답 필드**

include::{snippets}/accountBook/invitation/success/response-fields.adoc[]

**Example request**

include::{snippets}/accountBook/invitation/success/http-request.adoc[]

**Example response**

include::{snippets}/accountBook/invitation/success/http-response.adoc[]

=== 가계부 초대 응답

**요청 필드**

include::{snippets}/accountBook/invitation/reply/success/request-fields.adoc[]

**응답 필드**

include::{snippets}/accountBook/invitation/reply/success/response-fields.adoc[]

**Example request**

include::{snippets}/accountBook/invitation/reply/success/http-request.adoc[]

**Example response**

include::{snippets}/accountBook/invitation/reply/success/http-response.adoc[]

=== 가계부 한달 날짜별 수입 / 지출 총합 조회

**응답 필드**

include::{snippets}/accountBook/daily_item_sum/success/response-fields.adoc[]

**Example request**

include::{snippets}/accountBook/daily_item_sum/success/http-request.adoc[]

**Example response**

include::{snippets}/accountBook/daily_item_sum/success/http-response.adoc[]
244 changes: 243 additions & 1 deletion src/main/resources/templates/api_doc.html
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,9 @@ <h1>Uliga Backend REST Docs</h1>
</ul>
</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 @@ -3508,13 +3511,252 @@ <h3 id="_가계부_생성"><a class="link" href="#_가계부_생성">가계부
</div>
</div>
</div>
<div class="sect2">
<h3 id="_가계부_멤버_초대"><a class="link" href="#_가계부_멤버_초대">가계부 멤버 초대</a></h3>
<div class="paragraph">
<p><strong>요청 필드</strong></p>
</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>id</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>emails</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>
</tbody>
</table>
<div class="paragraph">
<p><strong>응답 필드</strong></p>
</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>invited</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>
</tbody>
</table>
<div class="paragraph">
<p><strong>Example request</strong></p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight nowrap"><code data-lang="http" class="language-http hljs">POST /accountBook/invitation HTTP/1.1
Content-Type: application/json
Content-Length: 55
Host: localhost:8080

{"id":1,"emails":["user1@email.com","user2@email.com"]}</code></pre>
</div>
</div>
<div class="paragraph">
<p><strong>Example response</strong></p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight nowrap"><code data-lang="http" class="language-http hljs">HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 13

{"invited":2}</code></pre>
</div>
</div>
</div>
<div class="sect2">
<h3 id="_가계부_초대_응답"><a class="link" href="#_가계부_초대_응답">가계부 초대 응답</a></h3>
<div class="paragraph">
<p><strong>요청 필드</strong></p>
</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>accountBookName</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>id</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>memberName</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>join</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>
</tbody>
</table>
<div class="paragraph">
<p><strong>응답 필드</strong></p>
</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>id</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>join</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>
</tbody>
</table>
<div class="paragraph">
<p><strong>Example request</strong></p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight nowrap"><code data-lang="http" class="language-http hljs">POST /accountBook/invitation/reply HTTP/1.1
Content-Type: application/json
Content-Length: 86
Host: localhost:8080

{"id":1,"memberName":"멤버 이름","accountBookName":"가계부 이름","join":true}</code></pre>
</div>
</div>
<div class="paragraph">
<p><strong>Example response</strong></p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight nowrap"><code data-lang="http" class="language-http hljs">HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 20

{"id":1,"join":true}</code></pre>
</div>
</div>
</div>
<div class="sect2">
<h3 id="_가계부_한달_날짜별_수입_지출_총합_조회"><a class="link" href="#_가계부_한달_날짜별_수입_지출_총합_조회">가계부 한달 날짜별 수입 / 지출 총합 조회</a></h3>
<div class="paragraph">
<p><strong>응답 필드</strong></p>
</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>records</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>incomes</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>
</tbody>
</table>
<div class="paragraph">
<p><strong>Example request</strong></p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight nowrap"><code data-lang="http" class="language-http hljs">GET /accountBook/1/item/2023/4 HTTP/1.1
Host: localhost:8080</code></pre>
</div>
</div>
<div class="paragraph">
<p><strong>Example response</strong></p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlightjs highlight nowrap"><code data-lang="http" class="language-http hljs">HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 27

{"incomes":[],"records":[]}</code></pre>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="footer">
<div id="footer-text">
Version 0.0.1-SNAPSHOT<br>
Last updated 2023-07-07 15:49:57 +0900
Last updated 2023-07-09 15:29:54 +0900
</div>
</div>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.6/styles/github.min.css">
Expand Down

0 comments on commit 77f5967

Please sign in to comment.