openapi: 3.0.0 info: title: 9th UMC Hackathon 7 Team version: 1.0.0 description: 9th UMC Hackathon 7 Team 프로젝트입니다. servers: - description: 9th UMC Hackathon 7 Team Project 로컬 서버 url: http://localhost:3000 - description: 9th UMC Hackathon 7 Team 배포 서버 url: https://api.u-mc.p-e.kr tags: - name: Auth description: 인증 관련 API - name: User description: 사용자 API - name: Chat description: 채팅 관련 API - name: Room description: 채팅방/메인 페이지 관련 API - name: Analysis description: 분석 관련 API - name: AI description: AI 테스트 API paths: /v1/api/auth/signup: post: tags: [Auth] summary: 회원가입 description: 회원가입을 위한 API입니다. 이메일, 이름, 비밀번호, 아바타, 성별, MBTI, 말투 정보를 포함해 요청해야 합니다. security: [] requestBody: required: true content: application/json: schema: type: object required: - name - email - password - avatar - gender - mbti - intonation properties: name: type: string example: "사용자" description: 사용자 이름 loginId: type: string example: "test3@naver.com" description: 로그인 이메일 password: type: string example: "q1w2e3r4!Q" description: 비밀번호 avatar: type: string example: "AVATAR1" description: 선택한 아바타 gender: type: string example: "FEMALE" description: 성별 mbti: type: string example: "INTP" description: MBTI intonation: type: string example: "NORMAL" description: 말투 responses: "200": description: 회원가입 성공 content: application/json: schema: $ref: "#/components/schemas/ApiResponseUserProfile" "400": description: 잘못된 요청 content: application/json: schema: $ref: "#/components/schemas/FailResponse" "409": description: 이메일 중복 content: application/json: schema: $ref: "#/components/schemas/FailResponse" /v1/api/auth/login: post: tags: [Auth] summary: 로그인 description: 닉네임 또는 이메일과 비밀번호를 이용해 로그인합니다. security: [] requestBody: required: true content: application/json: schema: type: object required: - loginId - password properties: loginId: type: string description: 닉네임 또는 이메일 example: "test2@naver.com" password: type: string description: 비밀번호 example: "q1w2e3r4!Q" responses: "200": description: 로그인 성공 content: application/json: schema: $ref: "#/components/schemas/ApiResponseAuthToken" "400": description: 로그인 정보 불일치 content: application/json: schema: $ref: "#/components/schemas/FailResponse" "404": description: 존재하지 않는 사용자 content: application/json: schema: $ref: "#/components/schemas/FailResponse" "500": description: 서버 내부 오류 content: application/json: schema: $ref: "#/components/schemas/FailResponse" /v1/api/auth/refresh: post: tags: [Auth] summary: 토큰 갱신 description: Refresh Token을 사용하여 Access Token을 갱신합니다. requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/RefreshTokenRequest" responses: "200": description: 갱신 성공 content: application/json: schema: $ref: "#/components/schemas/ApiResponseAuthToken" "401": description: 유효하지 않은 토큰 content: application/json: schema: $ref: "#/components/schemas/FailResponse" /v1/api/auth/signout: post: tags: [Auth] summary: 로그아웃 description: 로그아웃을 수행합니다. security: - bearerAuth: [] responses: "200": description: 로그아웃 성공 content: application/json: schema: $ref: "#/components/schemas/ApiResponseEmpty" /v1/api/user: get: tags: - User summary: 사용자 프로필 조회 description: 로그인한 사용자의 프로필 정보를 조회합니다. security: - bearerAuth: [] responses: "200": description: 유저 프로필 조회 성공 content: application/json: schema: $ref: "#/components/schemas/ApiResponseUserProfile" "401": description: 인증 오류 content: application/json: schema: $ref: "#/components/schemas/FailResponse" "500": description: 서버 내부 오류 content: application/json: schema: $ref: "#/components/schemas/FailResponse" patch: tags: - User summary: 사용자 정보 수정 description: 로그인한 사용자의 프로필 정보를 수정합니다. security: - bearerAuth: [] requestBody: required: true content: application/json: schema: type: object properties: name: type: string description: 사용자 이름 example: "김서준" avatar: type: string description: 선택한 아바타 example: "AVATAR2" gender: type: string description: 성별 enum: - MALE - FEMALE example: "MALE" mbti: type: string description: MBTI example: "INTP" intonation: type: string description: AI 말투 enum: - FRIENDLY - NORMAL - FORMAL example: "NORMAL" responses: "200": description: 정보 수정 성공 content: application/json: schema: $ref: "#/components/schemas/ApiResponseUserProfile" "500": description: 서버 내부 오류 content: application/json: schema: $ref: "#/components/schemas/FailResponse" /v1/api/room: get: tags: [Room] summary: 메인 페이지 조회 description: 사용자의 메인 페이지 정보(채팅방 목록 등)를 조회합니다. security: - bearerAuth: [] responses: "200": description: 조회 성공 content: application/json: schema: $ref: "#/components/schemas/ApiResponseMainPage" "401": description: 인증 실패 content: application/json: schema: $ref: "#/components/schemas/FailResponse" /v1/api/room/archived: get: tags: [Room] summary: 보관함 조회 description: 보관된 채팅방 목록을 조회합니다. security: - bearerAuth: [] responses: "200": description: 조회 성공 content: application/json: schema: $ref: "#/components/schemas/ApiResponseArchivedRooms" "401": description: 인증 실패 content: application/json: schema: $ref: "#/components/schemas/FailResponse" /v1/api/room/{roomId}/detail: get: tags: [Room] summary: 채팅 상세 조회 description: 특정 채팅방의 상세 정보와 이미지를 조회합니다. security: - bearerAuth: [] parameters: - name: roomId in: path required: true schema: type: integer description: 채팅방 ID responses: "200": description: 조회 성공 content: application/json: schema: $ref: "#/components/schemas/ApiResponseChatDetail" "404": description: 채팅방 없음 content: application/json: schema: $ref: "#/components/schemas/FailResponse" /v1/api/room/{roomId}: delete: tags: [Room] summary: 채팅방 삭제 description: 특정 채팅방을 삭제합니다. security: - bearerAuth: [] parameters: - name: roomId in: path required: true schema: type: integer description: 채팅방 ID responses: "200": description: 삭제 성공 content: application/json: schema: type: object properties: resultType: type: string example: SUCCESS success: type: object properties: roomId: type: integer example: 1 /v1/api/room/{roomId}/archive: patch: tags: [Room] summary: 채팅방 보관 description: 특정 채팅방을 보관함으로 이동시킵니다. security: - bearerAuth: [] parameters: - name: roomId in: path required: true schema: type: integer description: 채팅방 ID responses: "200": description: 보관 성공 content: application/json: schema: type: object properties: resultType: type: string example: SUCCESS success: type: object properties: roomId: type: integer example: 1 /v1/api/room/{roomId}/relief: patch: tags: [Room] summary: 안심지수 수정 description: 특정 채팅방의 안심지수를 수정합니다. security: - bearerAuth: [] parameters: - name: roomId in: path required: true schema: type: integer description: 채팅방 ID requestBody: required: true content: application/json: schema: type: object required: - reliefGauge properties: reliefGauge: type: integer example: 80 description: 수정할 안심지수 (0-100) responses: "200": description: 수정 성공 content: application/json: schema: type: object properties: resultType: type: string example: SUCCESS success: type: object properties: roomId: type: integer example: 1 reliefGauge: type: integer example: 80 /v1/api/analysis: post: tags: [Analysis] summary: 상황 분석 생성 description: 이미지와 질문, 관계 정보 등을 기반으로 상황을 분석하고 채팅방을 생성합니다. (multipart/form-data) security: - bearerAuth: [] requestBody: required: true content: multipart/form-data: schema: type: object required: - mbti - gauge - relation - question properties: mbti: type: string example: "INTP" description: 상대방 MBTI gauge: type: integer example: 50 description: 현재 갈등 지수 relation: type: string example: "연인" description: 상대방과의 관계 question: type: string example: "이 상황에서 어떻게 해야 할까요?" description: 질문 내용 images: type: array items: type: string format: binary description: 업로드할 이미지 파일들 responses: "201": description: 생성 성공 content: application/json: schema: $ref: "#/components/schemas/ApiResponseAnalysisCreate" /v1/api/analysis/{analysisId}: get: tags: [Analysis] summary: 분석 결과 조회 description: 특정 분석 ID의 분석 결과를 조회합니다. security: - bearerAuth: [] parameters: - name: analysisId in: path required: true schema: type: integer description: 분석 ID responses: "200": description: 조회 성공 content: application/json: schema: $ref: "#/components/schemas/ApiResponseAnalysis" "404": description: 분석 결과 없음 content: application/json: schema: $ref: "#/components/schemas/FailResponse" /v1/api/chats/{chatId}/answers: post: tags: [Chat] summary: AI 답변 생성 description: 채팅 분석 ID와 채팅방 ID를 기반으로 AI 답변을 생성하는 API입니다. security: - bearerAuth: [] parameters: - name: chatId in: path required: true schema: type: integer description: 채팅 ID requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateAnswerRequest" example: chatAnalysisId: 1 roomId: 1 responses: "200": description: 답변 생성 성공 content: application/json: schema: $ref: "#/components/schemas/ApiResponseAnswer" "400": description: 필수 값 누락 content: application/json: schema: $ref: "#/components/schemas/FailResponse" "404": description: 데이터 찾을 수 없음 content: application/json: schema: $ref: "#/components/schemas/FailResponse" "500": description: 서버 내부 오류 content: application/json: schema: $ref: "#/components/schemas/FailResponse" get: tags: [Chat] summary: AI 채팅 답변 조회 description: 특정 채팅 ID의 AI 답변을 조회하는 API입니다. security: - bearerAuth: [] parameters: - name: chatId in: path required: true schema: type: integer description: 조회할 채팅 ID responses: "200": description: 답변 조회 성공 content: application/json: schema: $ref: "#/components/schemas/ApiResponseAnswer" "404": description: 답변 없음 content: application/json: schema: $ref: "#/components/schemas/FailResponse" /v1/api/chats/{chatId}/answers/{answerId}: patch: tags: [Chat] summary: AI 답변 수정 description: 사용자가 생성된 AI 답변을 직접 수정하는 API입니다. 자신이 속한 채팅방의 답변만 수정 가능합니다. security: - bearerAuth: [] parameters: - name: chatId in: path required: true schema: type: integer description: 채팅 ID - name: answerId in: path required: true schema: type: integer description: 수정할 답변 ID requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UpdateAnswerRequest" responses: "200": description: 답변 수정 성공 content: application/json: schema: $ref: "#/components/schemas/ApiResponseAnswer" "403": description: 권한 없음 content: application/json: schema: $ref: "#/components/schemas/FailResponse" "404": description: 답변을 찾을 수 없음 content: application/json: schema: $ref: "#/components/schemas/FailResponse" /v1/api/chats/{chatId}/answers/feedback: post: tags: [Chat] summary: AI 답변 피드백 생성 description: 특정 채팅 ID에 대한 AI 답변 피드백을 생성하는 API입니다. security: - bearerAuth: [] parameters: - name: chatId in: path required: true schema: type: integer description: 채팅 ID requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateFeedbackRequest" responses: "200": description: 피드백 생성 성공 content: application/json: schema: $ref: "#/components/schemas/ApiResponseFeedback" "404": description: 데이터 찾을 수 없음 content: application/json: schema: $ref: "#/components/schemas/FailResponse" get: tags: [Chat] summary: 답변 피드백 조회 description: 특정 채팅 ID에 대한 AI 답변 피드백들을 전체 조회하는 API입니다. security: - bearerAuth: [] parameters: - name: chatId in: path required: true schema: type: integer description: 조회할 채팅 ID responses: "200": description: 피드백 조회 성공 content: application/json: schema: type: object properties: resultType: type: string example: SUCCESS error: type: object nullable: true example: null success: type: array items: type: object properties: id: type: integer example: 1 comments: type: string example: "아진짜 몇번쨰냐 니..." good: type: string example: "좋은 점..." bad: type: string example: "나쁜 점..." createdAt: type: string format: date-time example: "2026-01-10T18:23:57.515Z" chatId: type: integer example: 1 "404": description: 채팅을 찾을 수 없음 content: application/json: schema: $ref: "#/components/schemas/FailResponse" /v1/api/ai/genai: post: tags: [AI] summary: AI 테스트 (Raw) description: AI에게 메시지를 보내고 응답을 받습니다. (테스트용) security: - bearerAuth: [] requestBody: required: true content: application/json: schema: type: object properties: message: type: string example: "안녕, 너는 누구니?" responses: "200": description: 성공 content: application/json: schema: type: object properties: type: type: string example: "SUCCESS" reply: type: string example: "저는 AI 어시스턴트입니다." components: securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT schemas: ################################ # Common Enums & Errors ################################ ErrorCode: type: string description: 서버 에러 코드 enum: - invalid_request - unauthorized - forbidden - not_access_token - not_refresh_token - not_found - duplicate_email - expired_access_token ################################ # Request DTOs ################################ SignUpRequest: type: object required: - email - name - password properties: email: type: string example: test@test.com name: type: string example: 홍길동 password: type: string example: password1234 SignInRequest: type: object required: - email - password properties: email: type: string example: test@test.com password: type: string example: password1234 RefreshTokenRequest: type: object required: - refreshToken properties: refreshToken: type: string example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9... CreateAnswerRequest: type: object required: - chatAnalysisId - roomId properties: chatAnalysisId: type: integer example: 1 description: 채팅분석 ID roomId: type: integer example: 1 description: 채팅방 ID CreateFeedbackRequest: type: object required: - chatAnalysisId - roomId - comments properties: chatAnalysisId: type: integer example: 1 description: 상황분석 ID값 roomId: type: integer example: 1 description: 채팅방 ID값 comments: type: string example: "아진짜 몇번쨰냐 니..." description: 사용자가 작성한 답변 값 UpdateAnswerRequest: type: object required: - answer properties: answer: type: string example: "수정된 답변 내용입니다." description: 수정할 답변 내용 ################################ # Response DTOs ################################ FailResponse: type: object properties: resultType: type: string example: FAIL error: type: object properties: errorCode: $ref: "#/components/schemas/ErrorCode" reason: type: string example: "필수 값이 누락되었습니다." data: type: object nullable: true example: null success: type: object nullable: true example: null ApiResponseEmpty: type: object properties: resultType: type: string example: SUCCESS success: type: object nullable: true example: null ApiResponseAuthToken: type: object properties: resultType: type: string example: SUCCESS success: type: object properties: accessToken: type: string refreshToken: type: string userId: type: integer createdAt: type: string format: date-time updatedAt: type: string format: date-time ApiResponseUserProfile: type: object properties: resultType: type: string example: SUCCESS success: type: object properties: userId: type: integer example: 1 email: type: string example: test@test.com name: type: string example: 홍길동 avatar: type: string example: "AVATAR1" mbti: type: string example: "INTP" gender: type: string example: "FEMALE" intonation: type: string example: "NORMAL" ApiResponseAnswer: type: object properties: resultType: type: string example: SUCCESS error: type: object nullable: true example: null success: type: object nullable: true properties: id: type: integer example: 3 answer: type: string example: "답변 내용..." createdAt: type: string format: date-time updatedAt: type: string format: date-time chatId: type: integer example: 1 ApiResponseFeedback: type: object properties: resultType: type: string example: SUCCESS error: type: object nullable: true example: null success: type: object nullable: true properties: id: type: integer example: 2 comments: type: string good: type: string bad: type: string createdAt: type: string format: date-time chatId: type: integer ApiResponseMainPage: type: object properties: resultType: type: string example: SUCCESS success: type: object properties: name: type: string example: "홍길동" rooms: type: array items: type: object properties: id: type: integer example: 1 title: type: string example: "채팅방 제목" body: type: string example: "채팅방 요약" gauge: type: integer example: 50 reliefGauge: type: integer example: 20 ApiResponseArchivedRooms: type: object properties: resultType: type: string example: SUCCESS success: type: object properties: rooms: type: array items: type: object properties: id: type: integer title: type: string body: type: string gauge: type: integer reliefGauge: type: integer ApiResponseChatDetail: type: object properties: resultType: type: string example: SUCCESS success: type: object properties: relation: type: string example: "연인" images: type: array items: type: object properties: chatId: type: integer imageId: type: integer imageUrl: type: string createdAt: type: string format: date-time ApiResponseAnalysis: type: object properties: resultType: type: string example: SUCCESS success: type: object properties: id: type: integer currentStatus: type: string myMood: type: string partnerMood: type: string aiAnalysis: type: string recommendation: type: string chatId: type: integer createdAt: type: string format: date-time ApiResponseAnalysisCreate: type: object properties: resultType: type: string example: SUCCESS success: type: object properties: analysis: $ref: "#/components/schemas/ApiResponseAnalysis/properties/success" room: type: object properties: id: type: integer title: type: string body: type: string