From 5bd7c01dc3bf0a47c435b8f6a6a1f832b29134ed Mon Sep 17 00:00:00 2001 From: BGuga Date: Fri, 15 Sep 2023 18:05:51 +0900 Subject: [PATCH 01/10] =?UTF-8?q?test:=20EssayAnswer=20RestDocs=20?= =?UTF-8?q?=ED=85=8C=EC=8A=A4=ED=8A=B8=20=EC=9E=91=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../prolog/docu/EssayAnswerDocumentaion.java | 144 ++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 backend/src/documentation/java/wooteco/prolog/docu/EssayAnswerDocumentaion.java diff --git a/backend/src/documentation/java/wooteco/prolog/docu/EssayAnswerDocumentaion.java b/backend/src/documentation/java/wooteco/prolog/docu/EssayAnswerDocumentaion.java new file mode 100644 index 000000000..dcefb2a52 --- /dev/null +++ b/backend/src/documentation/java/wooteco/prolog/docu/EssayAnswerDocumentaion.java @@ -0,0 +1,144 @@ +package wooteco.prolog.docu; + +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyLong; +import static org.mockito.BDDMockito.given; +import static org.mockito.Mockito.doNothing; +import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.document; + +import java.util.Arrays; +import java.util.Collections; +import org.elasticsearch.common.collect.List; +import org.junit.jupiter.api.Test; +import org.mockito.BDDMockito; +import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; +import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import wooteco.prolog.NewDocumentation; +import wooteco.prolog.member.domain.Member; +import wooteco.prolog.member.domain.Role; +import wooteco.prolog.roadmap.application.EssayAnswerService; +import wooteco.prolog.roadmap.application.QuizService; +import wooteco.prolog.roadmap.application.dto.EssayAnswerRequest; +import wooteco.prolog.roadmap.application.dto.EssayAnswerResponse; +import wooteco.prolog.roadmap.application.dto.EssayAnswerSearchRequest; +import wooteco.prolog.roadmap.application.dto.EssayAnswerUpdateRequest; +import wooteco.prolog.roadmap.application.dto.QuizResponse; +import wooteco.prolog.roadmap.domain.EssayAnswer; +import wooteco.prolog.roadmap.domain.Keyword; +import wooteco.prolog.roadmap.domain.Quiz; +import wooteco.prolog.roadmap.ui.EssayAnswerController; +import wooteco.prolog.studylog.application.dto.EssayAnswersResponse; + +@WebMvcTest(EssayAnswerController.class) +public class EssayAnswerDocumentaion extends NewDocumentation { + + private static final EssayAnswer ESSAY_ANSWER_1 = new EssayAnswer( + new Quiz(1L, + new Keyword(1L, "keyword1", "첫 번째 키워드", 1, 5, 1L, null, Collections.emptySet()), + "questoin"), + "answer", + new Member(1L, "member1", "nickname1", Role.CREW, 1L, "image.jpg") + ); + + private static final EssayAnswer ESSAY_ANSWER_2 = new EssayAnswer( + new Quiz(2L, + new Keyword(1L, "keyword1", "첫 번째 키워드", 1, 5, 1L, null, Collections.emptySet()), + "questoin"), + "answer", + new Member(2L, "member2", "nickname2", Role.CREW, 2L, "image.jpg") + ); + + @MockBean + EssayAnswerService essayAnswerService; + + @MockBean + QuizService quizService; + + + @Test + void EssayAnswer_응답() { + given(essayAnswerService.createEssayAnswer(any(), any())).willReturn(1L); + EssayAnswerRequest request = new EssayAnswerRequest(1L, "answer"); + + given + .contentType(MediaType.APPLICATION_JSON_VALUE) + .body(request) + .when().post("essay-answers") + .then().log().all().apply(document("essay-answer/create")) + .statusCode(HttpStatus.OK.value()); + } + + @Test + void EssayAnswer_목록_조회() { + given(essayAnswerService.searchEssayAnswers(any(), any())).willReturn( + new EssayAnswersResponse( + Arrays.asList( + EssayAnswerResponse.of(ESSAY_ANSWER_1), + EssayAnswerResponse.of(ESSAY_ANSWER_1)), + 1L, 1, 1)); + EssayAnswerSearchRequest request = new EssayAnswerSearchRequest(1L, 2L, Collections.emptyList(), + Collections.emptyList()); + + given + .contentType(MediaType.APPLICATION_JSON_VALUE) + .body(request) + .when().get("essay-answers") + .then().log().all().apply(document("essay-answer/search-list")) + .statusCode(HttpStatus.OK.value()); + } + + @Test + void EssayAnswer_조회() { + given(essayAnswerService.getById(anyLong())) + .willReturn(ESSAY_ANSWER_1); + + given + .when().get("essay-answers/{id}", 1) + .then().log().all().apply(document("essay-answer/search")) + .statusCode(HttpStatus.OK.value()); + } + + @Test + void EssayAnswer_업데이트() { + EssayAnswerUpdateRequest request = new EssayAnswerUpdateRequest("new Answer"); + + given + .contentType(MediaType.APPLICATION_JSON_VALUE) + .body(request) + .when().patch("essay-answers/{id}", 1) + .then().log().all().apply(document("essay-answer/update")) + .statusCode(HttpStatus.OK.value()); + } + + @Test + void EssayAnswer_삭제() { + given + .when().delete("essay-answers/{id}", 1) + .then().log().all().apply(document("essay-answer/delete")) + .statusCode(HttpStatus.NO_CONTENT.value()); + } + + @Test + void Quiz_조회() { + given(quizService.findById(anyLong(), anyLong())) + .willReturn(new QuizResponse(1L, "question", false)); + + given + .when().get("quizzes/{id}", 1) + .then().log().all().apply(document("essay-answer/quiz-search")) + .statusCode(HttpStatus.OK.value()); + } + + @Test + void Quiz_에_대한_EssayAnswerResponse_조회() { + given(essayAnswerService.findByQuizId(anyLong())) + .willReturn(Arrays.asList(ESSAY_ANSWER_1, ESSAY_ANSWER_2)); + + given + .when().get("quizzes/{id}/essay-answers", 1) + .then().log().all().apply(document("essay-answer/quiz-essay-answers-search")) + .statusCode(HttpStatus.OK.value()); + } +} From 1e4dec60fda1e6fe0977cd7e620a00584b479e23 Mon Sep 17 00:00:00 2001 From: BGuga Date: Wed, 20 Sep 2023 01:38:31 +0900 Subject: [PATCH 02/10] =?UTF-8?q?test:=20Quiz=20=EB=88=84=EB=9D=BD=20?= =?UTF-8?q?=ED=85=8C=EC=8A=A4=ED=8A=B8=20=EC=9E=91=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wooteco/prolog/docu/QuizDocumentation.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/backend/src/documentation/java/wooteco/prolog/docu/QuizDocumentation.java b/backend/src/documentation/java/wooteco/prolog/docu/QuizDocumentation.java index 833de174a..bfd590795 100644 --- a/backend/src/documentation/java/wooteco/prolog/docu/QuizDocumentation.java +++ b/backend/src/documentation/java/wooteco/prolog/docu/QuizDocumentation.java @@ -27,13 +27,29 @@ public class QuizDocumentation extends NewDocumentation { @Test void 퀴즈_생성() { + QuizResponse question = new QuizResponse( + 1L, + "question", + true + ); + given(quizService.findById(any(), any())) + .willReturn(question); + + given + .when().get("/sessions/{sessionId}/keywords/{keywordId}/quizs/{quizId}", 1L, 1L, 1L) + .then().log().all().apply(document("quiz/create")) + .statusCode(HttpStatus.CREATED.value()); + } + + @Test + void 퀴즈_상세_조회() { given(quizService.createQuiz(any(), any())).willReturn(1L); given .contentType(MediaType.APPLICATION_JSON_VALUE) .body(QUIZ_REQUEST) .when().post("/sessions/{sessionId}/keywords/{keywordId}/quizs", 1L, 1L) - .then().log().all().apply(document("quiz/create")) + .then().log().all().apply(document("quiz/detail")) .statusCode(HttpStatus.CREATED.value()); } From 02f1f9857ec3dd3688fef33a287399d7103fd6cd Mon Sep 17 00:00:00 2001 From: BGuga Date: Wed, 20 Sep 2023 01:47:16 +0900 Subject: [PATCH 03/10] =?UTF-8?q?chore:=20static=20=ED=95=84=EB=93=9C=20?= =?UTF-8?q?=EC=88=9C=EC=84=9C=20=EB=B3=80=EA=B2=BD=20=EB=B0=8F=20=EB=84=A4?= =?UTF-8?q?=EC=9D=B4=EB=B0=8D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../prolog/docu/EssayAnswerDocumentaion.java | 32 +++++++------------ 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/backend/src/documentation/java/wooteco/prolog/docu/EssayAnswerDocumentaion.java b/backend/src/documentation/java/wooteco/prolog/docu/EssayAnswerDocumentaion.java index dcefb2a52..8f9c7b6c9 100644 --- a/backend/src/documentation/java/wooteco/prolog/docu/EssayAnswerDocumentaion.java +++ b/backend/src/documentation/java/wooteco/prolog/docu/EssayAnswerDocumentaion.java @@ -34,22 +34,6 @@ @WebMvcTest(EssayAnswerController.class) public class EssayAnswerDocumentaion extends NewDocumentation { - private static final EssayAnswer ESSAY_ANSWER_1 = new EssayAnswer( - new Quiz(1L, - new Keyword(1L, "keyword1", "첫 번째 키워드", 1, 5, 1L, null, Collections.emptySet()), - "questoin"), - "answer", - new Member(1L, "member1", "nickname1", Role.CREW, 1L, "image.jpg") - ); - - private static final EssayAnswer ESSAY_ANSWER_2 = new EssayAnswer( - new Quiz(2L, - new Keyword(1L, "keyword1", "첫 번째 키워드", 1, 5, 1L, null, Collections.emptySet()), - "questoin"), - "answer", - new Member(2L, "member2", "nickname2", Role.CREW, 2L, "image.jpg") - ); - @MockBean EssayAnswerService essayAnswerService; @@ -75,8 +59,8 @@ public class EssayAnswerDocumentaion extends NewDocumentation { given(essayAnswerService.searchEssayAnswers(any(), any())).willReturn( new EssayAnswersResponse( Arrays.asList( - EssayAnswerResponse.of(ESSAY_ANSWER_1), - EssayAnswerResponse.of(ESSAY_ANSWER_1)), + EssayAnswerResponse.of(ESSAY_ANSWER), + EssayAnswerResponse.of(ESSAY_ANSWER)), 1L, 1, 1)); EssayAnswerSearchRequest request = new EssayAnswerSearchRequest(1L, 2L, Collections.emptyList(), Collections.emptyList()); @@ -92,7 +76,7 @@ public class EssayAnswerDocumentaion extends NewDocumentation { @Test void EssayAnswer_조회() { given(essayAnswerService.getById(anyLong())) - .willReturn(ESSAY_ANSWER_1); + .willReturn(ESSAY_ANSWER); given .when().get("essay-answers/{id}", 1) @@ -134,11 +118,19 @@ public class EssayAnswerDocumentaion extends NewDocumentation { @Test void Quiz_에_대한_EssayAnswerResponse_조회() { given(essayAnswerService.findByQuizId(anyLong())) - .willReturn(Arrays.asList(ESSAY_ANSWER_1, ESSAY_ANSWER_2)); + .willReturn(Arrays.asList(ESSAY_ANSWER, ESSAY_ANSWER)); given .when().get("quizzes/{id}/essay-answers", 1) .then().log().all().apply(document("essay-answer/quiz-essay-answers-search")) .statusCode(HttpStatus.OK.value()); } + + private static final EssayAnswer ESSAY_ANSWER = new EssayAnswer( + new Quiz(1L, + new Keyword(1L, "keyword1", "첫 번째 키워드", 1, 5, 1L, null, Collections.emptySet()), + "questoin"), + "answer", + new Member(1L, "member1", "nickname1", Role.CREW, 1L, "image.jpg") + ); } From a6552c424d2e30d83975fb9bc086e9eadd9b6234 Mon Sep 17 00:00:00 2001 From: BGuga Date: Wed, 20 Sep 2023 01:54:07 +0900 Subject: [PATCH 04/10] =?UTF-8?q?chore:=20snippet=20=EB=84=A4=EC=9D=B4?= =?UTF-8?q?=EB=B0=8D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/wooteco/prolog/docu/EssayAnswerDocumentaion.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/documentation/java/wooteco/prolog/docu/EssayAnswerDocumentaion.java b/backend/src/documentation/java/wooteco/prolog/docu/EssayAnswerDocumentaion.java index 8f9c7b6c9..7fb2b3d38 100644 --- a/backend/src/documentation/java/wooteco/prolog/docu/EssayAnswerDocumentaion.java +++ b/backend/src/documentation/java/wooteco/prolog/docu/EssayAnswerDocumentaion.java @@ -69,7 +69,7 @@ public class EssayAnswerDocumentaion extends NewDocumentation { .contentType(MediaType.APPLICATION_JSON_VALUE) .body(request) .when().get("essay-answers") - .then().log().all().apply(document("essay-answer/search-list")) + .then().log().all().apply(document("essay-answer/search/list")) .statusCode(HttpStatus.OK.value()); } @@ -111,7 +111,7 @@ public class EssayAnswerDocumentaion extends NewDocumentation { given .when().get("quizzes/{id}", 1) - .then().log().all().apply(document("essay-answer/quiz-search")) + .then().log().all().apply(document("essay-answer/quiz/search")) .statusCode(HttpStatus.OK.value()); } @@ -122,7 +122,7 @@ public class EssayAnswerDocumentaion extends NewDocumentation { given .when().get("quizzes/{id}/essay-answers", 1) - .then().log().all().apply(document("essay-answer/quiz-essay-answers-search")) + .then().log().all().apply(document("essay-answer/quiz/essay-answer")) .statusCode(HttpStatus.OK.value()); } From f81bf5691b1d95396560ebc20a4948986cd636c8 Mon Sep 17 00:00:00 2001 From: BGuga Date: Sat, 23 Sep 2023 22:19:38 +0900 Subject: [PATCH 05/10] =?UTF-8?q?test:=20RoadmapDocument=20RestDocs=20?= =?UTF-8?q?=ED=85=8C=EC=8A=A4=ED=8A=B8=20=EC=9E=91=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wooteco/prolog/docu/RoadmapDocument.java | 96 +++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100644 backend/src/documentation/java/wooteco/prolog/docu/RoadmapDocument.java diff --git a/backend/src/documentation/java/wooteco/prolog/docu/RoadmapDocument.java b/backend/src/documentation/java/wooteco/prolog/docu/RoadmapDocument.java new file mode 100644 index 000000000..bc0d4d3f9 --- /dev/null +++ b/backend/src/documentation/java/wooteco/prolog/docu/RoadmapDocument.java @@ -0,0 +1,96 @@ +package wooteco.prolog.docu; + +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.BDDMockito.given; +import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.document; + +import java.util.Arrays; +import java.util.Collections; +import java.util.HashSet; +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; +import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.http.HttpStatus; +import wooteco.prolog.NewDocumentation; +import wooteco.prolog.roadmap.application.RoadMapService; +import wooteco.prolog.roadmap.application.dto.KeywordResponse; +import wooteco.prolog.roadmap.application.dto.KeywordsResponse; +import wooteco.prolog.roadmap.ui.RoadmapController; + +@WebMvcTest(RoadmapController.class) +public class RoadmapDocument extends NewDocumentation { + + @MockBean + private RoadMapService roadMapService; + + @Test + void 로드맵_검색() { + given(roadMapService.findAllKeywordsWithProgress(any(), any())) + .willReturn(KEYWORD_SESSION_INCLUDE_MULTI_RESPONSE); + + given + .header("Authorization", "Bearer " + accessToken) + .when().get("/roadmaps") + .then().log().all().apply(document("roadmap/find")) + .statusCode(HttpStatus.OK.value()); + } + + private static final KeywordResponse KEYWORD_WITH_ALL_CHILD_MULTI_RESPONSE = new KeywordResponse( + 1L, + "자바", + "자바에 대한 설명을 작성했습니다.", + 1, + 1, + 3, + 1, + null, + null, + new HashSet<>( + Arrays.asList( + new KeywordResponse( + 2L, + "List", + "자바의 자료구조인 List에 대한 설명을 작성했습니다.", + 1, + 1, + 3, + 1, + 1L, + Collections.emptyList(), + Collections.emptySet() + ), + new KeywordResponse( + 1L, + "Set", + "자바의 자료구조인 Set에 대한 설명을 작성했습니다.", + 2, + 1, + 3, + 1, + 1L, + Collections.emptyList(), + Collections.emptySet() + )) + ) + ); + + private static final KeywordResponse KEYWORD_SINGLE_RESPONSE = new KeywordResponse( + 1L, + "자바", + "자바에 대한 설명을 작성했습니다.", + 1, + 1, + 3, + 2, + null, + null, + null + ); + + private static final KeywordsResponse KEYWORD_SESSION_INCLUDE_MULTI_RESPONSE = new KeywordsResponse( + Arrays.asList( + KEYWORD_WITH_ALL_CHILD_MULTI_RESPONSE, + KEYWORD_SINGLE_RESPONSE + ) + ); +} From d5b45e82a03ee5a26fbd4ccd03760bcc15d4a0d8 Mon Sep 17 00:00:00 2001 From: BGuga Date: Sat, 23 Sep 2023 22:39:56 +0900 Subject: [PATCH 06/10] =?UTF-8?q?fix:=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../prolog/docu/EssayAnswerDocumentaion.java | 41 +++++++++---------- .../prolog/docu/QuizDocumentation.java | 29 ++++++------- .../wooteco/prolog/docu/RoadmapDocument.java | 2 +- 3 files changed, 35 insertions(+), 37 deletions(-) diff --git a/backend/src/documentation/java/wooteco/prolog/docu/EssayAnswerDocumentaion.java b/backend/src/documentation/java/wooteco/prolog/docu/EssayAnswerDocumentaion.java index 7fb2b3d38..752028d03 100644 --- a/backend/src/documentation/java/wooteco/prolog/docu/EssayAnswerDocumentaion.java +++ b/backend/src/documentation/java/wooteco/prolog/docu/EssayAnswerDocumentaion.java @@ -3,14 +3,11 @@ import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyLong; import static org.mockito.BDDMockito.given; -import static org.mockito.Mockito.doNothing; import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.document; import java.util.Arrays; import java.util.Collections; -import org.elasticsearch.common.collect.List; import org.junit.jupiter.api.Test; -import org.mockito.BDDMockito; import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.http.HttpStatus; @@ -41,8 +38,16 @@ public class EssayAnswerDocumentaion extends NewDocumentation { QuizService quizService; + private static final EssayAnswer ESSAY_ANSWER = new EssayAnswer( + new Quiz(1L, + new Keyword(1L, "keyword1", "첫 번째 키워드", 1, 5, 1L, null, Collections.emptySet()), + "question"), + "answer", + new Member(1L, "member1", "nickname1", Role.CREW, 1L, "image.jpg") + ); + @Test - void EssayAnswer_응답() { + void EssayAnswer_생성() { given(essayAnswerService.createEssayAnswer(any(), any())).willReturn(1L); EssayAnswerRequest request = new EssayAnswerRequest(1L, "answer"); @@ -73,17 +78,6 @@ public class EssayAnswerDocumentaion extends NewDocumentation { .statusCode(HttpStatus.OK.value()); } - @Test - void EssayAnswer_조회() { - given(essayAnswerService.getById(anyLong())) - .willReturn(ESSAY_ANSWER); - - given - .when().get("essay-answers/{id}", 1) - .then().log().all().apply(document("essay-answer/search")) - .statusCode(HttpStatus.OK.value()); - } - @Test void EssayAnswer_업데이트() { EssayAnswerUpdateRequest request = new EssayAnswerUpdateRequest("new Answer"); @@ -126,11 +120,14 @@ public class EssayAnswerDocumentaion extends NewDocumentation { .statusCode(HttpStatus.OK.value()); } - private static final EssayAnswer ESSAY_ANSWER = new EssayAnswer( - new Quiz(1L, - new Keyword(1L, "keyword1", "첫 번째 키워드", 1, 5, 1L, null, Collections.emptySet()), - "questoin"), - "answer", - new Member(1L, "member1", "nickname1", Role.CREW, 1L, "image.jpg") - ); + @Test + void EssayAnswer_조회() { + given(essayAnswerService.getById(anyLong())) + .willReturn(ESSAY_ANSWER); + + given + .when().get("essay-answers/{id}", 1) + .then().log().all().apply(document("essay-answer/search")) + .statusCode(HttpStatus.OK.value()); + } } diff --git a/backend/src/documentation/java/wooteco/prolog/docu/QuizDocumentation.java b/backend/src/documentation/java/wooteco/prolog/docu/QuizDocumentation.java index bfd590795..deb26d726 100644 --- a/backend/src/documentation/java/wooteco/prolog/docu/QuizDocumentation.java +++ b/backend/src/documentation/java/wooteco/prolog/docu/QuizDocumentation.java @@ -27,30 +27,31 @@ public class QuizDocumentation extends NewDocumentation { @Test void 퀴즈_생성() { - QuizResponse question = new QuizResponse( - 1L, - "question", - true - ); - given(quizService.findById(any(), any())) - .willReturn(question); + given(quizService.createQuiz(any(), any())).willReturn(1L); given - .when().get("/sessions/{sessionId}/keywords/{keywordId}/quizs/{quizId}", 1L, 1L, 1L) + .contentType(MediaType.APPLICATION_JSON_VALUE) + .body(QUIZ_REQUEST) + .when().post("/sessions/{sessionId}/keywords/{keywordId}/quizs", 1L, 1L) .then().log().all().apply(document("quiz/create")) .statusCode(HttpStatus.CREATED.value()); } @Test void 퀴즈_상세_조회() { - given(quizService.createQuiz(any(), any())).willReturn(1L); + QuizResponse question = new QuizResponse( + 1L, + "question", + true + ); + given(quizService.findById(any(), any())) + .willReturn(question); given - .contentType(MediaType.APPLICATION_JSON_VALUE) - .body(QUIZ_REQUEST) - .when().post("/sessions/{sessionId}/keywords/{keywordId}/quizs", 1L, 1L) + .header("Authorization", "Bearer " + accessToken) + .when().get("/sessions/{sessionId}/keywords/{keywordId}/quizs/{quizId}", 1L, 1L, 1L) .then().log().all().apply(document("quiz/detail")) - .statusCode(HttpStatus.CREATED.value()); + .statusCode(HttpStatus.OK.value()); } @Test @@ -60,7 +61,7 @@ public class QuizDocumentation extends NewDocumentation { given .contentType(MediaType.APPLICATION_JSON_VALUE) .when().get("/sessions/{sessionId}/keywords/{keywordId}/quizs", 1L, 1L) - .then().log().all().apply(document("quiz/delete")) + .then().log().all().apply(document("quiz/list")) .statusCode(HttpStatus.OK.value()); } diff --git a/backend/src/documentation/java/wooteco/prolog/docu/RoadmapDocument.java b/backend/src/documentation/java/wooteco/prolog/docu/RoadmapDocument.java index bc0d4d3f9..3661b1e9f 100644 --- a/backend/src/documentation/java/wooteco/prolog/docu/RoadmapDocument.java +++ b/backend/src/documentation/java/wooteco/prolog/docu/RoadmapDocument.java @@ -29,7 +29,7 @@ public class RoadmapDocument extends NewDocumentation { .willReturn(KEYWORD_SESSION_INCLUDE_MULTI_RESPONSE); given - .header("Authorization", "Bearer " + accessToken) + .param("curriculumId", 1) .when().get("/roadmaps") .then().log().all().apply(document("roadmap/find")) .statusCode(HttpStatus.OK.value()); From de25e67e0456691160e2eb2ff964790aed092efc Mon Sep 17 00:00:00 2001 From: BGuga Date: Mon, 25 Sep 2023 15:08:10 +0900 Subject: [PATCH 07/10] =?UTF-8?q?test:=20RecommendedController=20RestDocks?= =?UTF-8?q?=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../prolog/docu/RecommendDocument.java | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 backend/src/documentation/java/wooteco/prolog/docu/RecommendDocument.java diff --git a/backend/src/documentation/java/wooteco/prolog/docu/RecommendDocument.java b/backend/src/documentation/java/wooteco/prolog/docu/RecommendDocument.java new file mode 100644 index 000000000..b92ac1fb2 --- /dev/null +++ b/backend/src/documentation/java/wooteco/prolog/docu/RecommendDocument.java @@ -0,0 +1,57 @@ +package wooteco.prolog.docu; + +import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.document; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; +import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import wooteco.prolog.NewDocumentation; +import wooteco.prolog.roadmap.application.RecommendedPostService; +import wooteco.prolog.roadmap.application.dto.RecommendedRequest; +import wooteco.prolog.roadmap.application.dto.RecommendedUpdateRequest; +import wooteco.prolog.roadmap.ui.RecommendedController; + +@WebMvcTest(controllers = RecommendedController.class) +public class RecommendDocument extends NewDocumentation { + + @MockBean + RecommendedPostService recommendedPostService; + + @Test + void 추천_포스트_생성() { + RecommendedRequest recommendUrlValue = new RecommendedRequest("recommendUrlValue"); + + given + .contentType(MediaType.APPLICATION_JSON_VALUE) + .body(recommendUrlValue) + .when().post("/keywords/{keywordId}/recommended-posts", 1L) + .then().log().all().apply(document("recommend/create")) + .statusCode(HttpStatus.CREATED.value()); + } + + @Test + void 추천_포스트_수정() { + RecommendedUpdateRequest recommendedUpdateRequest = new RecommendedUpdateRequest("recommendUrlValue"); + + given + .contentType(MediaType.APPLICATION_JSON_VALUE) + .body(recommendedUpdateRequest) + .when().put("/keywords/{keywordId}/recommended-posts/{recommendedId}", 1L, 2L) + .then().log().all().apply(document("recommend/update")) + .statusCode(HttpStatus.NO_CONTENT.value()); + } + + @Test + void 추천_포스트_삭제() { + RecommendedUpdateRequest recommendedUpdateRequest = new RecommendedUpdateRequest("recommendUrlValue"); + + given + .contentType(MediaType.APPLICATION_JSON_VALUE) + .body(recommendedUpdateRequest) + .when().delete("/keywords/{keywordId}/recommended-posts/{recommendedId}", 1L, 2L) + .then().log().all().apply(document("recommend/delete")) + .statusCode(HttpStatus.NO_CONTENT.value()); + } +} From 0fb3dad001e9814fac674f9ca068a838bf185bff Mon Sep 17 00:00:00 2001 From: BGuga Date: Mon, 25 Sep 2023 15:42:06 +0900 Subject: [PATCH 08/10] =?UTF-8?q?test:=20request=20=EC=9D=98=20charSet=20?= =?UTF-8?q?=ED=91=9C=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/wooteco/prolog/NewDocumentation.java | 2 ++ .../prolog/docu/CurriculumDocumentation.java | 9 ++++----- .../prolog/docu/EssayAnswerDocumentaion.java | 7 +++---- .../prolog/docu/KeywordDocumentation.java | 20 +++++++++---------- .../prolog/docu/NewSessionDocumentation.java | 5 ++--- .../prolog/docu/QuizDocumentation.java | 7 ++----- .../prolog/docu/RecommendDocument.java | 9 ++------- 7 files changed, 24 insertions(+), 35 deletions(-) diff --git a/backend/src/documentation/java/wooteco/prolog/NewDocumentation.java b/backend/src/documentation/java/wooteco/prolog/NewDocumentation.java index 68161a47a..4ce352dd2 100644 --- a/backend/src/documentation/java/wooteco/prolog/NewDocumentation.java +++ b/backend/src/documentation/java/wooteco/prolog/NewDocumentation.java @@ -13,6 +13,7 @@ import org.springframework.test.context.ActiveProfiles; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.web.context.WebApplicationContext; +import org.springframework.web.filter.CharacterEncodingFilter; @ActiveProfiles("docu") @ExtendWith({RestDocumentationExtension.class}) @@ -27,6 +28,7 @@ public void setUp(WebApplicationContext webApplicationContext, RestDocumentationContextProvider restDocumentation) { given = RestAssuredMockMvc.given() .mockMvc(MockMvcBuilders.webAppContextSetup(webApplicationContext) + .addFilter(new CharacterEncodingFilter("UTF-8", true)) .apply(documentationConfiguration(restDocumentation).operationPreprocessors() .withRequestDefaults(prettyPrint()) .withResponseDefaults(prettyPrint())) diff --git a/backend/src/documentation/java/wooteco/prolog/docu/CurriculumDocumentation.java b/backend/src/documentation/java/wooteco/prolog/docu/CurriculumDocumentation.java index edd0409d2..5c35b970b 100644 --- a/backend/src/documentation/java/wooteco/prolog/docu/CurriculumDocumentation.java +++ b/backend/src/documentation/java/wooteco/prolog/docu/CurriculumDocumentation.java @@ -10,7 +10,6 @@ import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; import wooteco.prolog.NewDocumentation; import wooteco.prolog.roadmap.application.CurriculumService; import wooteco.prolog.roadmap.application.dto.CurriculumRequest; @@ -30,7 +29,7 @@ public class CurriculumDocumentation extends NewDocumentation { given(curriculumService.create(any())).willReturn(1L); given - .contentType(MediaType.APPLICATION_JSON_VALUE) + .contentType("application/json;charset=UTF-8") .body(CURRICULUM_REQUEST) .when().post("/curriculums") .then().log().all().apply(document("curriculums/create")) @@ -42,7 +41,7 @@ public class CurriculumDocumentation extends NewDocumentation { given(curriculumService.findCurriculums()).willReturn(CURRICULUMS_RESPONSE); given - .contentType(MediaType.APPLICATION_JSON_VALUE) + .contentType("application/json;charset=UTF-8") .body(CURRICULUM_REQUEST) .when().get("/curriculums") .then().log().all().apply(document("curriculums/find")) @@ -54,7 +53,7 @@ public class CurriculumDocumentation extends NewDocumentation { doNothing().when(curriculumService).update(any(), any()); given - .contentType(MediaType.APPLICATION_JSON_VALUE) + .contentType("application/json;charset=UTF-8") .body(CURRICULUM_EDIT_REQUEST) .when().put("/curriculums/{curriculumId}", 1) .then().log().all().apply(document("curriculums/update")) @@ -66,7 +65,7 @@ public class CurriculumDocumentation extends NewDocumentation { doNothing().when(curriculumService).delete(any()); given - .contentType(MediaType.APPLICATION_JSON_VALUE) + .contentType("application/json;charset=UTF-8") .when().delete("/curriculums/{curriculumId}", 1) .then().log().all().apply(document("curriculums/delete")) .statusCode(HttpStatus.NO_CONTENT.value()); diff --git a/backend/src/documentation/java/wooteco/prolog/docu/EssayAnswerDocumentaion.java b/backend/src/documentation/java/wooteco/prolog/docu/EssayAnswerDocumentaion.java index 752028d03..e982ed14a 100644 --- a/backend/src/documentation/java/wooteco/prolog/docu/EssayAnswerDocumentaion.java +++ b/backend/src/documentation/java/wooteco/prolog/docu/EssayAnswerDocumentaion.java @@ -11,7 +11,6 @@ import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; import wooteco.prolog.NewDocumentation; import wooteco.prolog.member.domain.Member; import wooteco.prolog.member.domain.Role; @@ -52,7 +51,7 @@ public class EssayAnswerDocumentaion extends NewDocumentation { EssayAnswerRequest request = new EssayAnswerRequest(1L, "answer"); given - .contentType(MediaType.APPLICATION_JSON_VALUE) + .contentType("application/json;charset=UTF-8") .body(request) .when().post("essay-answers") .then().log().all().apply(document("essay-answer/create")) @@ -71,7 +70,7 @@ public class EssayAnswerDocumentaion extends NewDocumentation { Collections.emptyList()); given - .contentType(MediaType.APPLICATION_JSON_VALUE) + .contentType("application/json;charset=UTF-8") .body(request) .when().get("essay-answers") .then().log().all().apply(document("essay-answer/search/list")) @@ -83,7 +82,7 @@ public class EssayAnswerDocumentaion extends NewDocumentation { EssayAnswerUpdateRequest request = new EssayAnswerUpdateRequest("new Answer"); given - .contentType(MediaType.APPLICATION_JSON_VALUE) + .contentType("application/json;charset=UTF-8") .body(request) .when().patch("essay-answers/{id}", 1) .then().log().all().apply(document("essay-answer/update")) diff --git a/backend/src/documentation/java/wooteco/prolog/docu/KeywordDocumentation.java b/backend/src/documentation/java/wooteco/prolog/docu/KeywordDocumentation.java index dbe204aef..f8d955044 100644 --- a/backend/src/documentation/java/wooteco/prolog/docu/KeywordDocumentation.java +++ b/backend/src/documentation/java/wooteco/prolog/docu/KeywordDocumentation.java @@ -1,11 +1,17 @@ package wooteco.prolog.docu; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.BDDMockito.given; +import static org.mockito.Mockito.doNothing; +import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.document; + +import java.util.Arrays; +import java.util.HashSet; import org.elasticsearch.common.collect.List; import org.junit.jupiter.api.Test; import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; import wooteco.prolog.NewDocumentation; import wooteco.prolog.roadmap.application.KeywordService; import wooteco.prolog.roadmap.application.dto.KeywordCreateRequest; @@ -14,14 +20,6 @@ import wooteco.prolog.roadmap.application.dto.KeywordsResponse; import wooteco.prolog.roadmap.ui.KeywordController; -import java.util.Arrays; -import java.util.HashSet; - -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.BDDMockito.given; -import static org.mockito.Mockito.doNothing; -import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.document; - @WebMvcTest(controllers = KeywordController.class) public class KeywordDocumentation extends NewDocumentation { @@ -33,7 +31,7 @@ public class KeywordDocumentation extends NewDocumentation { given(keywordService.createKeyword(any(), any())).willReturn(1L); given - .contentType(MediaType.APPLICATION_JSON_VALUE) + .contentType("application/json;charset=UTF-8") .body(KEYWORD_CREATE_REQUEST) .when().post("/sessions/1/keywords") .then().log().all().apply(document("keywords/create")) @@ -55,7 +53,7 @@ public class KeywordDocumentation extends NewDocumentation { doNothing().when(keywordService).updateKeyword(any(), any(), any()); given - .contentType(MediaType.APPLICATION_JSON_VALUE) + .contentType("application/json;charset=UTF-8") .body(KEYWORD_UPDATE_REQUEST) .when().put("/sessions/1/keywords/1") .then().log().all().apply(document("keywords/update")) diff --git a/backend/src/documentation/java/wooteco/prolog/docu/NewSessionDocumentation.java b/backend/src/documentation/java/wooteco/prolog/docu/NewSessionDocumentation.java index 7b9dc9fcd..081d14c70 100644 --- a/backend/src/documentation/java/wooteco/prolog/docu/NewSessionDocumentation.java +++ b/backend/src/documentation/java/wooteco/prolog/docu/NewSessionDocumentation.java @@ -10,7 +10,6 @@ import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; import wooteco.prolog.NewDocumentation; import wooteco.prolog.roadmap.application.NewSessionService; import wooteco.prolog.roadmap.application.dto.SessionRequest; @@ -29,7 +28,7 @@ public class NewSessionDocumentation extends NewDocumentation { given(sessionService.createSession(any(), any())).willReturn(1L); given - .contentType(MediaType.APPLICATION_JSON_VALUE) + .contentType("application/json;charset=UTF-8") .body(SESSION_CREATE_REQUEST) .when().post("/curriculums/1/sessions") .then().log().all().apply(document("sessions-new/create")) @@ -51,7 +50,7 @@ public class NewSessionDocumentation extends NewDocumentation { doNothing().when(sessionService).updateSession(any(), any()); given - .contentType(MediaType.APPLICATION_JSON_VALUE) + .contentType("application/json;charset=UTF-8") .body(SESSION_UPDATE_REQUEST) .when().put("/curriculums/1/sessions/1") .then().log().all().apply(document("sessions-new/update")) diff --git a/backend/src/documentation/java/wooteco/prolog/docu/QuizDocumentation.java b/backend/src/documentation/java/wooteco/prolog/docu/QuizDocumentation.java index deb26d726..3f183da33 100644 --- a/backend/src/documentation/java/wooteco/prolog/docu/QuizDocumentation.java +++ b/backend/src/documentation/java/wooteco/prolog/docu/QuizDocumentation.java @@ -11,7 +11,6 @@ import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; import wooteco.prolog.NewDocumentation; import wooteco.prolog.roadmap.application.QuizService; import wooteco.prolog.roadmap.application.dto.QuizRequest; @@ -30,7 +29,7 @@ public class QuizDocumentation extends NewDocumentation { given(quizService.createQuiz(any(), any())).willReturn(1L); given - .contentType(MediaType.APPLICATION_JSON_VALUE) + .contentType("application/json;charset=UTF-8") .body(QUIZ_REQUEST) .when().post("/sessions/{sessionId}/keywords/{keywordId}/quizs", 1L, 1L) .then().log().all().apply(document("quiz/create")) @@ -59,7 +58,6 @@ public class QuizDocumentation extends NewDocumentation { given(quizService.findQuizzesByKeywordId(any(), any())).willReturn(QUIZZES_RESPONSE); given - .contentType(MediaType.APPLICATION_JSON_VALUE) .when().get("/sessions/{sessionId}/keywords/{keywordId}/quizs", 1L, 1L) .then().log().all().apply(document("quiz/list")) .statusCode(HttpStatus.OK.value()); @@ -70,7 +68,7 @@ public class QuizDocumentation extends NewDocumentation { doNothing().when(quizService).updateQuiz(any(), any()); given - .contentType(MediaType.APPLICATION_JSON_VALUE) + .contentType("application/json;charset=UTF-8") .body(QUIZ_EDIT_REQUEST) .when().put("/sessions/{sessionId}/keywords/{keywordId}/quizs/{quizId}", 1L, 1L, 1L) .then().log().all().apply(document("quiz/update")) @@ -83,7 +81,6 @@ public class QuizDocumentation extends NewDocumentation { doNothing().when(quizService).deleteQuiz(any()); given - .contentType(MediaType.APPLICATION_JSON_VALUE) .when().delete("/sessions/{sessionId}/keywords/{keywordId}/quizs/{quizId}", 1L, 1L, 1L) .then().log().all().apply(document("quiz/delete")) .statusCode(HttpStatus.NO_CONTENT.value()); diff --git a/backend/src/documentation/java/wooteco/prolog/docu/RecommendDocument.java b/backend/src/documentation/java/wooteco/prolog/docu/RecommendDocument.java index b92ac1fb2..b4cae1b10 100644 --- a/backend/src/documentation/java/wooteco/prolog/docu/RecommendDocument.java +++ b/backend/src/documentation/java/wooteco/prolog/docu/RecommendDocument.java @@ -6,7 +6,6 @@ import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; import wooteco.prolog.NewDocumentation; import wooteco.prolog.roadmap.application.RecommendedPostService; import wooteco.prolog.roadmap.application.dto.RecommendedRequest; @@ -24,7 +23,7 @@ public class RecommendDocument extends NewDocumentation { RecommendedRequest recommendUrlValue = new RecommendedRequest("recommendUrlValue"); given - .contentType(MediaType.APPLICATION_JSON_VALUE) + .contentType("application/json;charset=UTF-8") .body(recommendUrlValue) .when().post("/keywords/{keywordId}/recommended-posts", 1L) .then().log().all().apply(document("recommend/create")) @@ -36,7 +35,7 @@ public class RecommendDocument extends NewDocumentation { RecommendedUpdateRequest recommendedUpdateRequest = new RecommendedUpdateRequest("recommendUrlValue"); given - .contentType(MediaType.APPLICATION_JSON_VALUE) + .contentType("application/json;charset=UTF-8") .body(recommendedUpdateRequest) .when().put("/keywords/{keywordId}/recommended-posts/{recommendedId}", 1L, 2L) .then().log().all().apply(document("recommend/update")) @@ -45,11 +44,7 @@ public class RecommendDocument extends NewDocumentation { @Test void 추천_포스트_삭제() { - RecommendedUpdateRequest recommendedUpdateRequest = new RecommendedUpdateRequest("recommendUrlValue"); - given - .contentType(MediaType.APPLICATION_JSON_VALUE) - .body(recommendedUpdateRequest) .when().delete("/keywords/{keywordId}/recommended-posts/{recommendedId}", 1L, 2L) .then().log().all().apply(document("recommend/delete")) .statusCode(HttpStatus.NO_CONTENT.value()); From 867bdb866e473b9419ca4e63fa34ddbf8ce6ae6c Mon Sep 17 00:00:00 2001 From: BGuga Date: Mon, 25 Sep 2023 15:44:00 +0900 Subject: [PATCH 09/10] =?UTF-8?q?chore:=20restDocs=20=EB=AC=B8=EC=84=9C?= =?UTF-8?q?=ED=99=94=20adoc=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/documentation/adoc/curriculum.adoc | 42 + .../src/documentation/adoc/essayAnswer.adoc | 62 + backend/src/documentation/adoc/index.adoc | 6 + backend/src/documentation/adoc/keyword.adoc | 62 + backend/src/documentation/adoc/quiz.adoc | 42 + backend/src/documentation/adoc/recommend.adoc | 32 + backend/src/documentation/adoc/roadmap.adoc | 12 + backend/src/main/resources/static/index.html | 4923 ----------------- 8 files changed, 258 insertions(+), 4923 deletions(-) create mode 100644 backend/src/documentation/adoc/curriculum.adoc create mode 100644 backend/src/documentation/adoc/essayAnswer.adoc create mode 100644 backend/src/documentation/adoc/keyword.adoc create mode 100644 backend/src/documentation/adoc/quiz.adoc create mode 100644 backend/src/documentation/adoc/recommend.adoc create mode 100644 backend/src/documentation/adoc/roadmap.adoc delete mode 100644 backend/src/main/resources/static/index.html diff --git a/backend/src/documentation/adoc/curriculum.adoc b/backend/src/documentation/adoc/curriculum.adoc new file mode 100644 index 000000000..a8f6746a3 --- /dev/null +++ b/backend/src/documentation/adoc/curriculum.adoc @@ -0,0 +1,42 @@ +[[Curriculum]] +== 커리큘럼 + +=== 커리큘럼 생성 + +==== Request + +include::{snippets}/curriculums/create/http-request.adoc[] + +==== Response + +include::{snippets}/curriculums/create/http-response.adoc[] + +=== 커리큘럼 조회 + +==== Request + +include::{snippets}/curriculums/find/http-request.adoc[] + +==== Response + +include::{snippets}/curriculums/find/http-response.adoc[] + +=== 커리큘럼 수정 + +==== Request + +include::{snippets}/curriculums/update/http-request.adoc[] + +==== Response + +include::{snippets}/curriculums/update/http-response.adoc[] + +=== 커리큘럼 삭제 + +==== Request + +include::{snippets}/curriculums/delete/http-request.adoc[] + +==== Response + +include::{snippets}/curriculums/delete/http-response.adoc[] diff --git a/backend/src/documentation/adoc/essayAnswer.adoc b/backend/src/documentation/adoc/essayAnswer.adoc new file mode 100644 index 000000000..33fe79e36 --- /dev/null +++ b/backend/src/documentation/adoc/essayAnswer.adoc @@ -0,0 +1,62 @@ +[[EssayAnswer]] +== 퀴즈 답변 + +=== 퀴즈 답변 생성 + +==== Request + +include::{snippets}/essay-answer/create/http-request.adoc[] + +==== Response + +include::{snippets}/essay-answer/create/http-response.adoc[] + +=== 퀴즈 답변 단일 조회 + +==== Request + +include::{snippets}/essay-answer/search/http-request.adoc[] + +==== Response + +include::{snippets}/essay-answer/search/http-response.adoc[] + +=== 퀴즈 답변 목록 조회 + +==== Request + +include::{snippets}/essay-answer/search-list/http-request.adoc[] + +==== Response + +include::{snippets}/essay-answer/search-list/http-response.adoc[] + +=== 퀴즈 답변 업데이트 + +==== Request + +include::{snippets}/essay-answer/update/http-request.adoc[] + +==== Response + +include::{snippets}/essay-answer/update/http-response.adoc[] + +=== 퀴즈 답변 삭제 + +==== Request + +include::{snippets}/essay-answer/delete/http-request.adoc[] + +==== Response + +include::{snippets}/essay-answer/delete/http-response.adoc[] + +=== 퀴즈에 대한 답변 목록 조회 + +==== Request + +include::{snippets}/essay-answer/quiz/essay-answer/http-request.adoc[] + +==== Response + +include::{snippets}/essay-answer/quiz/essay-answer/http-response.adoc[] diff --git a/backend/src/documentation/adoc/index.adoc b/backend/src/documentation/adoc/index.adoc index d8acfa423..d546fceea 100644 --- a/backend/src/documentation/adoc/index.adoc +++ b/backend/src/documentation/adoc/index.adoc @@ -17,3 +17,9 @@ include::tag.adoc[] include::filter.adoc[] include::studylogOverview.adoc[] include::reaction.adoc[] +include::essayAnswer.adoc[] +include::curriculum.adoc[] +include::keyword.adoc[] +include::quiz.adoc[] +include::recommend.adoc[] +include::roadmap.adoc[] diff --git a/backend/src/documentation/adoc/keyword.adoc b/backend/src/documentation/adoc/keyword.adoc new file mode 100644 index 000000000..b227b417c --- /dev/null +++ b/backend/src/documentation/adoc/keyword.adoc @@ -0,0 +1,62 @@ +[[Keyword]] +== 키워드 + +=== 키워드 생성 + +==== Request + +include::{snippets}/keywords/create/http-request.adoc[] + +==== Response + +include::{snippets}/keywords/create/http-response.adoc[] + +=== 키워드 조회 + +==== Request + +include::{snippets}/keywords/find/http-request.adoc[] + +==== Response + +include::{snippets}/keywords/find/http-response.adoc[] + +=== 키워드 수정 + +==== Request + +include::{snippets}/keywords/update/http-request.adoc[] + +==== Response + +include::{snippets}/keywords/update/http-response.adoc[] + +=== 키워드 삭제 + +==== Request + +include::{snippets}/keywords/delete/http-request.adoc[] + +==== Response + +include::{snippets}/keywords/delete/http-response.adoc[] + +=== 세션별 키워드 목록 조회 + +==== Request + +include::{snippets}/keywords/find-childAll/http-request.adoc[] + +==== Response + +include::{snippets}/keywords/find-childAll/http-response.adoc[] + +=== 세션별 키워드의 자식 목록 조회 + +==== Request + +include::{snippets}/keywords/find-with-childAll/http-request.adoc[] + +==== Response + +include::{snippets}/keywords/find-with-childAll/http-response.adoc[] diff --git a/backend/src/documentation/adoc/quiz.adoc b/backend/src/documentation/adoc/quiz.adoc new file mode 100644 index 000000000..335881caf --- /dev/null +++ b/backend/src/documentation/adoc/quiz.adoc @@ -0,0 +1,42 @@ +[[Quiz]] +== 퀴즈 + +=== 퀴즈 생성 + +==== Request + +include::{snippets}/quiz/create/http-request.adoc[] + +==== Response + +include::{snippets}/quiz/create/http-response.adoc[] + +=== 퀴즈 상세 조회 + +==== Request + +include::{snippets}/quiz/detail/http-request.adoc[] + +==== Response + +include::{snippets}/quiz/detail/http-response.adoc[] + +=== 키워드별 퀴즈 목록 조회 + +==== Request + +include::{snippets}/quiz/list/http-request.adoc[] + +==== Response + +include::{snippets}/quiz/list/http-response.adoc[] + +=== 퀴즈 삭제 + +==== Request + +include::{snippets}/quiz/delete/http-request.adoc[] + +==== Response + +include::{snippets}/quiz/delete/http-response.adoc[] diff --git a/backend/src/documentation/adoc/recommend.adoc b/backend/src/documentation/adoc/recommend.adoc new file mode 100644 index 000000000..790b72d29 --- /dev/null +++ b/backend/src/documentation/adoc/recommend.adoc @@ -0,0 +1,32 @@ +[[Recommend]] +== 추천 포스트 + +=== 추천 포스트 생성 + +==== Request + +include::{snippets}/recommend/create/http-request.adoc[] + +==== Response + +include::{snippets}/recommend/create/http-response.adoc[] + +=== 추천 포스트 수정 + +==== Request + +include::{snippets}/recommend/update/http-request.adoc[] + +==== Response + +include::{snippets}/recommend/update/http-response.adoc[] + +=== 추천 포스트 삭제 + +==== Request + +include::{snippets}/recommend/delete/http-request.adoc[] + +==== Response + +include::{snippets}/recommend/delete/http-response.adoc[] diff --git a/backend/src/documentation/adoc/roadmap.adoc b/backend/src/documentation/adoc/roadmap.adoc new file mode 100644 index 000000000..53a2f99f2 --- /dev/null +++ b/backend/src/documentation/adoc/roadmap.adoc @@ -0,0 +1,12 @@ +[[Roadmap]] +== 로드맵 + +=== 로드맵 검색 + +==== Request + +include::{snippets}/roadmap/find/http-request.adoc[] + +==== Response + +include::{snippets}/roadmap/find/http-response.adoc[] diff --git a/backend/src/main/resources/static/index.html b/backend/src/main/resources/static/index.html deleted file mode 100644 index ed84ecd1b..000000000 --- a/backend/src/main/resources/static/index.html +++ /dev/null @@ -1,4923 +0,0 @@ - - - - - - - - Prolog API Document - - - - - - -
-
-

로그인

-
-
-

깃허브 로그인

-
-

Request

-
-
-
POST /login/token HTTP/1.1
-Content-Type: application/json; charset=UTF-8
-Host: localhost:4000
-Content-Length: 18
-
-{
-  "code" : "1"
-}
-
-
-
-
-

Response

-
-
-
HTTP/1.1 200 OK
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-Content-Type: application/json
-Transfer-Encoding: chunked
-Date: Tue, 11 Oct 2022 12:23:40 GMT
-Keep-Alive: timeout=60
-Connection: keep-alive
-Content-Length: 168
-
-{
-  "accessToken" : "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjY1NDkxMDIwLCJleHAiOjE2NjU0OTQ2MjAsInJvbGUiOiJDUkVXIn0.L-zEa2fDafcY6zGjIJNxv0hUeR0UpUkApKTUb9LtANk"
-}
-
-
-
-
-
-

본인 정보 요청

-
-

Request

-
-
-
GET /members/me HTTP/1.1
-Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjY1NDkxMDE5LCJleHAiOjE2NjU0OTQ2MTksInJvbGUiOiJDUkVXIn0.i4FXAEj0UsmDgt-EUcz_rL06gjk-iFpBwawZr-p5ktk
-Host: localhost:4000
-
-
-
-
-

Response

-
-
-
HTTP/1.1 200 OK
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-Content-Type: application/json
-Transfer-Encoding: chunked
-Date: Tue, 11 Oct 2022 12:23:39 GMT
-Keep-Alive: timeout=60
-Connection: keep-alive
-Content-Length: 153
-
-{
-  "id" : 1,
-  "username" : "soulG",
-  "nickname" : "소롱",
-  "role" : "CREW",
-  "imageUrl" : "https://avatars.githubusercontent.com/u/52682603?v=4"
-}
-
-
-
-
-
-

멤버 정보 요청

-
-

Request

-
-
-
GET /members/soulG HTTP/1.1
-Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjY1NDkxMDE5LCJleHAiOjE2NjU0OTQ2MTksInJvbGUiOiJDUkVXIn0.i4FXAEj0UsmDgt-EUcz_rL06gjk-iFpBwawZr-p5ktk
-Host: localhost:4000
-
-
-
-
-

Response

-
-
-
HTTP/1.1 200 OK
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-Content-Type: application/json
-Transfer-Encoding: chunked
-Date: Tue, 11 Oct 2022 12:23:39 GMT
-Keep-Alive: timeout=60
-Connection: keep-alive
-Content-Length: 153
-
-{
-  "id" : 1,
-  "username" : "soulG",
-  "nickname" : "소롱",
-  "role" : "CREW",
-  "imageUrl" : "https://avatars.githubusercontent.com/u/52682603?v=4"
-}
-
-
-
-
-
-

멤버 정보 수정

-
-

Request

-
-
-
PUT /members/soulG HTTP/1.1
-Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjY1NDkxMDE5LCJleHAiOjE2NjU0OTQ2MTksInJvbGUiOiJDUkVXIn0.i4FXAEj0UsmDgt-EUcz_rL06gjk-iFpBwawZr-p5ktk
-Content-Type: application/json; charset=UTF-8
-Host: localhost:4000
-Content-Length: 104
-
-{
-  "nickname" : "다른이름",
-  "imageUrl" : "https://avatars.githubusercontent.com/u/51393021?v=4"
-}
-
-
-
-
-

Response

-
-
-
HTTP/1.1 200 OK
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-Date: Tue, 11 Oct 2022 12:23:39 GMT
-Keep-Alive: timeout=60
-Connection: keep-alive
-
-
-
-
-
-
-
-

프로필

-
-
-

프로필 조회

-
-

Request

-
-
-
GET /members/soulG/profile HTTP/1.1
-Host: localhost:4000
-
-
-
-
-

Response

-
-
-
HTTP/1.1 200 OK
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-Content-Type: application/json
-Transfer-Encoding: chunked
-Date: Tue, 11 Oct 2022 12:23:35 GMT
-Keep-Alive: timeout=60
-Connection: keep-alive
-Content-Length: 153
-
-{
-  "id" : 1,
-  "username" : "soulG",
-  "nickname" : "소롱",
-  "role" : "CREW",
-  "imageUrl" : "https://avatars.githubusercontent.com/u/52682603?v=4"
-}
-
-
-
-
-
-

프로필 소개 조회

-
-

Request

-
-
-
GET /members/soulG/profile-intro HTTP/1.1
-Host: localhost:4000
-
-
-
-
-

Response

-
-
-
HTTP/1.1 200 OK
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-Content-Type: application/json
-Transfer-Encoding: chunked
-Date: Tue, 11 Oct 2022 12:23:35 GMT
-Keep-Alive: timeout=60
-Connection: keep-alive
-Content-Length: 19
-
-{
-  "text" : null
-}
-
-
-
-
-
-

프로필 소개 수정

-
-

Request

-
-
-
PUT /members/soulG/profile-intro HTTP/1.1
-Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjY1NDkxMDE2LCJleHAiOjE2NjU0OTQ2MTYsInJvbGUiOiJDUkVXIn0.gf1V2VmUM1Fi7mVx1-1ODbDayP1h3yi60It57i6ULC0
-Content-Type: application/json; charset=UTF-8
-Host: localhost:4000
-Content-Length: 47
-
-{
-  "text" : "수정된 소개글 입니다."
-}
-
-
-
-
-

Response

-
-
-
HTTP/1.1 200 OK
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-Date: Tue, 11 Oct 2022 12:23:35 GMT
-Keep-Alive: timeout=60
-Connection: keep-alive
-
-
-
-
-
-

프로필 스터디로그 조회

-
-

Request

-
-
-
GET /members/soulG/studylogs HTTP/1.1
-Accept: application/json
-Host: localhost:4000
-
-
-
-
-

Response

-
-
-
HTTP/1.1 200 OK
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-Content-Type: application/json
-Transfer-Encoding: chunked
-Date: Tue, 11 Oct 2022 12:23:35 GMT
-Keep-Alive: timeout=60
-Connection: keep-alive
-Content-Length: 1776
-
-{
-  "data" : [ {
-    "id" : 2,
-    "author" : {
-      "id" : 1,
-      "username" : "soulG",
-      "nickname" : "소롱",
-      "role" : "CREW",
-      "imageUrl" : "https://avatars.githubusercontent.com/u/52682603?v=4"
-    },
-    "createdAt" : "2022-10-11T21:23:36.101553",
-    "updatedAt" : "2022-10-11T21:23:36.101553",
-    "session" : null,
-    "mission" : {
-      "id" : 2,
-      "name" : "세션3 - 프로젝트",
-      "session" : {
-        "id" : 2,
-        "name" : "세션3"
-      }
-    },
-    "title" : "JAVA",
-    "content" : "Spring Data JPA를 학습함.",
-    "tags" : [ {
-      "id" : 3,
-      "name" : "java"
-    }, {
-      "id" : 4,
-      "name" : "jpa"
-    } ],
-    "abilities" : [ ],
-    "scrap" : false,
-    "read" : false,
-    "viewCount" : 0,
-    "liked" : false,
-    "likesCount" : 0,
-    "commentCount" : 0
-  }, {
-    "id" : 1,
-    "author" : {
-      "id" : 1,
-      "username" : "soulG",
-      "nickname" : "소롱",
-      "role" : "CREW",
-      "imageUrl" : "https://avatars.githubusercontent.com/u/52682603?v=4"
-    },
-    "createdAt" : "2022-10-11T21:23:36.03265",
-    "updatedAt" : "2022-10-11T21:23:36.03265",
-    "session" : null,
-    "mission" : {
-      "id" : 1,
-      "name" : "세션1 - 지하철 노선도 미션",
-      "session" : {
-        "id" : 1,
-        "name" : "세션1"
-      }
-    },
-    "title" : "SPA",
-    "content" : "SPA 방식으로 앱을 구현하였음.\nrouter 를 구현 하여 이용함.\n",
-    "tags" : [ {
-      "id" : 1,
-      "name" : "spa"
-    }, {
-      "id" : 2,
-      "name" : "router"
-    } ],
-    "abilities" : [ ],
-    "scrap" : false,
-    "read" : false,
-    "viewCount" : 0,
-    "liked" : false,
-    "likesCount" : 0,
-    "commentCount" : 0
-  } ],
-  "totalSize" : 2,
-  "totalPage" : 1,
-  "currPage" : 1
-}
-
-
-
-
-
-
-
-

세션

-
-
-

세션 등록

-
-

HTTP - request

-
-
-
POST /sessions HTTP/1.1
-Content-Type: application/json;charset=UTF-8
-Content-Type: application/json;charset=UTF-8
-Authorization: Bearer accessToken
-Content-Length: 33
-Host: localhost:8080
-
-{
-  "name" : "새로운 세션"
-}
-
-
-
-
-

HTTP - response

-
-
-
HTTP/1.1 201 Created
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-Location: /sessions/1
-Content-Type: application/json
-Content-Length: 46
-
-{
-  "id" : 1,
-  "name" : "새로운 세션1"
-}
-
-
-
-
-
-

세션 목록 조회

-
-

HTTP - request

-
-
-
GET /sessions HTTP/1.1
-Host: localhost:8080
-
-
-
-
-

HTTP - response

-
-
-
HTTP/1.1 200 OK
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-Access-Control-Expose-Headers: X-Total-Count
-X-Total-Count: 3
-Content-Type: application/json
-Content-Length: 146
-
-[ {
-  "id" : 1,
-  "name" : "새로운 세션1"
-}, {
-  "id" : 2,
-  "name" : "새로운 세션2"
-}, {
-  "id" : 3,
-  "name" : "새로운 세션3"
-} ]
-
-
-
-
-
-
-
-

스터디로그

-
-
-

스터디로그 작성

-
-

Request

-
-
-
POST /studylogs HTTP/1.1
-Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjY1NDkxMDEyLCJleHAiOjE2NjU0OTQ2MTIsInJvbGUiOiJDUkVXIn0.f4plGdouPTNGTg-1je8w1f92rqzARFYIjFcs_vI7_L4
-Content-Type: application/json; charset=UTF-8
-Host: localhost:4000
-Content-Length: 262
-
-{
-  "title" : "나는야 Joanne",
-  "content" : "SPA 방식으로 앱을 구현하였음.\nrouter 를 구현 하여 이용함.\n",
-  "sessionId" : 1,
-  "missionId" : 1,
-  "tags" : [ {
-    "name" : "spa"
-  }, {
-    "name" : "router"
-  } ],
-  "abilities" : [ 2 ]
-}
-
-
-
-
-

Response

-
-
-
HTTP/1.1 201 Created
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-Location: /studylogs/1
-Content-Type: application/json
-Transfer-Encoding: chunked
-Date: Tue, 11 Oct 2022 12:23:32 GMT
-Keep-Alive: timeout=60
-Connection: keep-alive
-Content-Length: 1058
-
-{
-  "id" : 1,
-  "author" : {
-    "id" : 1,
-    "username" : "soulG",
-    "nickname" : "소롱",
-    "role" : "CREW",
-    "imageUrl" : "https://avatars.githubusercontent.com/u/52682603?v=4"
-  },
-  "createdAt" : "2022-10-11T21:23:32.516821",
-  "updatedAt" : "2022-10-11T21:23:32.516821",
-  "session" : {
-    "id" : 1,
-    "name" : "프론트엔드JS 레벨1 - 2021"
-  },
-  "mission" : {
-    "id" : 1,
-    "name" : "세션1 - 지하철 노선도 미션",
-    "session" : {
-      "id" : 1,
-      "name" : "프론트엔드JS 레벨1 - 2021"
-    }
-  },
-  "title" : "나는야 Joanne",
-  "content" : "SPA 방식으로 앱을 구현하였음.\nrouter 를 구현 하여 이용함.\n",
-  "tags" : [ {
-    "id" : 1,
-    "name" : "spa"
-  }, {
-    "id" : 2,
-    "name" : "router"
-  } ],
-  "abilities" : [ {
-    "id" : 2,
-    "name" : "자식 역량1",
-    "description" : "자식 역량1입니다",
-    "color" : "#ffffff",
-    "isParent" : false
-  } ],
-  "scrap" : false,
-  "read" : false,
-  "viewCount" : 0,
-  "liked" : false,
-  "likesCount" : 0,
-  "commentCount" : 0
-}
-
-
-
-
-
-

스터디로그 목록 조회

-
-

Request

-
-
-
GET /studylogs HTTP/1.1
-Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjY1NDkxMDExLCJleHAiOjE2NjU0OTQ2MTEsInJvbGUiOiJDUkVXIn0.PNOKXpiyVTeHnp5741TL0o5E9ybxQ6oMNqToi78u3ds
-Accept: application/json
-Host: localhost:4000
-
-
-
-
-

Response

-
-
-
HTTP/1.1 200 OK
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-Content-Type: application/json
-Transfer-Encoding: chunked
-Date: Tue, 11 Oct 2022 12:23:31 GMT
-Keep-Alive: timeout=60
-Connection: keep-alive
-Content-Length: 1971
-
-{
-  "data" : [ {
-    "id" : 2,
-    "author" : {
-      "id" : 1,
-      "username" : "soulG",
-      "nickname" : "소롱",
-      "role" : "CREW",
-      "imageUrl" : "https://avatars.githubusercontent.com/u/52682603?v=4"
-    },
-    "createdAt" : "2022-10-11T21:23:31.958877",
-    "updatedAt" : "2022-10-11T21:23:31.958877",
-    "session" : {
-      "id" : 2,
-      "name" : "백엔드Java 레벨1 - 2021"
-    },
-    "mission" : {
-      "id" : 2,
-      "name" : "세션3 - 프로젝트",
-      "session" : {
-        "id" : 2,
-        "name" : "백엔드Java 레벨1 - 2021"
-      }
-    },
-    "title" : "JAVA",
-    "content" : "Spring Data JPA를 학습함.",
-    "tags" : [ {
-      "id" : 3,
-      "name" : "java"
-    }, {
-      "id" : 4,
-      "name" : "jpa"
-    } ],
-    "abilities" : [ ],
-    "scrap" : false,
-    "read" : false,
-    "viewCount" : 0,
-    "liked" : false,
-    "likesCount" : 0,
-    "commentCount" : 0
-  }, {
-    "id" : 1,
-    "author" : {
-      "id" : 1,
-      "username" : "soulG",
-      "nickname" : "소롱",
-      "role" : "CREW",
-      "imageUrl" : "https://avatars.githubusercontent.com/u/52682603?v=4"
-    },
-    "createdAt" : "2022-10-11T21:23:31.733331",
-    "updatedAt" : "2022-10-11T21:23:31.733331",
-    "session" : {
-      "id" : 1,
-      "name" : "프론트엔드JS 레벨1 - 2021"
-    },
-    "mission" : {
-      "id" : 1,
-      "name" : "세션1 - 지하철 노선도 미션",
-      "session" : {
-        "id" : 1,
-        "name" : "프론트엔드JS 레벨1 - 2021"
-      }
-    },
-    "title" : "나는야 Joanne",
-    "content" : "SPA 방식으로 앱을 구현하였음.\nrouter 를 구현 하여 이용함.\n",
-    "tags" : [ {
-      "id" : 1,
-      "name" : "spa"
-    }, {
-      "id" : 2,
-      "name" : "router"
-    } ],
-    "abilities" : [ ],
-    "scrap" : false,
-    "read" : false,
-    "viewCount" : 0,
-    "liked" : false,
-    "likesCount" : 0,
-    "commentCount" : 0
-  } ],
-  "totalSize" : 2,
-  "totalPage" : 1,
-  "currPage" : 1
-}
-
-
-
-
-
-

스터디로그 단건 조회

-
-

Request

-
-
-
GET /studylogs/1 HTTP/1.1
-Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjY1NDkxMDEwLCJleHAiOjE2NjU0OTQ2MTAsInJvbGUiOiJDUkVXIn0.vYpoiz13ldlt31FPpJLWaxYjd9Gbuje-Oz2AUE2WHPs
-Host: localhost:4000
-
-
-
-
-

Response

-
-
-
HTTP/1.1 200 OK
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-Set-Cookie: viewed=/1/; Max-Age=9388; Expires=Tue, 11 Oct 2022 14:59:59 GMT; Secure; HttpOnly; SameSite=None
-Content-Type: application/json
-Transfer-Encoding: chunked
-Date: Tue, 11 Oct 2022 12:23:31 GMT
-Keep-Alive: timeout=60
-Connection: keep-alive
-Content-Length: 1057
-
-{
-  "id" : 1,
-  "author" : {
-    "id" : 1,
-    "username" : "soulG",
-    "nickname" : "소롱",
-    "role" : "CREW",
-    "imageUrl" : "https://avatars.githubusercontent.com/u/52682603?v=4"
-  },
-  "createdAt" : "2022-10-11T21:23:31.055589",
-  "updatedAt" : "2022-10-11T21:23:31.055589",
-  "session" : {
-    "id" : 1,
-    "name" : "프론트엔드JS 레벨1 - 2021"
-  },
-  "mission" : {
-    "id" : 1,
-    "name" : "세션1 - 지하철 노선도 미션",
-    "session" : {
-      "id" : 1,
-      "name" : "프론트엔드JS 레벨1 - 2021"
-    }
-  },
-  "title" : "나는야 Joanne",
-  "content" : "SPA 방식으로 앱을 구현하였음.\nrouter 를 구현 하여 이용함.\n",
-  "tags" : [ {
-    "id" : 1,
-    "name" : "spa"
-  }, {
-    "id" : 2,
-    "name" : "router"
-  } ],
-  "abilities" : [ {
-    "id" : 2,
-    "name" : "자식 역량1",
-    "description" : "자식 역량1입니다",
-    "color" : "#ffffff",
-    "isParent" : false
-  } ],
-  "scrap" : false,
-  "read" : true,
-  "viewCount" : 0,
-  "liked" : false,
-  "likesCount" : 0,
-  "commentCount" : 0
-}
-
-
-
-
-
-

스터디로그 수정

-
-

Request

-
-
-
PUT /studylogs/1 HTTP/1.1
-Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjY1NDkxMDEzLCJleHAiOjE2NjU0OTQ2MTMsInJvbGUiOiJDUkVXIn0.UDBq0utQ79rotc10U442u76Z6q7Tv-g6GdE0PhjiAB4
-Content-Type: application/json; charset=UTF-8
-Host: localhost:4000
-Content-Length: 198
-
-{
-  "title" : "수정된 제목",
-  "content" : "수정된 내용",
-  "sessionId" : null,
-  "missionId" : 2,
-  "tags" : [ {
-    "name" : "spa"
-  }, {
-    "name" : "edit"
-  } ],
-  "abilities" : [ ]
-}
-
-
-
-
-

Response

-
-
-
HTTP/1.1 200 OK
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-Date: Tue, 11 Oct 2022 12:23:32 GMT
-Keep-Alive: timeout=60
-Connection: keep-alive
-
-
-
-
-
-

스터디로그 삭제

-
-

Request

-
-
-
DELETE /studylogs/1 HTTP/1.1
-Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjY1NDkxMDEyLCJleHAiOjE2NjU0OTQ2MTIsInJvbGUiOiJDUkVXIn0.f4plGdouPTNGTg-1je8w1f92rqzARFYIjFcs_vI7_L4
-Accept: application/json
-Host: localhost:4000
-
-
-
-
-

Response

-
-
-
HTTP/1.1 204 No Content
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-Date: Tue, 11 Oct 2022 12:23:32 GMT
-Keep-Alive: timeout=60
-Connection: keep-alive
-
-
-
-
-
-
-
-

댓글

-
-
-

댓글 등록

-
-

Request

-
-
-
POST /studylogs/1/comments HTTP/1.1
-Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjY1NDkxMDIxLCJleHAiOjE2NjU0OTQ2MjEsInJvbGUiOiJDUkVXIn0.vG-9qhbnQHGUPH1F0tL_HJXUJ4WQ-dq8AxwAyDy3vWw
-Content-Type: application/json; charset=UTF-8
-Host: localhost:4000
-Content-Length: 46
-
-{
-  "content" : "댓글의 내용입니다."
-}
-
-
-
-
-

Response

-
-
-
HTTP/1.1 201 Created
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-Location: /studylogs/1/comments/1
-Date: Tue, 11 Oct 2022 12:23:41 GMT
-Keep-Alive: timeout=60
-Connection: keep-alive
-
-
-
-
-
-

댓글 전체 조회

-
-

Request

-
-
-
GET /studylogs/1/comments HTTP/1.1
-Host: localhost:4000
-
-
-
-
-

Response

-
-
-
HTTP/1.1 200 OK
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-Content-Type: application/json
-Transfer-Encoding: chunked
-Date: Tue, 11 Oct 2022 12:23:41 GMT
-Keep-Alive: timeout=60
-Connection: keep-alive
-Content-Length: 317
-
-{
-  "data" : [ {
-    "id" : 1,
-    "author" : {
-      "id" : 1,
-      "username" : "soulG",
-      "nickname" : "소롱",
-      "imageUrl" : "https://avatars.githubusercontent.com/u/52682603?v=4",
-      "role" : "CREW"
-    },
-    "content" : "댓글의 내용입니다.",
-    "createAt" : "2022-10-11 21:23:42"
-  } ]
-}
-
-
-
-
-
-

댓글 수정

-
-

Request

-
-
-
PUT /studylogs/1/comments/1 HTTP/1.1
-Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjY1NDkxMDIxLCJleHAiOjE2NjU0OTQ2MjEsInJvbGUiOiJDUkVXIn0.vG-9qhbnQHGUPH1F0tL_HJXUJ4WQ-dq8AxwAyDy3vWw
-Content-Type: application/json; charset=UTF-8
-Host: localhost:4000
-Content-Length: 56
-
-{
-  "content" : "수정된 댓글의 내용입니다."
-}
-
-
-
-
-

Response

-
-
-
HTTP/1.1 204 No Content
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-Date: Tue, 11 Oct 2022 12:23:41 GMT
-Keep-Alive: timeout=60
-Connection: keep-alive
-
-
-
-
-
-

댓글 삭제

-
-

Request

-
-
-
DELETE /studylogs/1/comments/1 HTTP/1.1
-Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjY1NDkxMDIxLCJleHAiOjE2NjU0OTQ2MjEsInJvbGUiOiJDUkVXIn0.vG-9qhbnQHGUPH1F0tL_HJXUJ4WQ-dq8AxwAyDy3vWw
-Host: localhost:4000
-
-
-
-
-

Response

-
-
-
HTTP/1.1 204 No Content
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-Date: Tue, 11 Oct 2022 12:23:41 GMT
-Keep-Alive: timeout=60
-Connection: keep-alive
-
-
-
-
-
-
-
-

미션

-
-
-

미션 생성 성공

-
-

Request

-
-
-
POST /missions HTTP/1.1
-Content-Type: application/json; charset=UTF-8
-Host: localhost:4000
-Content-Length: 62
-
-{
-  "name" : "지하철 노선도 미션",
-  "sessionId" : 1
-}
-
-
-
-
-

Response

-
-
-
HTTP/1.1 200 OK
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-Content-Type: application/json
-Transfer-Encoding: chunked
-Date: Tue, 11 Oct 2022 12:23:35 GMT
-Keep-Alive: timeout=60
-Connection: keep-alive
-Content-Length: 113
-
-{
-  "id" : 1,
-  "name" : "지하철 노선도 미션",
-  "session" : {
-    "id" : 1,
-    "name" : "세션1"
-  }
-}
-
-
-
-
-
-

미션 중복 생성 시 실패 -

-
-

Request

-
-
-
POST /missions HTTP/1.1
-Content-Type: application/json; charset=UTF-8
-Host: localhost:4000
-Content-Length: 62
-
-{
-  "name" : "지하철 노선도 미션",
-  "sessionId" : 1
-}
-
-
-
-
-

Response

-
-
-
HTTP/1.1 400 Bad Request
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-Content-Type: application/json
-Transfer-Encoding: chunked
-Date: Tue, 11 Oct 2022 12:23:34 GMT
-Connection: close
-Content-Length: 63
-
-{
-  "code" : 3001,
-  "message" : "미션이 중복됩니다."
-}
-
-
-
-
-
-

미션 목록 조회

-
-

Request

-
-
-
GET /missions HTTP/1.1
-Host: localhost:4000
-
-
-
-
-

Response

-
-
-
HTTP/1.1 200 OK
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-Access-Control-Expose-Headers: X-Total-Count
-X-Total-Count: 2
-Content-Type: application/json
-Transfer-Encoding: chunked
-Date: Tue, 11 Oct 2022 12:23:34 GMT
-Keep-Alive: timeout=60
-Connection: keep-alive
-Content-Length: 209
-
-[ {
-  "id" : 1,
-  "name" : "로또 미션",
-  "session" : {
-    "id" : 1,
-    "name" : "세션1"
-  }
-}, {
-  "id" : 2,
-  "name" : "블랙잭 미션",
-  "session" : {
-    "id" : 1,
-    "name" : "세션1"
-  }
-} ]
-
-
-
-
-
-
-
-

태그

-
-
-

태그 목록 조회

-
-

Request

-
-
-
GET /tags HTTP/1.1
-Host: localhost:4000
-
-
-
-
-

Response

-
-
-
HTTP/1.1 200 OK
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-Access-Control-Expose-Headers: X-Total-Count
-X-Total-Count: 2
-Content-Type: application/json
-Transfer-Encoding: chunked
-Date: Tue, 11 Oct 2022 12:23:36 GMT
-Keep-Alive: timeout=60
-Connection: keep-alive
-Content-Length: 79
-
-[ {
-  "id" : 1,
-  "name" : "자바"
-}, {
-  "id" : 2,
-  "name" : "파이썬"
-} ]
-
-
-
-
-
-
-
-

필터

-
-
-

필터 목록 조회

-
-

HTTP - request

-
-
-
GET /filters HTTP/1.1
-Host: localhost:8080
-
-
-
-
-

HTTP - response

-
-
-
HTTP/1.1 200 OK
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-Content-Type: application/json
-Content-Length: 951
-
-{
-  "sessions" : [ {
-    "id" : 1,
-    "name" : "세션1"
-  }, {
-    "id" : 2,
-    "name" : "세션2"
-  } ],
-  "missions" : [ {
-    "id" : 1,
-    "name" : "지하철 노선도 미션 1",
-    "session" : {
-      "id" : 1,
-      "name" : "세션1"
-    }
-  }, {
-    "id" : 2,
-    "name" : "지하철 노선도 미션 2",
-    "session" : {
-      "id" : 2,
-      "name" : "세션2"
-    }
-  } ],
-  "tags" : [ {
-    "id" : 1,
-    "name" : "자바"
-  }, {
-    "id" : 2,
-    "name" : "파이썬"
-  }, {
-    "id" : 3,
-    "name" : "자바스크립트"
-  } ],
-  "members" : [ {
-    "id" : 1,
-    "username" : "username",
-    "nickname" : "브라운",
-    "role" : "CREW",
-    "imageUrl" : "imageUrl"
-  }, {
-    "id" : 2,
-    "username" : "username",
-    "nickname" : "서니",
-    "role" : "CREW",
-    "imageUrl" : "imageUrl"
-  }, {
-    "id" : 3,
-    "username" : "username",
-    "nickname" : "현구막",
-    "role" : "CREW",
-    "imageUrl" : "imageUrl"
-  } ]
-}
-
-
-
-
-
-
-
-

스터디로그 오버뷰

-
-
-

멤버 태그 조회

-
-

Request

-
-
-
GET /members/gracefulBrown/tags HTTP/1.1
-Content-Type: application/json; charset=UTF-8
-Host: localhost:4000
-
-
-
-
-

Response

-
-
-
HTTP/1.1 400 Bad Request
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-Content-Type: application/json
-Transfer-Encoding: chunked
-Date: Tue, 11 Oct 2022 12:23:35 GMT
-Connection: close
-Content-Length: 80
-
-{
-  "code" : 1004,
-  "message" : "해당 ID를 가진 멤버가 없습니다."
-}
-
-
-
-
-
-

멤버 달력 스터디로그 조회 -

-
-

Request

-
-
-
GET /members/gracefulBrown/calendar-studylogs?year=2021&month=8 HTTP/1.1
-Content-Type: application/json; charset=UTF-8
-Host: localhost:4000
-
-
-
-
-

Response

-
-
-
HTTP/1.1 400 Bad Request
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-Content-Type: application/json
-Transfer-Encoding: chunked
-Date: Tue, 11 Oct 2022 12:23:35 GMT
-Connection: close
-Content-Length: 80
-
-{
-  "code" : 1004,
-  "message" : "해당 ID를 가진 멤버가 없습니다."
-}
-
-
-
-
-
-

인기있는 스터디로그 조회 -

-
-

Request

-
-
-
GET /studylogs/popular HTTP/1.1
-Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjY1NDkxMDEzLCJleHAiOjE2NjU0OTQ2MTMsInJvbGUiOiJDUkVXIn0.UDBq0utQ79rotc10U442u76Z6q7Tv-g6GdE0PhjiAB4
-Host: localhost:4000
-
-
-
-
-

Response

-
-
-
HTTP/1.1 200 OK
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-Content-Type: application/json
-Transfer-Encoding: chunked
-Date: Tue, 11 Oct 2022 12:23:33 GMT
-Keep-Alive: timeout=60
-Connection: keep-alive
-Content-Length: 6455
-
-{
-  "allResponse" : {
-    "data" : [ {
-      "id" : 2,
-      "author" : {
-        "id" : 1,
-        "username" : "soulG",
-        "nickname" : "소롱",
-        "role" : "CREW",
-        "imageUrl" : "https://avatars.githubusercontent.com/u/52682603?v=4"
-      },
-      "createdAt" : "2022-10-11T21:23:34.0366",
-      "updatedAt" : "2022-10-11T21:23:34.0366",
-      "session" : {
-        "id" : 2,
-        "name" : "백엔드Java 레벨1 - 2021"
-      },
-      "mission" : {
-        "id" : 2,
-        "name" : "세션3 - 프로젝트",
-        "session" : {
-          "id" : 2,
-          "name" : "백엔드Java 레벨1 - 2021"
-        }
-      },
-      "title" : "JAVA",
-      "content" : "Spring Data JPA를 학습함.",
-      "tags" : [ {
-        "id" : 3,
-        "name" : "java"
-      }, {
-        "id" : 4,
-        "name" : "jpa"
-      } ],
-      "abilities" : [ ],
-      "scrap" : false,
-      "read" : true,
-      "viewCount" : 0,
-      "liked" : true,
-      "likesCount" : 1,
-      "commentCount" : 0
-    }, {
-      "id" : 1,
-      "author" : {
-        "id" : 1,
-        "username" : "soulG",
-        "nickname" : "소롱",
-        "role" : "CREW",
-        "imageUrl" : "https://avatars.githubusercontent.com/u/52682603?v=4"
-      },
-      "createdAt" : "2022-10-11T21:23:33.841358",
-      "updatedAt" : "2022-10-11T21:23:33.841358",
-      "session" : {
-        "id" : 1,
-        "name" : "프론트엔드JS 레벨1 - 2021"
-      },
-      "mission" : {
-        "id" : 1,
-        "name" : "세션1 - 지하철 노선도 미션",
-        "session" : {
-          "id" : 1,
-          "name" : "프론트엔드JS 레벨1 - 2021"
-        }
-      },
-      "title" : "나는야 Joanne",
-      "content" : "SPA 방식으로 앱을 구현하였음.\nrouter 를 구현 하여 이용함.\n",
-      "tags" : [ {
-        "id" : 1,
-        "name" : "spa"
-      }, {
-        "id" : 2,
-        "name" : "router"
-      } ],
-      "abilities" : [ ],
-      "scrap" : false,
-      "read" : true,
-      "viewCount" : 0,
-      "liked" : false,
-      "likesCount" : 0,
-      "commentCount" : 0
-    } ],
-    "totalSize" : 2,
-    "totalPage" : 1,
-    "currPage" : 1
-  },
-  "frontResponse" : {
-    "data" : [ {
-      "id" : 2,
-      "author" : {
-        "id" : 1,
-        "username" : "soulG",
-        "nickname" : "소롱",
-        "role" : "CREW",
-        "imageUrl" : "https://avatars.githubusercontent.com/u/52682603?v=4"
-      },
-      "createdAt" : "2022-10-11T21:23:34.0366",
-      "updatedAt" : "2022-10-11T21:23:34.0366",
-      "session" : {
-        "id" : 2,
-        "name" : "백엔드Java 레벨1 - 2021"
-      },
-      "mission" : {
-        "id" : 2,
-        "name" : "세션3 - 프로젝트",
-        "session" : {
-          "id" : 2,
-          "name" : "백엔드Java 레벨1 - 2021"
-        }
-      },
-      "title" : "JAVA",
-      "content" : "Spring Data JPA를 학습함.",
-      "tags" : [ {
-        "id" : 3,
-        "name" : "java"
-      }, {
-        "id" : 4,
-        "name" : "jpa"
-      } ],
-      "abilities" : [ ],
-      "scrap" : false,
-      "read" : true,
-      "viewCount" : 0,
-      "liked" : true,
-      "likesCount" : 1,
-      "commentCount" : 0
-    }, {
-      "id" : 1,
-      "author" : {
-        "id" : 1,
-        "username" : "soulG",
-        "nickname" : "소롱",
-        "role" : "CREW",
-        "imageUrl" : "https://avatars.githubusercontent.com/u/52682603?v=4"
-      },
-      "createdAt" : "2022-10-11T21:23:33.841358",
-      "updatedAt" : "2022-10-11T21:23:33.841358",
-      "session" : {
-        "id" : 1,
-        "name" : "프론트엔드JS 레벨1 - 2021"
-      },
-      "mission" : {
-        "id" : 1,
-        "name" : "세션1 - 지하철 노선도 미션",
-        "session" : {
-          "id" : 1,
-          "name" : "프론트엔드JS 레벨1 - 2021"
-        }
-      },
-      "title" : "나는야 Joanne",
-      "content" : "SPA 방식으로 앱을 구현하였음.\nrouter 를 구현 하여 이용함.\n",
-      "tags" : [ {
-        "id" : 1,
-        "name" : "spa"
-      }, {
-        "id" : 2,
-        "name" : "router"
-      } ],
-      "abilities" : [ ],
-      "scrap" : false,
-      "read" : true,
-      "viewCount" : 0,
-      "liked" : false,
-      "likesCount" : 0,
-      "commentCount" : 0
-    } ],
-    "totalSize" : 2,
-    "totalPage" : 1,
-    "currPage" : 1
-  },
-  "backResponse" : {
-    "data" : [ {
-      "id" : 2,
-      "author" : {
-        "id" : 1,
-        "username" : "soulG",
-        "nickname" : "소롱",
-        "role" : "CREW",
-        "imageUrl" : "https://avatars.githubusercontent.com/u/52682603?v=4"
-      },
-      "createdAt" : "2022-10-11T21:23:34.0366",
-      "updatedAt" : "2022-10-11T21:23:34.0366",
-      "session" : {
-        "id" : 2,
-        "name" : "백엔드Java 레벨1 - 2021"
-      },
-      "mission" : {
-        "id" : 2,
-        "name" : "세션3 - 프로젝트",
-        "session" : {
-          "id" : 2,
-          "name" : "백엔드Java 레벨1 - 2021"
-        }
-      },
-      "title" : "JAVA",
-      "content" : "Spring Data JPA를 학습함.",
-      "tags" : [ {
-        "id" : 3,
-        "name" : "java"
-      }, {
-        "id" : 4,
-        "name" : "jpa"
-      } ],
-      "abilities" : [ ],
-      "scrap" : false,
-      "read" : true,
-      "viewCount" : 0,
-      "liked" : true,
-      "likesCount" : 1,
-      "commentCount" : 0
-    }, {
-      "id" : 1,
-      "author" : {
-        "id" : 1,
-        "username" : "soulG",
-        "nickname" : "소롱",
-        "role" : "CREW",
-        "imageUrl" : "https://avatars.githubusercontent.com/u/52682603?v=4"
-      },
-      "createdAt" : "2022-10-11T21:23:33.841358",
-      "updatedAt" : "2022-10-11T21:23:33.841358",
-      "session" : {
-        "id" : 1,
-        "name" : "프론트엔드JS 레벨1 - 2021"
-      },
-      "mission" : {
-        "id" : 1,
-        "name" : "세션1 - 지하철 노선도 미션",
-        "session" : {
-          "id" : 1,
-          "name" : "프론트엔드JS 레벨1 - 2021"
-        }
-      },
-      "title" : "나는야 Joanne",
-      "content" : "SPA 방식으로 앱을 구현하였음.\nrouter 를 구현 하여 이용함.\n",
-      "tags" : [ {
-        "id" : 1,
-        "name" : "spa"
-      }, {
-        "id" : 2,
-        "name" : "router"
-      } ],
-      "abilities" : [ ],
-      "scrap" : false,
-      "read" : true,
-      "viewCount" : 0,
-      "liked" : false,
-      "likesCount" : 0,
-      "commentCount" : 0
-    } ],
-    "totalSize" : 2,
-    "totalPage" : 1,
-    "currPage" : 1
-  }
-}
-
-
-
-
-
-
-
-

리포트

-
-
-

리포트 생성

-
-

HTTP - request

-
-
-
POST /reports HTTP/1.1
-Content-Type: application/json;charset=UTF-8
-Content-Type: application/json;charset=UTF-8
-Authorization: Bearer accessToken
-Content-Length: 392
-Host: localhost:8080
-
-{
-  "title" : "새로운 리포트",
-  "description" : "새로운 리포트 설명",
-  "startDate" : "2022-09-27",
-  "endDate" : "2022-10-11",
-  "reportAbility" : [ {
-    "abilityId" : 1,
-    "weight" : 5
-  }, {
-    "abilityId" : 2,
-    "weight" : 8
-  }, {
-    "abilityId" : 3,
-    "weight" : 2
-  }, {
-    "abilityId" : 4,
-    "weight" : 3
-  }, {
-    "abilityId" : 5,
-    "weight" : 2
-  } ]
-}
-
-
-
-
-

HTTP - response

-
-
-
HTTP/1.1 201 Created
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-Location: /reports/1
-Content-Type: application/json
-Content-Length: 2084
-
-{
-  "id" : 1,
-  "title" : "새로운 리포트",
-  "description" : "새로운 리포트 설명",
-  "startDate" : "2022-09-27",
-  "endDate" : "2022-10-11",
-  "abilities" : [ {
-    "id" : 1,
-    "name" : "역량A",
-    "description" : "역량A 설명",
-    "color" : "#001122",
-    "weight" : 5,
-    "originAbilityId" : 54
-  }, {
-    "id" : 2,
-    "name" : "역량B",
-    "description" : "역량B 설명",
-    "color" : "#002122",
-    "weight" : 8,
-    "originAbilityId" : 57
-  }, {
-    "id" : 3,
-    "name" : "역량C",
-    "description" : "역량C 설명",
-    "color" : "#301172",
-    "weight" : 2,
-    "originAbilityId" : 52
-  }, {
-    "id" : 4,
-    "name" : "역량D",
-    "description" : "역량D 설명",
-    "color" : "#005122",
-    "weight" : 3,
-    "originAbilityId" : 32
-  }, {
-    "id" : 5,
-    "name" : "역량E",
-    "description" : "역량E 설명",
-    "color" : "#081142",
-    "weight" : 2,
-    "originAbilityId" : 24
-  } ],
-  "studylogs" : [ {
-    "studylog" : {
-      "id" : 1,
-      "author" : {
-        "id" : null,
-        "username" : null,
-        "nickname" : null,
-        "role" : null,
-        "imageUrl" : null
-      },
-      "createdAt" : "2022-10-11T21:23:36.72898",
-      "updatedAt" : "2022-10-11T21:23:36.728992",
-      "session" : {
-        "id" : null,
-        "name" : null
-      },
-      "mission" : {
-        "id" : null,
-        "name" : null,
-        "session" : null
-      },
-      "title" : "제목",
-      "content" : "내용내용내용내용내용",
-      "tags" : [ {
-        "id" : 1,
-        "name" : "태그1"
-      }, {
-        "id" : 2,
-        "name" : "태그2"
-      } ],
-      "abilities" : [ ],
-      "scrap" : false,
-      "read" : false,
-      "viewCount" : 10,
-      "liked" : false,
-      "likesCount" : 1,
-      "commentCount" : 0
-    },
-    "abilities" : [ {
-      "id" : 1,
-      "name" : "역량A",
-      "description" : "역량A 설명",
-      "color" : "#001122",
-      "weight" : 5,
-      "originAbilityId" : 54
-    } ],
-    "studylogAbilities" : [ {
-      "name" : "역량A",
-      "color" : "#001122"
-    } ]
-  } ]
-}
-
-
-
-
-
-

리포트 목록 조회

-
-

HTTP - request

-
-
-
GET /members/username/reports HTTP/1.1
-Host: localhost:8080
-
-
-
-
-

HTTP - response

-
-
-
HTTP/1.1 200 OK
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-Content-Type: application/json
-Content-Length: 526
-
-{
-  "data" : [ {
-    "id" : 1,
-    "title" : "새로운 리포트",
-    "description" : "새로운 리포트 설명",
-    "startDate" : "2022-09-13",
-    "endDate" : "2022-09-27",
-    "abilities" : [ ],
-    "studylogs" : [ ]
-  }, {
-    "id" : 2,
-    "title" : "두번째 새로운 리포트",
-    "description" : "두번째 새로운 리포트 설명",
-    "startDate" : "2022-09-27",
-    "endDate" : "2022-10-11",
-    "abilities" : [ ],
-    "studylogs" : [ ]
-  } ],
-  "totalSize" : 2,
-  "totalPage" : 1,
-  "currentPage" : 1
-}
-
-
-
-
-
-

리포트 조회

-
-

HTTP - request

-
-
-
GET /reports/1 HTTP/1.1
-Host: localhost:8080
-
-
-
-
-

HTTP - response

-
-
-
HTTP/1.1 200 OK
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-Content-Type: application/json
-Content-Length: 2084
-
-{
-  "id" : 1,
-  "title" : "새로운 리포트",
-  "description" : "새로운 리포트 설명",
-  "startDate" : "2022-09-27",
-  "endDate" : "2022-10-11",
-  "abilities" : [ {
-    "id" : 1,
-    "name" : "역량A",
-    "description" : "역량A 설명",
-    "color" : "#001122",
-    "weight" : 5,
-    "originAbilityId" : 54
-  }, {
-    "id" : 2,
-    "name" : "역량B",
-    "description" : "역량B 설명",
-    "color" : "#002122",
-    "weight" : 8,
-    "originAbilityId" : 57
-  }, {
-    "id" : 3,
-    "name" : "역량C",
-    "description" : "역량C 설명",
-    "color" : "#301172",
-    "weight" : 2,
-    "originAbilityId" : 52
-  }, {
-    "id" : 4,
-    "name" : "역량D",
-    "description" : "역량D 설명",
-    "color" : "#005122",
-    "weight" : 3,
-    "originAbilityId" : 32
-  }, {
-    "id" : 5,
-    "name" : "역량E",
-    "description" : "역량E 설명",
-    "color" : "#081142",
-    "weight" : 2,
-    "originAbilityId" : 24
-  } ],
-  "studylogs" : [ {
-    "studylog" : {
-      "id" : 1,
-      "author" : {
-        "id" : null,
-        "username" : null,
-        "nickname" : null,
-        "role" : null,
-        "imageUrl" : null
-      },
-      "createdAt" : "2022-10-11T21:23:36.72898",
-      "updatedAt" : "2022-10-11T21:23:36.728992",
-      "session" : {
-        "id" : null,
-        "name" : null
-      },
-      "mission" : {
-        "id" : null,
-        "name" : null,
-        "session" : null
-      },
-      "title" : "제목",
-      "content" : "내용내용내용내용내용",
-      "tags" : [ {
-        "id" : 1,
-        "name" : "태그1"
-      }, {
-        "id" : 2,
-        "name" : "태그2"
-      } ],
-      "abilities" : [ ],
-      "scrap" : false,
-      "read" : false,
-      "viewCount" : 10,
-      "liked" : false,
-      "likesCount" : 1,
-      "commentCount" : 0
-    },
-    "abilities" : [ {
-      "id" : 1,
-      "name" : "역량A",
-      "description" : "역량A 설명",
-      "color" : "#001122",
-      "weight" : 5,
-      "originAbilityId" : 54
-    } ],
-    "studylogAbilities" : [ {
-      "name" : "역량A",
-      "color" : "#001122"
-    } ]
-  } ]
-}
-
-
-
-
-
-

리포트 수정

-
-

HTTP - request

-
-
-
PUT /reports/1 HTTP/1.1
-Content-Type: application/json;charset=UTF-8
-Content-Type: application/json;charset=UTF-8
-Authorization: Bearer accessToken
-Content-Length: 85
-Host: localhost:8080
-
-{
-  "title" : "새로운 리포트",
-  "description" : "새로운 리포트 설명"
-}
-
-
-
-
-

HTTP - response

-
-
-
HTTP/1.1 200 OK
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-
-
-
-
-
-

리포트 삭제

-
-

HTTP - request

-
-
-
DELETE /reports/1 HTTP/1.1
-Authorization: Bearer accessToken
-Host: localhost:8080
-
-
-
-
-

HTTP - response

-
-
-
HTTP/1.1 204 No Content
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-
-
-
-
-
-
-
-

역량

-
-
-

기본 역량 등록

-
-
    -
  • -

    백엔드는 be, 프론트엔드는 fe

    -
  • -
  • -

    그 외 값을 입력 시 에러가 발생한다

    -
  • -
-
-
-

HTTP - request

-
-
-
POST /abilities/templates/be HTTP/1.1
-Authorization: Bearer accessToken
-Host: localhost:8080
-
-
-
-
-

HTTP - response

-
-
-
HTTP/1.1 200 OK
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-
-
-
-
-
-

역량 생성

-
-
    -
  • -

    상위 역량 등록 시 parent값을 null로 둔다

    -
  • -
  • -

    기존에 존재하는 역량 이름을 등록할 수 없다

    -
  • -
  • -

    기존에 존재하는 색상을 등록할 수 없다

    -
  • -
  • -

    하위 역량 등록 시 상위 역량의 색상과 다른 경우 등록할 수 없다

    -
  • -
-
-
-

HTTP - request

-
-
-
POST /abilities HTTP/1.1
-Content-Type: application/json;charset=UTF-8
-Content-Type: application/json;charset=UTF-8
-Authorization: Bearer accessToken
-Content-Length: 104
-Host: localhost:8080
-
-{
-  "name" : "역량 이름",
-  "description" : "역량 설명",
-  "color" : "#ffffff",
-  "parent" : 1
-}
-
-
-
-
-

HTTP - response

-
-
-
HTTP/1.1 200 OK
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-Content-Type: application/json
-Content-Length: 122
-
-{
-  "id" : 2,
-  "name" : "역량 이름",
-  "description" : "역량 설명",
-  "color" : "#001122",
-  "isParent" : false
-}
-
-
-
-
-
-

역량 목록 조회

-
-

HTTP - request

-
-
-
GET /members/username/abilities HTTP/1.1
-Host: localhost:8080
-
-
-
-
-

HTTP - response

-
-
-
HTTP/1.1 200 OK
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-Access-Control-Expose-Headers: X-Total-Count
-X-Total-Count: 2
-Content-Type: application/json
-Content-Length: 618
-
-[ {
-  "id" : 1,
-  "name" : "부모 역량 이름",
-  "description" : "부모 역량 설명",
-  "color" : "#001122",
-  "isParent" : true,
-  "children" : [ {
-    "id" : 2,
-    "name" : "자식 역량 이름",
-    "description" : "자식 역량 설명",
-    "color" : "#001122",
-    "isParent" : false
-  } ]
-}, {
-  "id" : 3,
-  "name" : "부모2 역량 이름",
-  "description" : "부모2 역량 설명",
-  "color" : "#001122",
-  "isParent" : true,
-  "children" : [ {
-    "id" : 4,
-    "name" : "자식2 역량 이름",
-    "description" : "자식2 역량 설명",
-    "color" : "#001122",
-    "isParent" : false
-  } ]
-} ]
-
-
-
-
-
-

역량 수정

-
-

HTTP - request

-
-
-
PUT /abilities/1 HTTP/1.1
-Content-Type: application/json;charset=UTF-8
-Content-Type: application/json;charset=UTF-8
-Authorization: Bearer accessToken
-Content-Length: 100
-Host: localhost:8080
-
-{
-  "id" : 1,
-  "name" : "역량 이름",
-  "description" : "역량 설명",
-  "color" : "#ffffff"
-}
-
-
-
-
-

HTTP - response

-
-
-
HTTP/1.1 200 OK
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-
-
-
-
-
-

역량 제거

-
-

HTTP - request

-
-
-
DELETE /abilities/1 HTTP/1.1
-Authorization: Bearer accessToken
-Host: localhost:8080
-
-
-
-
-

HTTP - response

-
-
-
HTTP/1.1 200 OK
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-
-
-
-
-
-

학습로그 역량 갱신

-
-
    -
  • -

    역량은 기본적으로 자식역량을 선택하는 것을 권장한다

    -
  • -
  • -

    선택할 자식 역량이 없는 경우 부모 역량을 선택할 수는 있다

    -
  • -
  • -

    부모 역량과 그 부모 역량의 자식 역량을 선택하는 경우는 어색한 상황이라고 볼 수 있다

    -
  • -
  • -

    자식 역량을 선택한 상황에서 부모 역량을 함께 등록할 수 없다

    -
  • -
-
-
-

HTTP - request

-
-
-
PUT /studylogs/1/abilities HTTP/1.1
-Content-Type: application/json;charset=UTF-8
-Content-Type: application/json;charset=UTF-8
-Authorization: Bearer accessToken
-Content-Length: 28
-Host: localhost:8080
-
-{
-  "abilities" : [ 1, 4 ]
-}
-
-
-
-
-

HTTP - response

-
-
-
HTTP/1.1 200 OK
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-Access-Control-Expose-Headers: X-Total-Count
-X-Total-Count: 2
-Content-Type: application/json
-Content-Length: 279
-
-[ {
-  "id" : 1,
-  "name" : "부모 역량 이름",
-  "description" : "부모 역량 설명",
-  "color" : "#001122",
-  "isParent" : true
-}, {
-  "id" : 4,
-  "name" : "자식2 역량 이름",
-  "description" : "자식2 역량 설명",
-  "color" : "#001122",
-  "isParent" : false
-} ]
-
-
-
-
-
-

역량 포함 모든 학습로그 - 조회

-
-
    -
  • -

    abilityIds : 필수값 아님

    -
  • -
  • -

    페이지네이션 제공

    -
    -
      -
    • -

      page: 페이지 번호

      -
    • -
    • -

      size: 한 페이지 당 갯수

      -
    • -
    -
    -
  • -
-
-
-

HTTP - request

-
-
-
GET /members/username/ability-studylogs?abilityIds=1 HTTP/1.1
-Host: localhost:8080
-
-
-
-
-

HTTP - response

-
-
-
HTTP/1.1 200 OK
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-Content-Type: application/json
-Content-Length: 1268
-
-{
-  "data" : [ {
-    "studylog" : {
-      "id" : 1,
-      "author" : {
-        "id" : null,
-        "username" : null,
-        "nickname" : null,
-        "role" : null,
-        "imageUrl" : null
-      },
-      "createdAt" : "2022-10-11T21:23:37.857683",
-      "updatedAt" : "2022-10-11T21:23:37.857698",
-      "session" : {
-        "id" : null,
-        "name" : null
-      },
-      "mission" : {
-        "id" : null,
-        "name" : null,
-        "session" : null
-      },
-      "title" : "제목",
-      "content" : "내용내용내용내용내용",
-      "tags" : [ {
-        "id" : 1,
-        "name" : "태그1"
-      }, {
-        "id" : 2,
-        "name" : "태그2"
-      } ],
-      "abilities" : [ ],
-      "scrap" : false,
-      "read" : false,
-      "viewCount" : 10,
-      "liked" : false,
-      "likesCount" : 1,
-      "commentCount" : 0
-    },
-    "abilities" : [ {
-      "id" : 1,
-      "name" : "부모 역량 이름",
-      "description" : "부모 역량 설명",
-      "color" : "#001122",
-      "isParent" : true
-    }, {
-      "id" : 4,
-      "name" : "자식2 역량 이름",
-      "description" : "자식2 역량 설명",
-      "color" : "#001122",
-      "isParent" : false
-    } ]
-  } ],
-  "totalSize" : 1,
-  "totalPage" : 1,
-  "currentPage" : 1
-}
-
-
-
-
-
-
-
-

사용자 리액션

-
-
-

사용자 스크랩 등록

-
-

Request

-
-
-
POST /members/scrap HTTP/1.1
-Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjY1NDkxMDIwLCJleHAiOjE2NjU0OTQ2MjAsInJvbGUiOiJDUkVXIn0.L-zEa2fDafcY6zGjIJNxv0hUeR0UpUkApKTUb9LtANk
-Content-Type: application/json; charset=UTF-8
-Host: localhost:4000
-Content-Length: 22
-
-{
-  "studylogId" : 1
-}
-
-
-
-
-

Response

-
-
-
HTTP/1.1 201 Created
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-Location: /studylogs/1
-Date: Tue, 11 Oct 2022 12:23:39 GMT
-Keep-Alive: timeout=60
-Connection: keep-alive
-
-
-
-
-
-

사용자 스크랩 삭제

-
-

Request

-
-
-
DELETE /members/scrap?studylog=1 HTTP/1.1
-Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjY1NDkxMDE5LCJleHAiOjE2NjU0OTQ2MTksInJvbGUiOiJDUkVXIn0.i4FXAEj0UsmDgt-EUcz_rL06gjk-iFpBwawZr-p5ktk
-Host: localhost:4000
-
-
-
-
-

Response

-
-
-
HTTP/1.1 204 No Content
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-Date: Tue, 11 Oct 2022 12:23:39 GMT
-Keep-Alive: timeout=60
-Connection: keep-alive
-
-
-
-
-
-

사용자 스크랩 조회

-
-

Request

-
-
-
GET /members/scrap HTTP/1.1
-Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjY1NDkxMDE5LCJleHAiOjE2NjU0OTQ2MTksInJvbGUiOiJDUkVXIn0.i4FXAEj0UsmDgt-EUcz_rL06gjk-iFpBwawZr-p5ktk
-Content-Type: application/json; charset=UTF-8
-Host: localhost:4000
-Content-Length: 22
-
-{
-  "studylogId" : 1
-}
-
-
-
-
-

Response

-
-
-
HTTP/1.1 200 OK
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-Content-Type: application/json
-Transfer-Encoding: chunked
-Date: Tue, 11 Oct 2022 12:23:39 GMT
-Keep-Alive: timeout=60
-Connection: keep-alive
-Content-Length: 3537
-
-{
-  "data" : [ {
-    "id" : 1,
-    "author" : {
-      "id" : 1,
-      "username" : "soulG",
-      "nickname" : "소롱",
-      "role" : "CREW",
-      "imageUrl" : "https://avatars.githubusercontent.com/u/52682603?v=4"
-    },
-    "createdAt" : "2022-10-11T21:23:39.428954",
-    "updatedAt" : "2022-10-11T21:23:39.428954",
-    "session" : null,
-    "mission" : {
-      "id" : 1,
-      "name" : "세션0 미션",
-      "session" : {
-        "id" : 1,
-        "name" : "세션0"
-      }
-    },
-    "title" : "뭐라도 스터디로그가 있어야하니까",
-    "content" : "SPA 방식으로 앱을 구현하였음.\nrouter 를 구현 하여 이용함.\n",
-    "tags" : [ {
-      "id" : 1,
-      "name" : "0번 태그"
-    } ],
-    "abilities" : [ ],
-    "scrap" : false,
-    "read" : false,
-    "viewCount" : 0,
-    "liked" : false,
-    "likesCount" : 0,
-    "commentCount" : 0
-  }, {
-    "id" : 2,
-    "author" : {
-      "id" : 1,
-      "username" : "soulG",
-      "nickname" : "소롱",
-      "role" : "CREW",
-      "imageUrl" : "https://avatars.githubusercontent.com/u/52682603?v=4"
-    },
-    "createdAt" : "2022-10-11T21:23:39.443865",
-    "updatedAt" : "2022-10-11T21:23:39.443865",
-    "session" : null,
-    "mission" : {
-      "id" : 2,
-      "name" : "세션1 미션",
-      "session" : {
-        "id" : 2,
-        "name" : "세션1"
-      }
-    },
-    "title" : "뭐라도 스터디로그가 있어야하니까",
-    "content" : "SPA 방식으로 앱을 구현하였음.\nrouter 를 구현 하여 이용함.\n",
-    "tags" : [ {
-      "id" : 2,
-      "name" : "1번 태그"
-    } ],
-    "abilities" : [ ],
-    "scrap" : false,
-    "read" : false,
-    "viewCount" : 0,
-    "liked" : false,
-    "likesCount" : 0,
-    "commentCount" : 0
-  }, {
-    "id" : 3,
-    "author" : {
-      "id" : 1,
-      "username" : "soulG",
-      "nickname" : "소롱",
-      "role" : "CREW",
-      "imageUrl" : "https://avatars.githubusercontent.com/u/52682603?v=4"
-    },
-    "createdAt" : "2022-10-11T21:23:39.456762",
-    "updatedAt" : "2022-10-11T21:23:39.456762",
-    "session" : null,
-    "mission" : {
-      "id" : 3,
-      "name" : "세션2 미션",
-      "session" : {
-        "id" : 3,
-        "name" : "세션2"
-      }
-    },
-    "title" : "뭐라도 스터디로그가 있어야하니까",
-    "content" : "SPA 방식으로 앱을 구현하였음.\nrouter 를 구현 하여 이용함.\n",
-    "tags" : [ {
-      "id" : 3,
-      "name" : "2번 태그"
-    } ],
-    "abilities" : [ ],
-    "scrap" : false,
-    "read" : false,
-    "viewCount" : 0,
-    "liked" : false,
-    "likesCount" : 0,
-    "commentCount" : 0
-  }, {
-    "id" : 4,
-    "author" : {
-      "id" : 1,
-      "username" : "soulG",
-      "nickname" : "소롱",
-      "role" : "CREW",
-      "imageUrl" : "https://avatars.githubusercontent.com/u/52682603?v=4"
-    },
-    "createdAt" : "2022-10-11T21:23:39.469337",
-    "updatedAt" : "2022-10-11T21:23:39.469337",
-    "session" : null,
-    "mission" : {
-      "id" : 4,
-      "name" : "세션3 미션",
-      "session" : {
-        "id" : 4,
-        "name" : "세션3"
-      }
-    },
-    "title" : "뭐라도 스터디로그가 있어야하니까",
-    "content" : "SPA 방식으로 앱을 구현하였음.\nrouter 를 구현 하여 이용함.\n",
-    "tags" : [ {
-      "id" : 4,
-      "name" : "3번 태그"
-    } ],
-    "abilities" : [ ],
-    "scrap" : false,
-    "read" : false,
-    "viewCount" : 0,
-    "liked" : false,
-    "likesCount" : 0,
-    "commentCount" : 0
-  } ],
-  "totalSize" : 4,
-  "totalPage" : 1,
-  "currPage" : 1
-}
-
-
-
-
-
-

사용자 스터디로그 좋아요 -

-
-

Request

-
-
-
POST /studylogs/1/likes HTTP/1.1
-Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjY1NDkxMDEzLCJleHAiOjE2NjU0OTQ2MTMsInJvbGUiOiJDUkVXIn0.UDBq0utQ79rotc10U442u76Z6q7Tv-g6GdE0PhjiAB4
-Content-Type: application/x-www-form-urlencoded; charset=ISO-8859-1
-Host: localhost:4000
-
-
-
-
-

Response

-
-
-
HTTP/1.1 200 OK
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-Content-Type: application/json
-Transfer-Encoding: chunked
-Date: Tue, 11 Oct 2022 12:23:33 GMT
-Keep-Alive: timeout=60
-Connection: keep-alive
-Content-Length: 40
-
-{
-  "liked" : true,
-  "likesCount" : 1
-}
-
-
-
-
-
-

사용자 스터디로그 좋아요 - 취소

-
-

Request

-
-
-
DELETE /studylogs/1/likes HTTP/1.1
-Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxIiwiaWF0IjoxNjY1NDkxMDE0LCJleHAiOjE2NjU0OTQ2MTQsInJvbGUiOiJDUkVXIn0.3__Ou2oeqAy8l1sD20foPbynSdv9Lj5_Iu3KcUglcp4
-Host: localhost:4000
-
-
-
-
-

Response

-
-
-
HTTP/1.1 200 OK
-Vary: Origin
-Vary: Access-Control-Request-Method
-Vary: Access-Control-Request-Headers
-Content-Type: application/json
-Transfer-Encoding: chunked
-Date: Tue, 11 Oct 2022 12:23:34 GMT
-Keep-Alive: timeout=60
-Connection: keep-alive
-Content-Length: 41
-
-{
-  "liked" : false,
-  "likesCount" : 0
-}
-
-
-
-
-
-
-
- - - - - - From 123e933d773a57456679dee19aba6289789a78f7 Mon Sep 17 00:00:00 2001 From: BGuga Date: Wed, 27 Sep 2023 16:25:42 +0900 Subject: [PATCH 10/10] =?UTF-8?q?chore:=20"application/json;charset=3DUTF-?= =?UTF-8?q?8"=20=EC=83=81=EC=88=98=20=EB=B6=84=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wooteco/prolog/docu/CurriculumDocumentation.java | 10 ++++++---- .../wooteco/prolog/docu/EssayAnswerDocumentaion.java | 8 +++++--- .../java/wooteco/prolog/docu/KeywordDocumentation.java | 6 ++++-- .../wooteco/prolog/docu/NewSessionDocumentation.java | 6 ++++-- .../java/wooteco/prolog/docu/QuizDocumentation.java | 6 ++++-- .../java/wooteco/prolog/docu/RecommendDocument.java | 6 ++++-- 6 files changed, 27 insertions(+), 15 deletions(-) diff --git a/backend/src/documentation/java/wooteco/prolog/docu/CurriculumDocumentation.java b/backend/src/documentation/java/wooteco/prolog/docu/CurriculumDocumentation.java index 5c35b970b..8e2c2c8b7 100644 --- a/backend/src/documentation/java/wooteco/prolog/docu/CurriculumDocumentation.java +++ b/backend/src/documentation/java/wooteco/prolog/docu/CurriculumDocumentation.java @@ -21,6 +21,8 @@ @WebMvcTest(controllers = CurriculumController.class) public class CurriculumDocumentation extends NewDocumentation { + private static final String UTF8_JSON_TYPE = "application/json;charset=UTF-8"; + @MockBean CurriculumService curriculumService; @@ -29,7 +31,7 @@ public class CurriculumDocumentation extends NewDocumentation { given(curriculumService.create(any())).willReturn(1L); given - .contentType("application/json;charset=UTF-8") + .contentType(UTF8_JSON_TYPE) .body(CURRICULUM_REQUEST) .when().post("/curriculums") .then().log().all().apply(document("curriculums/create")) @@ -41,7 +43,7 @@ public class CurriculumDocumentation extends NewDocumentation { given(curriculumService.findCurriculums()).willReturn(CURRICULUMS_RESPONSE); given - .contentType("application/json;charset=UTF-8") + .contentType(UTF8_JSON_TYPE) .body(CURRICULUM_REQUEST) .when().get("/curriculums") .then().log().all().apply(document("curriculums/find")) @@ -53,7 +55,7 @@ public class CurriculumDocumentation extends NewDocumentation { doNothing().when(curriculumService).update(any(), any()); given - .contentType("application/json;charset=UTF-8") + .contentType(UTF8_JSON_TYPE) .body(CURRICULUM_EDIT_REQUEST) .when().put("/curriculums/{curriculumId}", 1) .then().log().all().apply(document("curriculums/update")) @@ -65,7 +67,7 @@ public class CurriculumDocumentation extends NewDocumentation { doNothing().when(curriculumService).delete(any()); given - .contentType("application/json;charset=UTF-8") + .contentType(UTF8_JSON_TYPE) .when().delete("/curriculums/{curriculumId}", 1) .then().log().all().apply(document("curriculums/delete")) .statusCode(HttpStatus.NO_CONTENT.value()); diff --git a/backend/src/documentation/java/wooteco/prolog/docu/EssayAnswerDocumentaion.java b/backend/src/documentation/java/wooteco/prolog/docu/EssayAnswerDocumentaion.java index e982ed14a..d5aa00aa7 100644 --- a/backend/src/documentation/java/wooteco/prolog/docu/EssayAnswerDocumentaion.java +++ b/backend/src/documentation/java/wooteco/prolog/docu/EssayAnswerDocumentaion.java @@ -30,6 +30,8 @@ @WebMvcTest(EssayAnswerController.class) public class EssayAnswerDocumentaion extends NewDocumentation { + private static final String UTF8_JSON_TYPE = "application/json;charset=UTF-8"; + @MockBean EssayAnswerService essayAnswerService; @@ -51,7 +53,7 @@ public class EssayAnswerDocumentaion extends NewDocumentation { EssayAnswerRequest request = new EssayAnswerRequest(1L, "answer"); given - .contentType("application/json;charset=UTF-8") + .contentType(UTF8_JSON_TYPE) .body(request) .when().post("essay-answers") .then().log().all().apply(document("essay-answer/create")) @@ -70,7 +72,7 @@ public class EssayAnswerDocumentaion extends NewDocumentation { Collections.emptyList()); given - .contentType("application/json;charset=UTF-8") + .contentType(UTF8_JSON_TYPE) .body(request) .when().get("essay-answers") .then().log().all().apply(document("essay-answer/search/list")) @@ -82,7 +84,7 @@ public class EssayAnswerDocumentaion extends NewDocumentation { EssayAnswerUpdateRequest request = new EssayAnswerUpdateRequest("new Answer"); given - .contentType("application/json;charset=UTF-8") + .contentType(UTF8_JSON_TYPE) .body(request) .when().patch("essay-answers/{id}", 1) .then().log().all().apply(document("essay-answer/update")) diff --git a/backend/src/documentation/java/wooteco/prolog/docu/KeywordDocumentation.java b/backend/src/documentation/java/wooteco/prolog/docu/KeywordDocumentation.java index 62ce743cd..6c31c3a81 100644 --- a/backend/src/documentation/java/wooteco/prolog/docu/KeywordDocumentation.java +++ b/backend/src/documentation/java/wooteco/prolog/docu/KeywordDocumentation.java @@ -25,6 +25,8 @@ @WebMvcTest(controllers = KeywordController.class) public class KeywordDocumentation extends NewDocumentation { + private static final String UTF8_JSON_TYPE = "application/json;charset=UTF-8"; + @MockBean private KeywordService keywordService; @@ -33,7 +35,7 @@ public class KeywordDocumentation extends NewDocumentation { given(keywordService.createKeyword(any(), any())).willReturn(1L); given - .contentType("application/json;charset=UTF-8") + .contentType(UTF8_JSON_TYPE) .body(KEYWORD_CREATE_REQUEST) .when().post("/sessions/1/keywords") .then().log().all().apply(document("keywords/create")) @@ -55,7 +57,7 @@ public class KeywordDocumentation extends NewDocumentation { doNothing().when(keywordService).updateKeyword(any(), any(), any()); given - .contentType("application/json;charset=UTF-8") + .contentType(UTF8_JSON_TYPE) .body(KEYWORD_UPDATE_REQUEST) .when().put("/sessions/1/keywords/1") .then().log().all().apply(document("keywords/update")) diff --git a/backend/src/documentation/java/wooteco/prolog/docu/NewSessionDocumentation.java b/backend/src/documentation/java/wooteco/prolog/docu/NewSessionDocumentation.java index 081d14c70..f8ff5098d 100644 --- a/backend/src/documentation/java/wooteco/prolog/docu/NewSessionDocumentation.java +++ b/backend/src/documentation/java/wooteco/prolog/docu/NewSessionDocumentation.java @@ -20,6 +20,8 @@ @WebMvcTest(controllers = NewSessionController.class) public class NewSessionDocumentation extends NewDocumentation { + private static final String UTF8_JSON_TYPE = "application/json;charset=UTF-8"; + @MockBean private NewSessionService sessionService; @@ -28,7 +30,7 @@ public class NewSessionDocumentation extends NewDocumentation { given(sessionService.createSession(any(), any())).willReturn(1L); given - .contentType("application/json;charset=UTF-8") + .contentType(UTF8_JSON_TYPE) .body(SESSION_CREATE_REQUEST) .when().post("/curriculums/1/sessions") .then().log().all().apply(document("sessions-new/create")) @@ -50,7 +52,7 @@ public class NewSessionDocumentation extends NewDocumentation { doNothing().when(sessionService).updateSession(any(), any()); given - .contentType("application/json;charset=UTF-8") + .contentType(UTF8_JSON_TYPE) .body(SESSION_UPDATE_REQUEST) .when().put("/curriculums/1/sessions/1") .then().log().all().apply(document("sessions-new/update")) diff --git a/backend/src/documentation/java/wooteco/prolog/docu/QuizDocumentation.java b/backend/src/documentation/java/wooteco/prolog/docu/QuizDocumentation.java index 3f183da33..45bfeee7c 100644 --- a/backend/src/documentation/java/wooteco/prolog/docu/QuizDocumentation.java +++ b/backend/src/documentation/java/wooteco/prolog/docu/QuizDocumentation.java @@ -21,6 +21,8 @@ @WebMvcTest(controllers = QuizController.class) public class QuizDocumentation extends NewDocumentation { + private static final String UTF8_JSON_TYPE = "application/json;charset=UTF-8"; + @MockBean private QuizService quizService; @@ -29,7 +31,7 @@ public class QuizDocumentation extends NewDocumentation { given(quizService.createQuiz(any(), any())).willReturn(1L); given - .contentType("application/json;charset=UTF-8") + .contentType(UTF8_JSON_TYPE) .body(QUIZ_REQUEST) .when().post("/sessions/{sessionId}/keywords/{keywordId}/quizs", 1L, 1L) .then().log().all().apply(document("quiz/create")) @@ -68,7 +70,7 @@ public class QuizDocumentation extends NewDocumentation { doNothing().when(quizService).updateQuiz(any(), any()); given - .contentType("application/json;charset=UTF-8") + .contentType(UTF8_JSON_TYPE) .body(QUIZ_EDIT_REQUEST) .when().put("/sessions/{sessionId}/keywords/{keywordId}/quizs/{quizId}", 1L, 1L, 1L) .then().log().all().apply(document("quiz/update")) diff --git a/backend/src/documentation/java/wooteco/prolog/docu/RecommendDocument.java b/backend/src/documentation/java/wooteco/prolog/docu/RecommendDocument.java index b4cae1b10..9cd1087f6 100644 --- a/backend/src/documentation/java/wooteco/prolog/docu/RecommendDocument.java +++ b/backend/src/documentation/java/wooteco/prolog/docu/RecommendDocument.java @@ -15,6 +15,8 @@ @WebMvcTest(controllers = RecommendedController.class) public class RecommendDocument extends NewDocumentation { + private static final String UTF8_JSON_TYPE = "application/json;charset=UTF-8"; + @MockBean RecommendedPostService recommendedPostService; @@ -23,7 +25,7 @@ public class RecommendDocument extends NewDocumentation { RecommendedRequest recommendUrlValue = new RecommendedRequest("recommendUrlValue"); given - .contentType("application/json;charset=UTF-8") + .contentType(UTF8_JSON_TYPE) .body(recommendUrlValue) .when().post("/keywords/{keywordId}/recommended-posts", 1L) .then().log().all().apply(document("recommend/create")) @@ -35,7 +37,7 @@ public class RecommendDocument extends NewDocumentation { RecommendedUpdateRequest recommendedUpdateRequest = new RecommendedUpdateRequest("recommendUrlValue"); given - .contentType("application/json;charset=UTF-8") + .contentType(UTF8_JSON_TYPE) .body(recommendedUpdateRequest) .when().put("/keywords/{keywordId}/recommended-posts/{recommendedId}", 1L, 2L) .then().log().all().apply(document("recommend/update"))