Skip to content

Commit

Permalink
YEL-180 [feat] V2 삭제, docs 업데이트
Browse files Browse the repository at this point in the history
  • Loading branch information
user 이름 committed Jan 8, 2024
1 parent 554d708 commit 4f344ba
Show file tree
Hide file tree
Showing 9 changed files with 106 additions and 41 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,5 @@ firebase*.json
### monitoring ###
monitoring/prometheus/volume
monitoring/grafana

src/main/resources/application-local.yml
24 changes: 23 additions & 1 deletion src/docs/asciidoc/check-user-v2.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,27 @@ include::{snippets}/api/v2/user/http-request.adoc[]

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

*필드 타입*

- "userId": Long
- "name": String
- "yelloId": String
- "gender": "M" | "F"
- "email": String
- "profileImageUrl": String
- "social": "KAKAO" | "APPLE"
- "uuid": String(10)
- "deviceToken": String
- "group": String
- "groupType": "UNIVERSITY" | "HIGH_SCHOOL" | "MIDDLE_SCHOOL" | "SOPT"
- "groupName": String
- "subGroupName": String
- "groupAdmissionYear": Integer
- "recommendCount": Long
- "ticketCount": Integer
- "point": Integer
- "subscribe": "normal" | "active" | "canceled"

=== Note

- 내 정보 조회하기 V1가 제공했던 단편적인 정보를 보완하기 위해 설계된 API입니다.
Expand All @@ -16,4 +37,5 @@ include::{snippets}/api/v2/user/http-response.adoc[]

=== CHANGELOG

- 2024.01.07 첫 릴리즈
- 2024.01.07 첫 릴리즈
- 2024.01.09 필드 타입 추가
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ public class Notice extends AuditingTimeEntity {

@Column(nullable = false)
private Boolean isAvailable;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import com.yello.server.domain.user.dto.request.UserDeviceTokenRequest;
import com.yello.server.domain.user.dto.response.UserDetailResponse;
import com.yello.server.domain.user.dto.response.UserDetailV2Response;
import com.yello.server.domain.user.dto.response.UserResponse;
import com.yello.server.domain.user.entity.User;
import com.yello.server.domain.user.service.UserService;
Expand All @@ -24,24 +25,30 @@

@RestController
@RequiredArgsConstructor
@RequestMapping("/api/v1/user")
@RequestMapping("/api")
public class UserController {

private final UserService userService;

@GetMapping
@GetMapping("/v1/user")
public BaseResponse<UserDetailResponse> findUser(@AccessTokenUser User user) {
val data = userService.findMyProfile(user.getId());
return BaseResponse.success(READ_USER_SUCCESS, data);
}

@GetMapping("/{userId}")
@GetMapping("/v2/user")
public BaseResponse<UserDetailV2Response> getUser(@AccessTokenUser User user) {
val data = userService.getUserDetailV2(user.getId());
return BaseResponse.success(READ_USER_SUCCESS, data);
}

@GetMapping("/v1/user/{userId}")
public BaseResponse<UserResponse> findUserById(@PathVariable Long userId) {
val data = userService.findUserById(userId);
return BaseResponse.success(READ_USER_SUCCESS, data);
}

@PutMapping("/device")
@PutMapping("/v1/user/device")
public BaseResponse<EmptyObject> putUserDeviceToken(
@AccessTokenUser User user,
@RequestBody UserDeviceTokenRequest request
Expand All @@ -50,7 +57,7 @@ public BaseResponse<EmptyObject> putUserDeviceToken(
return BaseResponse.success(UPDATE_DEVICE_TOKEN_USER_SUCCESS, data);
}

@DeleteMapping
@DeleteMapping("/v1/user")
public BaseResponse deleteUser(@AccessTokenUser User user) {
userService.delete(user);
return BaseResponse.success(DELETE_USER_SUCCESS);
Expand Down

This file was deleted.

66 changes: 65 additions & 1 deletion src/main/resources/static/docs/check-user-v2.html
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,67 @@ <h3 id="_응답">응답</h3>
}</code></pre>
</div>
</div>
<div class="paragraph">
<p><strong>필드 타입</strong></p>
</div>
<div class="ulist">
<ul>
<li>
<p>"userId": Long</p>
</li>
<li>
<p>"name": String</p>
</li>
<li>
<p>"yelloId": String</p>
</li>
<li>
<p>"gender": "M" | "F"</p>
</li>
<li>
<p>"email": String</p>
</li>
<li>
<p>"profileImageUrl": String</p>
</li>
<li>
<p>"social": "KAKAO" | "APPLE"</p>
</li>
<li>
<p>"uuid": String(10)</p>
</li>
<li>
<p>"deviceToken": String</p>
</li>
<li>
<p>"group": String</p>
</li>
<li>
<p>"groupType": "UNIVERSITY" | "HIGH_SCHOOL" | "MIDDLE_SCHOOL" | "SOPT"</p>
</li>
<li>
<p>"groupName": String</p>
</li>
<li>
<p>"subGroupName": String</p>
</li>
<li>
<p>"groupAdmissionYear": Integer</p>
</li>
<li>
<p>"recommendCount": Long</p>
</li>
<li>
<p>"ticketCount": Integer</p>
</li>
<li>
<p>"point": Integer</p>
</li>
<li>
<p>"subscribe": "normal" | "active" | "canceled"</p>
</li>
</ul>
</div>
</div>
<div class="sect2">
<h3 id="_note">Note</h3>
Expand All @@ -512,6 +573,9 @@ <h3 id="_changelog">CHANGELOG</h3>
<li>
<p>2024.01.07 첫 릴리즈</p>
</li>
<li>
<p>2024.01.09 필드 타입 추가</p>
</li>
</ul>
</div>
</div>
Expand All @@ -521,7 +585,7 @@ <h3 id="_changelog">CHANGELOG</h3>
<div id="footer">
<div id="footer-text">
Version 0.0.1-SNAPSHOT<br>
Last updated 2024-01-07 17:29:06 +0900
Last updated 2024-01-09 01:01:12 +0900
</div>
</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/static/docs/check-user.html
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ <h3 id="_응답">응답</h3>
<div id="footer">
<div id="footer-text">
Version 0.0.1-SNAPSHOT<br>
Last updated 2024-01-07 17:18:29 +0900
Last updated 2024-01-08 22:45:03 +0900
</div>
</div>
</body>
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/static/docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ <h3 id="_pay_api"><a class="link" href="#_pay_api">Pay API</a></h3>
<div id="footer">
<div id="footer-text">
Version 0.0.1-SNAPSHOT<br>
Last updated 2024-01-07 17:15:53 +0900
Last updated 2024-01-08 22:45:03 +0900
</div>
</div>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.6/styles/github.min.css">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import com.yello.server.domain.authorization.filter.JwtFilter;
import com.yello.server.domain.group.entity.UserGroupType;
import com.yello.server.domain.user.controller.UserController;
import com.yello.server.domain.user.controller.UserV2Controller;
import com.yello.server.domain.user.dto.request.UserDeviceTokenRequest;
import com.yello.server.domain.user.dto.response.UserDetailResponse;
import com.yello.server.domain.user.dto.response.UserDetailV2Response;
Expand Down Expand Up @@ -50,8 +49,7 @@
@AutoConfigureRestDocs
@WebMvcTest(
controllers = {
UserController.class,
UserV2Controller.class
UserController.class
},
excludeFilters = {
@ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = JwtFilter.class),
Expand Down

0 comments on commit 4f344ba

Please sign in to comment.