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

[hofix] 명세서 오류 수정 #426

Merged
merged 3 commits into from
Jan 30, 2024
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
29 changes: 29 additions & 0 deletions src/docs/asciidoc/delete-user-v2.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
:reproducible:
== 탈퇴 & 사유 저장 v2

=== 요청

include::{snippets}/api/v2/user/deleteUser/http-request.adoc[]

=== 응답

include::{snippets}/api/v2/user/deleteUser/http-response.adoc[]

*필드 타입*

- "value": String
* value는 탈퇴 사유를 보내주시면 됩니다.


*필드 타입*

=== NOTE

- AccessToken에 해당하는 User의 탈퇴 처리 및 탈퇴 사유를 저장하는 API입니다.
// - User의 다양한 정보를 저장하는 API로 범용적인 확장할 예정입니다.
// * 차후에 tag에 들어갈 수 있는 ENUM의 종류를 다양화 할 예정입니다.

=== CHANGELOG

- 2024.01.27 API 릴리즈
- 2024.01.09 명세 작성
6 changes: 4 additions & 2 deletions src/docs/asciidoc/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

* 🆕 link:user-data-get.html[프로필 수정 가능 여부 조회 (명세), 2024-01-09]

* 🆕 link:user-data-post.html[탈퇴 사유 저장 (명세), 2024-01-09]
* 🆕 link:user-data-post.html[유저 기타 정보 저장 (명세), 2024-01-30]

* 🆕 link:purchase-info.html[유저 구독 정보, 2024-01-25]

Expand All @@ -49,13 +49,15 @@

* link:delete-user.html[유저 탈퇴]

* 🆕 link:delete-user-v2.html[유저 탈퇴 V2, 2024-01-30]

=== Vote API

* link:find-votes.html[내 투표 전체 조회하기]

* link:find-friend-votes.html[친구 투표 전체 조회하기, 2024-01-09]

* ️ link:find-friend-votes-v2.html[친구 투표 전체 조회하기 v2 (명세), 2024-01-26]
* 🆕️ link:find-friend-votes-v2.html[친구 투표 전체 조회하기 v2 (명세), 2024-01-26]

* link:get-unread-vote.html[읽지 않은 쪽지 개수 조회하기]

Expand Down
37 changes: 27 additions & 10 deletions src/docs/asciidoc/user-data-post.adoc
Original file line number Diff line number Diff line change
@@ -1,30 +1,47 @@
:reproducible:
== 탈퇴 & 사유 저장 v2
== 유저 기타 정보 저장 (명세)

=== 요청

include::{snippets}/api/v2/user/http-request.adoc[]

=== 응답

include::{snippets}/api/v2/user/http-response.adoc[]
[http]
----
POST /api/v1/user/data/recommended HTTP/1.1
Authorization: Bearer your-access-token
Content-Type: application-json

{
"value": "true"
}
----

*필드 타입*

- "tag": "withdraw-reason" | "account-update-at" | "recommended"
* withdraw-reason 자리가 ENUM으로 대체될 예정입니다.
- "value": String
* value는 탈퇴 사유를 보내주시면 됩니다.

=== 응답

*필드 타입*
[http,json]
----
HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json

{
"status" : 200,
"message" : "탈퇴 사유 정보 저장에 성공하였습니다."
}
----

=== NOTE

- AccessToken에 해당하는 User의 탈퇴 사유를 저장하는 API입니다.
- User의 다양한 정보를 저장하는 API로 범용적인 확장할 예정입니다.
* 차후에 tag에 들어갈 수 있는 ENUM의 종류를 다양화 할 예정입니다.

=== CHANGELOG

- 2024.01.27 API 릴리즈
- 2024.01.30 탈퇴 v2 분리로 인한 명세 업데이트
- 2024.01.09 명세 작성
530 changes: 530 additions & 0 deletions src/main/resources/static/docs/delete-user-v2.html

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions src/main/resources/static/docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ <h3 id="_user_api"><a class="link" href="#_user_api">User API</a></h3>
<p>🆕 <a href="user-data-get.html">프로필 수정 가능 여부 조회 (명세), 2024-01-09</a></p>
</li>
<li>
<p>🆕 <a href="user-data-post.html">탈퇴 사유 저장 (명세), 2024-01-09</a></p>
<p>🆕 <a href="user-data-post.html">유저 기타 정보 저장 (명세), 2024-01-30</a></p>
</li>
<li>
<p>🆕 <a href="purchase-info.html">유저 구독 정보, 2024-01-25</a></p>
Expand All @@ -526,6 +526,9 @@ <h3 id="_user_api"><a class="link" href="#_user_api">User API</a></h3>
<li>
<p><a href="delete-user.html">유저 탈퇴</a></p>
</li>
<li>
<p>🆕 <a href="delete-user-v2.html">유저 탈퇴 V2, 2024-01-30</a></p>
</li>
</ul>
</div>
</div>
Expand All @@ -540,7 +543,7 @@ <h3 id="_vote_api"><a class="link" href="#_vote_api">Vote API</a></h3>
<p><a href="find-friend-votes.html">친구 투표 전체 조회하기, 2024-01-09</a></p>
</li>
<li>
<p>️ <a href="find-friend-votes-v2.html">친구 투표 전체 조회하기 v2 (명세), 2024-01-26</a></p>
<p>🆕️ <a href="find-friend-votes-v2.html">친구 투표 전체 조회하기 v2 (명세), 2024-01-26</a></p>
</li>
<li>
<p><a href="get-unread-vote.html">읽지 않은 쪽지 개수 조회하기</a></p>
Expand Down
78 changes: 29 additions & 49 deletions src/main/resources/static/docs/user-data-post.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="Asciidoctor 2.0.10">
<title>탈퇴 &amp; 사유 저장 v2</title>
<title>유저 기타 정보 저장 (명세)</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700">
<style>
/* Asciidoctor default stylesheet | MIT License | https://asciidoctor.org */
Expand Down Expand Up @@ -441,53 +441,19 @@
</div>
<div id="content">
<div class="sect1">
<h2 id="_탈퇴_사유_저장_v2">탈퇴 &amp; 사유 저장 v2</h2>
<h2 id="_유저_기타_정보_저장_명세">유저 기타 정보 저장 (명세)</h2>
<div class="sectionbody">
<div class="sect2">
<h3 id="_요청">요청</h3>
<div class="listingblock">
<div class="content">
<pre class="highlight nowrap"><code class="language-http" data-lang="http">GET /api/v2/user HTTP/1.1
Authorization: Bearer your-access-token</code></pre>
</div>
</div>
</div>
<div class="sect2">
<h3 id="_응답">응답</h3>
<div class="listingblock">
<div class="content">
<pre class="highlight nowrap"><code class="language-http" data-lang="http">HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
<pre>POST /api/v1/user/data/recommended HTTP/1.1
Authorization: Bearer your-access-token
Content-Type: application-json

{
"status" : 200,
"message" : "유저 조회에 성공했습니다.",
"data" : {
"userId" : 1,
"name" : "name1",
"yelloId" : "yelloId1",
"gender" : "M",
"email" : "[email protected]",
"profileImageUrl" : "test image",
"social" : "KAKAO",
"uuid" : "1",
"deviceToken" : "deviceToken#1",
"group" : "테스트 대학교 1 테스트 학과 1 20학번",
"groupType" : "UNIVERSITY",
"groupName" : "테스트 대학교 1",
"subGroupName" : "테스트 학과 1",
"groupAdmissionYear" : 20,
"recommendCount" : 0,
"ticketCount" : 0,
"point" : 200,
"subscribe" : "normal",
"yelloCount" : 100,
"friendCount" : 200
}
}</code></pre>
"value": "true"
}</pre>
</div>
</div>
<div class="paragraph">
Expand All @@ -496,29 +462,43 @@ <h3 id="_응답">응답</h3>
<div class="ulist">
<ul>
<li>
<p>"value": String</p>
<p>"tag": "withdraw-reason" | "account-update-at" | "recommended"</p>
<div class="ulist">
<ul>
<li>
<p>value는 탈퇴 사유를 보내주시면 됩니다.</p>
<p>withdraw-reason 자리가 ENUM으로 대체될 예정입니다.</p>
</li>
</ul>
</div>
</li>
<li>
<p>"value": String</p>
</li>
</ul>
</div>
<div class="paragraph">
<p><strong>필드 타입</strong></p>
</div>
<div class="sect2">
<h3 id="_응답">응답</h3>
<div class="listingblock">
<div class="content">
<pre>HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json

{
"status" : 200,
"message" : "탈퇴 사유 정보 저장에 성공하였습니다."
}</pre>
</div>
</div>
</div>
<div class="sect2">
<h3 id="_note">NOTE</h3>
<div class="ulist">
<ul>
<li>
<p>AccessToken에 해당하는 User의 탈퇴 사유를 저장하는 API입니다.</p>
</li>
<li>
<p>User의 다양한 정보를 저장하는 API로 범용적인 확장할 예정입니다.</p>
<div class="ulist">
<ul>
Expand All @@ -536,7 +516,7 @@ <h3 id="_changelog">CHANGELOG</h3>
<div class="ulist">
<ul>
<li>
<p>2024.01.27 API 릴리즈</p>
<p>2024.01.30 탈퇴 v2 분리로 인한 명세 업데이트</p>
</li>
<li>
<p>2024.01.09 명세 작성</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ void init() {
.contentType(MediaType.APPLICATION_JSON)
.content(objectMapper.writeValueAsString(request)))
.andDo(print())
.andDo(document("api/v2/user",
.andDo(document("api/v2/user/deleteUser",
Preprocessors.preprocessRequest(prettyPrint(),
removeHeaders(excludeRequestHeaders)),
Preprocessors.preprocessResponse(prettyPrint(),
Expand Down
Loading