-
Notifications
You must be signed in to change notification settings - Fork 1
[Test] RestDocs문서화 #71
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
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| [[alarm-list]] | ||
| === 알림 목록 조회 | ||
|
|
||
| operation::alarm-query-controller-test/알림_목록을_조회합니다[snippets='http-request,query-parameters,http-response,response-fields'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| [[feed-list]] | ||
| === 피드 목록 조회 | ||
|
|
||
| operation::feed-query-controller-test/피드_목록을_조회합니다[snippets='http-request,query-parameters,http-response,response-fields'] | ||
|
|
||
| [[home-feed-list]] | ||
| === 홈 피드 목록 조회 | ||
|
|
||
| operation::feed-query-controller-test/홈_피드_목록을_조회합니다[snippets='http-request,http-response,response-fields'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,24 @@ | ||
| [[subscription-create]] | ||
| === 구독 목록 등록 | ||
| === 구독 등록 | ||
|
|
||
| operation::subscription-controller-test/신규_구독을_등록한다[snippets='http-request,request-fields,http-response,response-fields'] | ||
| operation::subscription-controller-test/신규_구독을_등록한다[snippets='http-request,request-fields,http-response,response-fields'] | ||
|
|
||
| [[subscription-list]] | ||
| === 구독 목록 조회 | ||
|
|
||
| operation::subscription-controller-test/구독_목록_조회[snippets='http-request,query-parameters,http-response,response-fields'] | ||
|
|
||
| [[subscription-update]] | ||
| === 구독 수정 | ||
|
|
||
| operation::subscription-controller-test/구독을_수정한다[snippets='http-request,path-parameters,request-fields,http-response'] | ||
|
|
||
| [[subscription-delete]] | ||
| === 구독 삭제 | ||
|
|
||
| operation::subscription-controller-test/구독을_삭제한다[snippets='http-request,path-parameters,http-response,response-fields'] | ||
|
|
||
| [[keyword-list]] | ||
| === 키워드 목록 조회 | ||
|
|
||
| operation::subscription-controller-test/키워드_목록을_조회한다[snippets='http-request,http-response,response-fields'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| [[summary-delete]] | ||
| === 요약 삭제 | ||
|
|
||
| operation::summary-controller-test/요약을_삭제한다[snippets='http-request,path-parameters,http-response,response-fields'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| [[url-list]] | ||
| === URL 목록 조회 | ||
|
|
||
| operation::url-query-controller-test/url목록을_조회한다[snippets='http-request,http-response,response-fields'] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 6 additions & 5 deletions
11
...n/java/com/todaysound/todaysound_server/domain/alarm/controller/AlarmQueryController.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,14 @@ | ||
| package com.todaysound.todaysound_server.domain.alarm.controller; | ||
|
|
||
| import com.todaysound.todaysound_server.domain.summary.entity.Summary; | ||
| import com.todaysound.todaysound_server.domain.summary.repository.SummaryRepository; | ||
| import com.fasterxml.jackson.annotation.JsonProperty; | ||
| import com.todaysound.todaysound_server.domain.subscription.entity.Subscription; | ||
| import com.todaysound.todaysound_server.domain.subscription.repository.SubscriptionRepository; | ||
| import com.todaysound.todaysound_server.domain.summary.entity.Summary; | ||
| import com.todaysound.todaysound_server.domain.summary.repository.SummaryRepository; | ||
| import com.todaysound.todaysound_server.domain.user.entity.User; | ||
| import com.todaysound.todaysound_server.global.application.FCMService; | ||
| import com.todaysound.todaysound_server.global.exception.BaseException; | ||
| import com.todaysound.todaysound_server.global.exception.CommonErrorCode; | ||
| import com.fasterxml.jackson.annotation.JsonProperty; | ||
| import lombok.RequiredArgsConstructor; | ||
| import org.springframework.web.bind.annotation.PostMapping; | ||
| import org.springframework.web.bind.annotation.RequestBody; | ||
|
|
@@ -17,18 +17,9 @@ | |
|
|
||
| /** | ||
| * 크롤러용 알림 생성 엔드포인트 | ||
| * | ||
| * POST /internal/alerts | ||
| * { | ||
| * "user_id": 10, | ||
| * "subscription_id": 1, | ||
| * "site_post_id": "12345", | ||
| * "title": "게시글 제목", | ||
| * "url": "https://...", | ||
| * "content_raw": "...원문...", | ||
| * "content_summary": "...요약...", | ||
| * "keyword_matched": true | ||
| * } | ||
| * <p> | ||
| * POST /internal/alerts { "user_id": 10, "subscription_id": 1, "site_post_id": "12345", "title": "게시글 제목", "url": | ||
| * "https://...", "content_raw": "...원문...", "content_summary": "...요약...", "keyword_matched": true } | ||
| */ | ||
| @RestController | ||
| @RequestMapping("/internal") | ||
|
|
@@ -54,7 +45,7 @@ public void createAlert(@RequestBody InternalAlertRequest request) { | |
| User user = subscription.getUser(); | ||
| String prefix; | ||
|
|
||
| if(request.keywordMatched == true) { | ||
| if (request.keywordMatched == true) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| prefix = "[" + request.siteAlias + "]"; | ||
| } else { | ||
| prefix = "[긴급/" + request.siteAlias + "]"; | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
operation경로에 오타가 있어 문서 생성이 실패할 수 있습니다.UrlQueryControllerTest의 테스트 메소드 이름은URL목록을_조회한다이므로, 스니펫이 생성되는 디렉토리 이름도 이를 따릅니다. 문서가 정상적으로 생성되려면 경로를url-query-controller-test/URL목록을_조회한다로 수정해야 합니다.