openapi: 3.0.3 info: title: AI Portfolio Backend API description: | AI Portfolio 프로젝트의 백엔드 API 명세서입니다. ## 주요 기능 - 포트폴리오 데이터 조회 (프로젝트, 경험, 자격증, 교육) - AI 챗봇 인터페이스 - 기술 스택 관리 - GitHub 프로젝트 연동 - 관리자 기능 (인증, 프로젝트 관리, 이미지 업로드, 캐시 관리) ## 인증 관리자 기능(/api/admin/*)은 세션 기반 인증이 필요합니다. version: 1.0.0 contact: name: API Support email: support@example.com license: name: MIT url: https://opensource.org/licenses/MIT servers: - url: http://localhost:8080 description: 로컬 개발 서버 - url: https://api.example.com description: 프로덕션 서버 tags: - name: Portfolio Data description: 포트폴리오 데이터 조회 API - name: Chat description: AI 챗봇 API - name: GitHub description: GitHub 프로젝트 연동 API - name: Tech Stack description: 기술 스택 메타데이터 API - name: Admin - Auth description: 관리자 인증 API - name: Admin - Projects description: 관리자 프로젝트 관리 API - name: Admin - Upload description: 관리자 이미지 업로드 API - name: Admin - Cache description: 관리자 캐시 관리 API - name: Health description: 헬스체크 API paths: # ==================== Portfolio Data API ==================== /api/data/all: get: tags: - Portfolio Data summary: 모든 포트폴리오 데이터 조회 description: 프로젝트, 경험, 자격증, 교육 등 모든 포트폴리오 데이터를 한 번에 조회합니다. operationId: getAllData responses: '200': description: 성공 content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: data: type: object properties: projects: type: array items: $ref: '#/components/schemas/Project' experiences: type: array items: $ref: '#/components/schemas/Experience' certifications: type: array items: $ref: '#/components/schemas/Certification' education: type: array items: $ref: '#/components/schemas/Education' '500': $ref: '#/components/responses/InternalServerError' /api/data/projects: get: tags: - Portfolio Data summary: 프로젝트 목록 조회 description: 모든 프로젝트 정보를 조회합니다. operationId: getProjects responses: '200': description: 성공 content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: data: type: array items: $ref: '#/components/schemas/Project' '500': $ref: '#/components/responses/InternalServerError' /api/data/experiences: get: tags: - Portfolio Data summary: 경험 목록 조회 description: 모든 경험 정보를 조회합니다. operationId: getExperiences responses: '200': description: 성공 content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: data: type: array items: $ref: '#/components/schemas/Experience' '500': $ref: '#/components/responses/InternalServerError' /api/data/certifications: get: tags: - Portfolio Data summary: 자격증 목록 조회 description: 모든 자격증 정보를 조회합니다. operationId: getCertifications responses: '200': description: 성공 content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: data: type: array items: $ref: '#/components/schemas/Certification' '500': $ref: '#/components/responses/InternalServerError' /api/data/education: get: tags: - Portfolio Data summary: 교육 목록 조회 description: 모든 교육 정보를 조회합니다. operationId: getEducation responses: '200': description: 성공 content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: data: type: array items: $ref: '#/components/schemas/Education' '500': $ref: '#/components/responses/InternalServerError' # ==================== Chat API ==================== /api/chat/message: post: tags: - Chat summary: 챗봇 메시지 전송 description: AI 챗봇에게 메시지를 보내고 응답을 받습니다. operationId: sendChatMessage requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ChatRequest' responses: '200': description: 성공 content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: data: $ref: '#/components/schemas/ChatResponse' '500': $ref: '#/components/responses/InternalServerError' /api/chat/health: get: tags: - Chat summary: 챗봇 서비스 상태 확인 description: 챗봇 서비스가 정상적으로 작동하는지 확인합니다. operationId: chatHealthCheck responses: '200': description: 성공 content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: data: type: string example: "Chatbot service is healthy" /api/chat/status: get: tags: - Chat summary: 사용량 제한 상태 확인 description: 현재 사용자의 챗봇 사용량 제한 상태를 확인합니다. operationId: getChatUsageStatus responses: '200': description: 성공 content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: data: type: object '500': $ref: '#/components/responses/InternalServerError' # ==================== GitHub API ==================== /api/github/projects: get: tags: - GitHub summary: GitHub 프로젝트 목록 조회 description: GitHub에서 사용자의 프로젝트 목록을 조회합니다. operationId: getGitHubProjects responses: '200': description: 성공 content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: data: type: array items: $ref: '#/components/schemas/Project' '500': $ref: '#/components/responses/InternalServerError' /api/github/project/{repoName}: get: tags: - GitHub summary: GitHub 프로젝트 상세 조회 description: 특정 GitHub 저장소의 상세 정보를 조회합니다. operationId: getGitHubProject parameters: - name: repoName in: path required: true description: 저장소 이름 schema: type: string responses: '200': description: 성공 content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: data: $ref: '#/components/schemas/Project' '404': description: 프로젝트를 찾을 수 없음 '500': $ref: '#/components/responses/InternalServerError' # ==================== Tech Stack API ==================== /api/tech-stack: get: tags: - Tech Stack summary: 모든 활성화된 기술 스택 조회 description: 모든 활성화된 기술 스택 메타데이터를 조회합니다. operationId: getAllTechStack responses: '200': description: 성공 content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: data: type: array items: $ref: '#/components/schemas/TechStackMetadata' '500': $ref: '#/components/responses/InternalServerError' post: tags: - Tech Stack summary: 기술 스택 생성 description: 새로운 기술 스택 메타데이터를 생성합니다. operationId: createTechStack requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/TechStackMetadata' responses: '200': description: 성공 content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: data: $ref: '#/components/schemas/TechStackMetadata' '400': $ref: '#/components/responses/BadRequest' '500': $ref: '#/components/responses/InternalServerError' /api/tech-stack/core: get: tags: - Tech Stack summary: 핵심 기술 스택 조회 description: 핵심 기술 스택 메타데이터만 조회합니다. operationId: getCoreTechStack responses: '200': description: 성공 content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: data: type: array items: $ref: '#/components/schemas/TechStackMetadata' '500': $ref: '#/components/responses/InternalServerError' /api/tech-stack/{name}: get: tags: - Tech Stack summary: 기술 스택 상세 조회 description: 기술명으로 기술 스택 메타데이터를 조회합니다. operationId: getTechStackByName parameters: - name: name in: path required: true description: 기술 스택 이름 schema: type: string responses: '200': description: 성공 content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: data: $ref: '#/components/schemas/TechStackMetadata' '404': description: 기술 스택을 찾을 수 없음 '500': $ref: '#/components/responses/InternalServerError' put: tags: - Tech Stack summary: 기술 스택 수정 description: 기술 스택 메타데이터를 수정합니다. operationId: updateTechStack parameters: - name: name in: path required: true description: 기술 스택 이름 schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/TechStackMetadata' responses: '200': description: 성공 content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: data: $ref: '#/components/schemas/TechStackMetadata' '400': $ref: '#/components/responses/BadRequest' '500': $ref: '#/components/responses/InternalServerError' delete: tags: - Tech Stack summary: 기술 스택 삭제 description: 기술 스택 메타데이터를 삭제합니다. operationId: deleteTechStack parameters: - name: name in: path required: true description: 기술 스택 이름 schema: type: string responses: '200': description: 성공 content: application/json: schema: $ref: '#/components/schemas/ApiResponse' '400': $ref: '#/components/responses/BadRequest' '500': $ref: '#/components/responses/InternalServerError' /api/tech-stack/statistics: get: tags: - Tech Stack summary: 기술 스택 통계 조회 description: 기술 스택의 카테고리별, 레벨별 통계 정보를 조회합니다. operationId: getTechStackStatistics responses: '200': description: 성공 content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: data: $ref: '#/components/schemas/TechStackStatistics' '500': $ref: '#/components/responses/InternalServerError' # ==================== Admin Auth API ==================== /api/admin/auth/login: post: tags: - Admin - Auth summary: 관리자 로그인 description: 관리자 계정으로 로그인합니다. 세션 기반 인증을 사용합니다. operationId: adminLogin requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AdminLoginRequest' responses: '200': description: 로그인 성공 content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: data: $ref: '#/components/schemas/AdminUserInfo' '401': description: 인증 실패 '500': $ref: '#/components/responses/InternalServerError' /api/admin/auth/logout: post: tags: - Admin - Auth summary: 관리자 로그아웃 description: 관리자 로그아웃 및 세션 종료 operationId: adminLogout responses: '200': description: 로그아웃 성공 content: application/json: schema: $ref: '#/components/schemas/ApiResponse' /api/admin/auth/session: get: tags: - Admin - Auth summary: 세션 상태 확인 description: 현재 세션이 유효한지 확인합니다. operationId: checkAdminSession responses: '200': description: 세션 유효 content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: data: $ref: '#/components/schemas/AdminUserInfo' '401': description: 세션 무효 또는 만료 # ==================== Admin Projects API ==================== /api/admin/projects: get: tags: - Admin - Projects summary: 프로젝트 목록 조회 (관리자) description: 관리자용 프로젝트 목록 조회. 필터링, 정렬, 페이징 지원. operationId: getAdminProjects security: - sessionAuth: [] parameters: - name: search in: query description: 검색 키워드 schema: type: string - name: isTeam in: query description: 팀 프로젝트 여부 (true/false) schema: type: string - name: projectType in: query description: 프로젝트 타입 schema: type: string - name: status in: query description: 프로젝트 상태 schema: type: string - name: techs in: query description: 기술 스택 필터 schema: type: array items: type: string - name: sortBy in: query description: 정렬 기준 schema: type: string default: sortOrder - name: sortOrder in: query description: 정렬 순서 schema: type: string enum: [asc, desc] default: asc - name: page in: query description: 페이지 번호 schema: type: integer default: 0 - name: size in: query description: 페이지 크기 schema: type: integer default: 20 responses: '200': description: 성공 content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: data: type: array items: $ref: '#/components/schemas/ProjectResponse' '401': $ref: '#/components/responses/Unauthorized' post: tags: - Admin - Projects summary: 프로젝트 생성 description: 새로운 프로젝트를 생성합니다. operationId: createAdminProject security: - sessionAuth: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ProjectCreateRequest' responses: '200': description: 생성 성공 content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: data: $ref: '#/components/schemas/ProjectResponse' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' /api/admin/projects/{id}: get: tags: - Admin - Projects summary: 프로젝트 상세 조회 (관리자) description: 특정 프로젝트의 상세 정보를 조회합니다. operationId: getAdminProject security: - sessionAuth: [] parameters: - name: id in: path required: true description: 프로젝트 ID schema: type: string responses: '200': description: 성공 content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: data: $ref: '#/components/schemas/ProjectResponse' '401': $ref: '#/components/responses/Unauthorized' '404': description: 프로젝트를 찾을 수 없음 put: tags: - Admin - Projects summary: 프로젝트 수정 description: 프로젝트 정보를 수정합니다. operationId: updateAdminProject security: - sessionAuth: [] parameters: - name: id in: path required: true description: 프로젝트 ID schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ProjectUpdateRequest' responses: '200': description: 수정 성공 content: application/json: schema: allOf: - $ref: '#/components/schemas/ApiResponse' - type: object properties: data: $ref: '#/components/schemas/ProjectResponse' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': description: 프로젝트를 찾을 수 없음 delete: tags: - Admin - Projects summary: 프로젝트 삭제 description: 프로젝트를 삭제합니다. operationId: deleteAdminProject security: - sessionAuth: [] parameters: - name: id in: path required: true description: 프로젝트 ID schema: type: string responses: '200': description: 삭제 성공 content: application/json: schema: $ref: '#/components/schemas/ApiResponse' '401': $ref: '#/components/responses/Unauthorized' '404': description: 프로젝트를 찾을 수 없음 # ==================== Health Check API ==================== /health: get: tags: - Health summary: 서비스 헬스 체크 description: 서비스의 건강 상태를 확인합니다. operationId: healthCheck responses: '200': description: 서비스 정상 content: application/json: schema: type: object properties: status: type: string example: UP # ==================== Components ==================== components: securitySchemes: sessionAuth: type: apiKey in: cookie name: JSESSIONID description: 세션 기반 인증 schemas: ApiResponse: type: object properties: success: type: boolean description: 요청 성공 여부 message: type: string description: 응답 메시지 data: type: object description: 응답 데이터 (타입은 엔드포인트마다 다름) error: type: string description: 에러 상세 정보 (실패시에만) Project: type: object properties: id: type: string description: 프로젝트 ID title: type: string description: 프로젝트 제목 description: type: string description: 프로젝트 설명 status: type: string description: 프로젝트 상태 imageUrl: type: string description: 프로젝트 이미지 URL githubUrl: type: string description: GitHub 저장소 URL liveUrl: type: string description: 라이브 데모 URL technologies: type: array items: type: string description: 사용 기술 목록 startDate: type: string format: date description: 시작일 endDate: type: string format: date description: 종료일 isTeam: type: boolean description: 팀 프로젝트 여부 projectType: type: string description: 프로젝트 타입 Experience: type: object properties: id: type: string company: type: string description: 회사명 position: type: string description: 직책 description: type: string description: 업무 설명 startDate: type: string format: date endDate: type: string format: date isCurrent: type: boolean description: 현재 근무 중 여부 Certification: type: object properties: id: type: string name: type: string description: 자격증명 issuer: type: string description: 발급기관 issueDate: type: string format: date expiryDate: type: string format: date Education: type: object properties: id: type: string school: type: string description: 학교명 degree: type: string description: 학위 major: type: string description: 전공 startDate: type: string format: date endDate: type: string format: date description: type: string ChatRequest: type: object required: - question properties: question: type: string description: 사용자 질문 example: "당신의 주요 기술 스택은 무엇인가요?" selectedProject: type: string description: 선택된 프로젝트 (옵션) ChatResponse: type: object properties: response: type: string description: 챗봇 응답 success: type: boolean description: 응답 성공 여부 responseType: type: string description: 응답 타입 enum: - SUCCESS - SPAM_DETECTED - RATE_LIMITED - SYSTEM_ERROR reason: type: string description: 실패 이유 (실패시) error: type: string description: 에러 메시지 (에러시) showEmailButton: type: boolean description: 이메일 버튼 표시 여부 TechStackMetadata: type: object properties: name: type: string description: 기술명 (고유 식별자) example: "react" displayName: type: string description: 표시명 example: "React" category: type: string description: 카테고리 example: "Frontend" level: type: string description: 숙련도 enum: [EXPERT, INTERMEDIATE, BEGINNER] isCore: type: boolean description: 핵심 기술 여부 isActive: type: boolean description: 활성화 여부 iconUrl: type: string description: 아이콘 URL colorHex: type: string description: 색상 코드 example: "#61DAFB" description: type: string description: 설명 sortOrder: type: integer description: 정렬 순서 createdAt: type: string format: date-time updatedAt: type: string format: date-time TechStackStatistics: type: object properties: totalTechnologies: type: integer description: 전체 기술 수 coreTechnologies: type: integer description: 핵심 기술 수 activeTechnologies: type: integer description: 활성화된 기술 수 categoryCounts: type: array items: type: object properties: category: type: string count: type: integer levelCounts: type: array items: type: object properties: level: type: string count: type: integer AdminLoginRequest: type: object required: - username - password properties: username: type: string description: 관리자 아이디 password: type: string format: password description: 비밀번호 AdminUserInfo: type: object properties: id: type: integer description: 사용자 ID username: type: string description: 사용자명 email: type: string description: 이메일 roles: type: array items: type: string description: 권한 목록 ProjectCreateRequest: type: object required: - title - description properties: title: type: string description: 프로젝트 제목 description: type: string description: 프로젝트 설명 status: type: string description: 프로젝트 상태 imageUrl: type: string description: 이미지 URL githubUrl: type: string description: GitHub URL liveUrl: type: string description: 라이브 URL technologies: type: array items: type: string description: 사용 기술 startDate: type: string format: date endDate: type: string format: date isTeam: type: boolean projectType: type: string ProjectUpdateRequest: type: object properties: title: type: string description: type: string status: type: string imageUrl: type: string githubUrl: type: string liveUrl: type: string technologies: type: array items: type: string startDate: type: string format: date endDate: type: string format: date isTeam: type: boolean projectType: type: string ProjectResponse: allOf: - $ref: '#/components/schemas/Project' - type: object properties: createdAt: type: string format: date-time updatedAt: type: string format: date-time responses: BadRequest: description: 잘못된 요청 content: application/json: schema: $ref: '#/components/schemas/ApiResponse' example: success: false message: "잘못된 요청입니다" error: "Validation error" Unauthorized: description: 인증 필요 content: application/json: schema: $ref: '#/components/schemas/ApiResponse' example: success: false message: "인증이 필요합니다" error: "Unauthorized" InternalServerError: description: 서버 오류 content: application/json: schema: $ref: '#/components/schemas/ApiResponse' example: success: false message: "서버 오류가 발생했습니다" error: "Internal server error"