diff --git a/api-docs.yaml b/api-docs.yaml index fd50a8ab..6fff9195 100644 --- a/api-docs.yaml +++ b/api-docs.yaml @@ -7,45 +7,46 @@ servers: - url: http://localhost:8080 description: Generated server url paths: - /materials/lectures/{courseVideoId}: - get: + /members/profile: + put: tags: - - 강의 수강 - summary: 강의자료 불러오기 - description: "영상 ID를 사용해 저장된 강의노트, 퀴즈를 불러옵니다." - operationId: getMaterials - parameters: - - name: courseVideoId - in: path - required: true - schema: - type: integer - format: int64 + - 로그인 + summary: 프로필 이름 수정 + description: name을 받아 멤버의 이름을 수정합니다. + operationId: updateMemberName + requestBody: + content: + application/json;charset=UTF-8: + schema: + $ref: '#/components/schemas/NameUpdateRequest' + required: true responses: - "404": - description: Not Found + "400": + description: Bad Request content: application/json;charset=UTF-8: schema: $ref: '#/components/schemas/ErrorResponse' - "401": - description: Unauthorized + "404": + description: Not Found content: application/json;charset=UTF-8: schema: $ref: '#/components/schemas/ErrorResponse' - "400": - description: Bad Request + "401": + description: Unauthorized content: application/json;charset=UTF-8: schema: $ref: '#/components/schemas/ErrorResponse' "200": - description: 성공적으로 강의 자료를 불러왔습니다. + description: 멤버 이름 변경에 성공하였습니다. content: - application/json;charset=UTF-8: + application/json: schema: - $ref: '#/components/schemas/Material' + allOf: + - $ref: '#/components/schemas/NameUpdateResponse' + /materials/summaries/{courseVideoId}: put: tags: - 강의 수강 @@ -66,6 +67,12 @@ paths: $ref: '#/components/schemas/SummaryEdit' required: true responses: + "400": + description: Bad Request + content: + application/json;charset=UTF-8: + schema: + $ref: '#/components/schemas/ErrorResponse' "404": description: Not Found content: @@ -78,18 +85,51 @@ paths: application/json;charset=UTF-8: schema: $ref: '#/components/schemas/ErrorResponse' + "200": + description: 성공적으로 강의 노트를 업데이트 했습니다. + content: + application/json;charset=UTF-8: + schema: + $ref: '#/components/schemas/SummaryId' + /materials/quizzes/{courseQuizId}/scrap: + put: + tags: + - 강의 수강 + summary: "퀴즈 오답노트 등록, 취소" + description: courseQuizId 를 받아 해당 퀴즈를 오답노트에 등록하거나 취소합니다. + operationId: switchScrapFlag + parameters: + - name: courseQuizId + in: path + required: true + schema: + type: integer + format: int64 + responses: "400": description: Bad Request content: application/json;charset=UTF-8: schema: $ref: '#/components/schemas/ErrorResponse' + "404": + description: Not Found + content: + application/json;charset=UTF-8: + schema: + $ref: '#/components/schemas/ErrorResponse' + "401": + description: Unauthorized + content: + application/json;charset=UTF-8: + schema: + $ref: '#/components/schemas/ErrorResponse' "200": - description: 성공적으로 강의 노트를 업데이트 했습니다. + description: 성공적으로 오답노트에 등록/취소하였습니다. content: application/json;charset=UTF-8: schema: - $ref: '#/components/schemas/SummaryId' + $ref: '#/components/schemas/ScrapResult' /lectures/{courseVideoId}/time: put: tags: @@ -104,6 +144,12 @@ paths: schema: type: integer format: int64 + - name: isCompletedManually + in: query + required: false + schema: + type: boolean + default: false requestBody: content: application/json;charset=UTF-8: @@ -111,6 +157,12 @@ paths: $ref: '#/components/schemas/LectureTimeRecord' required: true responses: + "400": + description: Bad Request + content: + application/json;charset=UTF-8: + schema: + $ref: '#/components/schemas/ErrorResponse' "404": description: Not Found content: @@ -123,18 +175,57 @@ paths: application/json;charset=UTF-8: schema: $ref: '#/components/schemas/ErrorResponse' + "200": + description: 성공적으로 학습시간을 저장 하였습니다. + content: + application/json: + schema: + $ref: '#/components/schemas/LectureStatus' + /reviews/lectures/{lectureId}: + post: + tags: + - 리뷰 평점 + summary: 리뷰 평점 작성 + description: 리뷰 평점 작성 및 제출 + operationId: postReview + parameters: + - name: lectureId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json;charset=UTF-8: + schema: + $ref: '#/components/schemas/ReviewSubmitRequest' + required: true + responses: "400": description: Bad Request content: application/json;charset=UTF-8: schema: $ref: '#/components/schemas/ErrorResponse' + "404": + description: Not Found + content: + application/json;charset=UTF-8: + schema: + $ref: '#/components/schemas/ErrorResponse' + "401": + description: Unauthorized + content: + application/json;charset=UTF-8: + schema: + $ref: '#/components/schemas/ErrorResponse' "200": - description: 성공적으로 학습시간을 저장하였습니다. + description: 성공적으로 작성 완료되었습니다. content: application/json: schema: - $ref: '#/components/schemas/LectureStatus' + $ref: '#/components/schemas/ReviewSubmitResponse' /members/refresh: post: tags: @@ -149,20 +240,20 @@ paths: $ref: '#/components/schemas/RefreshToken' required: true responses: - "404": - description: Not Found + "400": + description: Bad Request content: application/json;charset=UTF-8: schema: $ref: '#/components/schemas/ErrorResponse' - "401": - description: Unauthorized + "404": + description: Not Found content: application/json;charset=UTF-8: schema: $ref: '#/components/schemas/ErrorResponse' - "400": - description: Bad Request + "401": + description: Unauthorized content: application/json;charset=UTF-8: schema: @@ -188,6 +279,9 @@ paths: $ref: '#/components/schemas/GoogleIdKey' required: true responses: + "400": + description: 요청 본문이 유효하지 않습니다. + content: {} "404": description: Not Found content: @@ -197,9 +291,6 @@ paths: "401": description: 인증에 실패하였습니다. content: {} - "400": - description: 요청 본문이 유효하지 않습니다. - content: {} "200": description: 성공적으로 사용자를 인증하였습니다. content: @@ -207,14 +298,35 @@ paths: schema: allOf: - $ref: '#/components/schemas/Login' - /courses: - get: + /materials/quizzes/{courseVideoId}: + post: tags: - - 내 강의실 - summary: 내 강의코스 불러오기 - description: 멤버ID를 입력받아 멤버의 등록 코스 리스트와 관련 정보를 불러옵니다. - operationId: getMyCourses + - 강의 수강 + summary: 퀴즈 채점 결과 저장 + description: courseVideoId 를 받아 채점 결과를 courseQuiz 테이블에 저장합니다. + operationId: submitQuizResults + parameters: + - name: courseVideoId + in: path + required: true + schema: + type: integer + format: int64 + requestBody: + content: + application/json;charset=UTF-8: + schema: + type: array + items: + $ref: '#/components/schemas/SubmittedQuiz' + required: true responses: + "400": + description: Bad Request + content: + application/json;charset=UTF-8: + schema: + $ref: '#/components/schemas/ErrorResponse' "404": description: Not Found content: @@ -227,12 +339,38 @@ paths: application/json;charset=UTF-8: schema: $ref: '#/components/schemas/ErrorResponse' + "200": + description: 성공적으로 채점 결과를 저장했습니다. + content: + application/json;charset=UTF-8: + schema: + $ref: '#/components/schemas/SubmittedQuizInfo' + /courses: + get: + tags: + - 내 강의실 + summary: 내 강의코스 불러오기 + description: 멤버ID를 입력받아 멤버의 등록 코스 리스트와 관련 정보를 불러옵니다. + operationId: getMyCourses + responses: "400": description: Bad Request content: application/json;charset=UTF-8: schema: $ref: '#/components/schemas/ErrorResponse' + "404": + description: Not Found + content: + application/json;charset=UTF-8: + schema: + $ref: '#/components/schemas/ErrorResponse' + "401": + description: Unauthorized + content: + application/json;charset=UTF-8: + schema: + $ref: '#/components/schemas/ErrorResponse' "200": description: 성공적으로 코스 리스트를 불러왔습니다. content: @@ -258,20 +396,20 @@ paths: $ref: '#/components/schemas/NewLecture' required: true responses: - "404": - description: Not Found + "400": + description: Bad Request content: application/json;charset=UTF-8: schema: $ref: '#/components/schemas/ErrorResponse' - "401": - description: Unauthorized + "404": + description: Not Found content: application/json;charset=UTF-8: schema: $ref: '#/components/schemas/ErrorResponse' - "400": - description: Bad Request + "401": + description: Unauthorized content: application/json;charset=UTF-8: schema: @@ -297,20 +435,20 @@ paths: type: integer format: int64 responses: - "404": - description: Not Found + "400": + description: Bad Request content: application/json;charset=UTF-8: schema: $ref: '#/components/schemas/ErrorResponse' - "401": - description: Unauthorized + "404": + description: Not Found content: application/json;charset=UTF-8: schema: $ref: '#/components/schemas/ErrorResponse' - "400": - description: Bad Request + "401": + description: Unauthorized content: application/json;charset=UTF-8: schema: @@ -341,6 +479,12 @@ paths: $ref: '#/components/schemas/NewLecture' required: true responses: + "400": + description: Bad Request + content: + application/json;charset=UTF-8: + schema: + $ref: '#/components/schemas/ErrorResponse' "404": description: Not Found content: @@ -353,18 +497,158 @@ paths: application/json;charset=UTF-8: schema: $ref: '#/components/schemas/ErrorResponse' + "200": + description: 성공적으로 코스에 강의를 추가하였습니다. + content: + application/json;charset=UTF-8: + schema: + $ref: '#/components/schemas/EnrolledCourseInfo' + delete: + tags: + - 내 강의실 + summary: 강의 코스 삭제 + description: "지정한 강의 코스를 삭제하고, 업데이트된 강의 리스트를 반환합니다." + operationId: deleteCourse + parameters: + - name: courseId + in: path + required: true + schema: + type: integer + format: int64 + responses: "400": description: Bad Request content: application/json;charset=UTF-8: schema: $ref: '#/components/schemas/ErrorResponse' + "404": + description: Not Found + content: + application/json;charset=UTF-8: + schema: + $ref: '#/components/schemas/ErrorResponse' + "401": + description: Unauthorized + content: + application/json;charset=UTF-8: + schema: + $ref: '#/components/schemas/ErrorResponse' "200": - description: 성공적으로 코스에 강의를 추가하였습니다. + description: "강의코스 삭제가 성공했으며, 정상적으로 결과를 반환했습니다." + content: + application/json: + schema: + $ref: '#/components/schemas/MyCourses' + /: + get: + tags: + - health-check-controller + operationId: healthCheck + responses: + "400": + description: Bad Request content: application/json;charset=UTF-8: schema: - $ref: '#/components/schemas/EnrolledCourseInfo' + $ref: '#/components/schemas/ErrorResponse' + "404": + description: Not Found + content: + application/json;charset=UTF-8: + schema: + $ref: '#/components/schemas/ErrorResponse' + "401": + description: Unauthorized + content: + application/json;charset=UTF-8: + schema: + $ref: '#/components/schemas/ErrorResponse' + "200": + description: OK + content: + application/json;charset=UTF-8: + schema: + type: object + /reviews/courses/{courseId}: + get: + tags: + - 리뷰 평점 + summary: 리뷰 평점 강의 리스트 조회 + description: 리뷰 평점을 위한 코스 내 강의 리스트 조회 + operationId: getLectureList + parameters: + - name: courseId + in: path + required: true + schema: + type: integer + format: int64 + responses: + "400": + description: Bad Request + content: + application/json;charset=UTF-8: + schema: + $ref: '#/components/schemas/ErrorResponse' + "404": + description: Not Found + content: + application/json;charset=UTF-8: + schema: + $ref: '#/components/schemas/ErrorResponse' + "401": + description: Unauthorized + content: + application/json;charset=UTF-8: + schema: + $ref: '#/components/schemas/ErrorResponse' + "200": + description: 성공적으로 강의 리스트를 불러왔습니다. + content: + application/json: + schema: + $ref: '#/components/schemas/LectureBriefList4Review' + /materials/{courseVideoId}: + get: + tags: + - 강의 수강 + summary: 강의자료 불러오기 + description: "영상 ID를 사용해 저장된 강의노트, 퀴즈를 불러옵니다." + operationId: getMaterials + parameters: + - name: courseVideoId + in: path + required: true + schema: + type: integer + format: int64 + responses: + "400": + description: Bad Request + content: + application/json;charset=UTF-8: + schema: + $ref: '#/components/schemas/ErrorResponse' + "404": + description: Not Found + content: + application/json;charset=UTF-8: + schema: + $ref: '#/components/schemas/ErrorResponse' + "401": + description: Unauthorized + content: + application/json;charset=UTF-8: + schema: + $ref: '#/components/schemas/ErrorResponse' + "200": + description: 성공적으로 강의 자료를 불러왔습니다. + content: + application/json;charset=UTF-8: + schema: + $ref: '#/components/schemas/Material' /lectures: get: tags: @@ -400,20 +684,20 @@ paths: description: 이전 페이지 토큰 example: CAUQAA responses: - "404": - description: Not Found + "400": + description: Bad Request content: application/json;charset=UTF-8: schema: $ref: '#/components/schemas/ErrorResponse' - "401": - description: Unauthorized + "404": + description: Not Found content: application/json;charset=UTF-8: schema: $ref: '#/components/schemas/ErrorResponse' - "400": - description: Bad Request + "401": + description: Unauthorized content: application/json;charset=UTF-8: schema: @@ -465,20 +749,20 @@ paths: description: 목차 다음 페이지 토큰 example: EAAaBlBUOkNESQ responses: - "404": - description: Not Found + "400": + description: Bad Request content: application/json;charset=UTF-8: schema: $ref: '#/components/schemas/ErrorResponse' - "401": - description: Unauthorized + "404": + description: Not Found content: application/json;charset=UTF-8: schema: $ref: '#/components/schemas/ErrorResponse' - "400": - description: Bad Request + "401": + description: Unauthorized content: application/json;charset=UTF-8: schema: @@ -500,20 +784,20 @@ paths: description: 유저 ID를 받아 적당한 강의를 추천한다. operationId: getRecommendations responses: - "404": - description: Not Found + "400": + description: Bad Request content: application/json;charset=UTF-8: schema: $ref: '#/components/schemas/ErrorResponse' - "401": - description: Unauthorized + "404": + description: Not Found content: application/json;charset=UTF-8: schema: $ref: '#/components/schemas/ErrorResponse' - "400": - description: Bad Request + "401": + description: Unauthorized content: application/json;charset=UTF-8: schema: @@ -532,20 +816,20 @@ paths: description: 유저 ID 바탕으로 대시보드 정보 불러오기 operationId: getDashboard responses: - "404": - description: Not Found + "400": + description: Bad Request content: application/json;charset=UTF-8: schema: $ref: '#/components/schemas/ErrorResponse' - "401": - description: Unauthorized + "404": + description: Not Found content: application/json;charset=UTF-8: schema: $ref: '#/components/schemas/ErrorResponse' - "400": - description: Bad Request + "401": + description: Unauthorized content: application/json;charset=UTF-8: schema: @@ -566,6 +850,22 @@ components: format: int32 message: type: string + NameUpdateRequest: + type: object + properties: + name: + type: string + description: 수정할 멤버 이름 + example: 손경식 + description: 멤버 이름 수정 + NameUpdateResponse: + type: object + properties: + memberId: + type: integer + format: int64 + name: + type: string SummaryEdit: type: object properties: @@ -577,14 +877,24 @@ components: summaryId: type: integer format: int64 + ScrapResult: + type: object + properties: + courseQuizId: + type: integer + format: int64 + is_scrapped: + type: boolean LectureTimeRecord: - required: - - view_duration type: object properties: view_duration: type: integer format: int32 + writeOnly: true + viewDuration: + type: integer + format: int32 LectureStatus: type: object properties: @@ -594,9 +904,33 @@ components: viewDuration: type: integer format: int32 - is_complete: + is_completed: type: boolean description: 해당 강의에 대한 수강정보 + ReviewSubmitRequest: + type: object + properties: + submittedRating: + type: integer + format: int32 + reviewContent: + type: string + description: 리뷰 작성 API 요청 객체 + ReviewSubmitResponse: + type: object + properties: + lectureId: + type: integer + format: int64 + reviewId: + type: integer + format: int64 + submittedRating: + type: integer + format: int32 + reviewContent: + type: string + description: 리뷰 작성 API Response RefreshToken: type: object properties: @@ -625,6 +959,10 @@ components: type: string description: 멤버 이름 example: user_978538 + profile: + type: string + description: 멤버 프로필 사진 + example: https://lh3.googleusercontent.com/a/ACg8ocI-Fz8cwMOHu2AJttFMt-s-25lPa--EUakuTRgvqfi-bA=s96-c bio: type: string description: 사용자 한줄소개 @@ -637,6 +975,35 @@ components: description: 구글 ID 토큰 example: eyJhbGciOiJSUzI1NiIsImtpZCI6Ijk5YmNiMDY5MzQwYTNmMTQ3NDYyNzk0ZGZlZmE3NWU3OTk2MTM2MzQiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL2FjY291bnRzLmdvb2dsZS5jb20iLCJuYmYiOjE2ODgyMTkyODAsImF1ZCI6IjEwODUyMjEwNDc5NDYtNHMxZ2YwZjlqdHQ3OTB2a2ZkcHZ1Z3FqbW9qMzdrdGsuYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20iLCJzdWIiOiIxMDYwMzMxMTQ0MzU1MjY2MTA0ODciLCJlbWFpbCI6ImxqanVuMDcwMkBnbWFpbC5jA0Nzk0Ni00czFnZjBmOWp0dDc5MHZrZmRwdnVncWptb2ozN2t0ay5hcHBzLmdvb2dsZXVzZXJjb250ZW50LmNvbSIsIm5hbWUiOiLsnbTsooXspIAiLCJwaWN0dXJlIjoiaHR0cHM6Ly9saDMuZ29vZ2xldXNlcmNvbnRlbnQuY29tL2EvQUF=NLQmhRemdtZnNMdXpJVEhNS081bHNnN3FrPXM5Ni1jIiwiZ2l2ZW5fbmFtZSI6IuyiheykgCIsImZhbWlseV9uYW1lIjoi7J20IiwiaWF0IjoxNjg4MjE5NTgwLCJleHAiOjE2ODgyMjMxODAsImp0aSI6kNmVmNmMyM2JlZDgifQ.U1zcrnD9T9tnq2boIRZ9m37fVqeq25elAyBtghKG1p4mzbI1VoygbzdbyYihUkIVz8I21EDiiny9pO8ZBh7_pfSVHXok2XWPtWtzp3SHFKwePhW-SD0HAh8vDPJrkGCiQj5CupAL5nIs-GlIfusC7rx9A1hHaxu-CNyuEDlqrHh-MHlQLN4Wp42RfptOf68cIZZvKQ9D-Fx7Ag6F3Ot8Wfq5yZA description: 구글 ID 토큰 + SubmittedQuiz: + type: object + properties: + id: + type: integer + format: int64 + writeOnly: true + submitted_answer: + type: string + writeOnly: true + is_correct: + type: boolean + writeOnly: true + submittedAnswer: + type: string + isCorrect: + type: boolean + quizId: + type: integer + format: int64 + SubmittedQuizInfo: + type: object + properties: + id: + type: integer + format: int64 + courseQuizId: + type: integer + format: int64 NewLecture: required: - lectureCode @@ -687,6 +1054,72 @@ components: description: 등록된 강의 제목 example: 손경식의 맥북프로 언박싱 description: 등록된 코스 정보 + LectureBrief4Review: + type: object + properties: + index: + type: integer + description: 강의 인덱스 + format: int32 + lectureId: + type: integer + description: 강의 ID + format: int64 + title: + type: string + description: 강의 제목 + thumbnail: + type: string + description: 강의 썸네일 + channel: + type: string + description: 채널명 + viewDuration: + type: integer + description: 시청 시간 + format: int32 + lectureDuration: + type: integer + description: 총 시간 + format: int32 + completedVideoCount: + type: integer + description: 수강 완료 영상 갯수 + format: int32 + totalVideoCount: + type: integer + description: 총 영상 갯수 + format: int32 + progress: + type: integer + description: 진행률 + format: int32 + submittedAt: + type: string + description: 리뷰 작성 날짜 + content: + type: string + description: 리뷰 내용 + rating: + type: integer + description: 유저 평점 + format: int32 + is_playlist: + type: boolean + description: 플레이리스트 여부 + is_review_allowed: + type: boolean + description: 리뷰 작성 가능 여부 + description: 리뷰 작성 페이지 강의 정보 + LectureBriefList4Review: + type: object + properties: + lectures: + type: array + description: 강의 리스트 + items: + $ref: '#/components/schemas/LectureBrief4Review' + description: 강의 리스트 Material: type: object properties: @@ -699,10 +1132,10 @@ components: quizzes: type: array items: - $ref: '#/components/schemas/Quiz' + $ref: '#/components/schemas/QuizRes' summaryBrief: $ref: '#/components/schemas/SummaryBrief' - Quiz: + QuizRes: type: object properties: id: @@ -727,6 +1160,8 @@ components: type: boolean is_correct: type: boolean + is_scrapped: + type: boolean SummaryBrief: type: object properties: @@ -734,7 +1169,7 @@ components: type: string modifiedAt: type: string - is_modifed: + is_modified: type: boolean KeywordSearchParam: required: @@ -770,9 +1205,9 @@ components: type: array description: 조회된 강의 리스트 items: - $ref: '#/components/schemas/Lecture' + $ref: '#/components/schemas/LectureResponse' description: 검색 결과 강의 리스트 - Lecture: + LectureResponse: type: object properties: lectureTitle: @@ -1310,13 +1745,13 @@ components: type: array description: 해당 주차의 비디오 목록 items: - $ref: '#/components/schemas/VideoBrief' + $ref: '#/components/schemas/VideoWatchInfo' is_completed: type: boolean description: 해당 주차의 강의가 완료되었는지 여부 example: false description: 강의 일정의 주별 정보 - VideoBrief: + VideoWatchInfo: type: object properties: videoId: