feat(configuration): 파일 REST API 11종 구현 #26 - #59
Open
tlgms wants to merge 7 commits into
Hidden character warning
The head ref may contain hidden characters: "feat(document)-\ud30c\uc77c-rest-api-#26"
Open
Conversation
명세 #6, #7을 구현한다. fileName 미지정 시 applicants_yyyyMMdd.xlsx로 자동 생성하고, 지정 시 확장자가 .xlsx인지 검증한다. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
명세 #8을 구현한다. url 필드는 평문 S3 URL이 아니라 presigned URL로 발급한다. 증명사진은 개인정보이고, 버킷을 공개로 두면 키를 아는 누구나 열람할 수 있다. 응답 스키마는 명세 그대로 유지한다. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
명세 #9, #10을 구현한다. object_key에는 랜덤 토큰을 쓰고 attachmentId는 files의 PK로 발급한다. 키가 추측 불가능해지고, 업로드 전에 ID를 알아야 하는 순서 문제도 없다. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
명세 #11을 구현한다. ID 기반 조회라 요강 파일이 어느 prefix로 저장되었든 동작한다. 요강 업로드 API는 명세에 없어 미구현이다. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
멀티파트 한도를 21MB로 두어 카테고리별 도메인 규칙(최대 20MB)이 먼저 판정하도록 하고, 서블릿 컨테이너 한도는 백스톱으로 남긴다. ddl-auto가 validate이므로 files 테이블 DDL을 함께 추가한다. 마이그레이션 도구 도입 전까지 수기 적용이 필요하다. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
🚫 Excluded labels (none allowed) (2)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/api/document/v11/**경로로 구현합니다.files테이블 DDL을 추가합니다.Related Issue
Scope
configuration-adapter-in의document패키지,configuration-bootstrap설정Implementation
컨트롤러 6개로 11개 엔드포인트를 구현합니다.
ApplicationFileControllerAdmissionTicketControllerApplicantListControllerPhotoControllerAttachmentControllerGuidelineController경로 prefix — 명세의 document 경로(
/application,/photo등)에는/api/{service}/v11/이 없어 규약 §2 위반이고 Gateway 라우팅도 불가능합니다. prefix를 붙이되 도메인명(document)을 유지했습니다.부트스트랩 — 멀티파트 한도를 21MB로 두어 카테고리별 도메인 규칙(최대 20MB)이 먼저 판정하고, 서블릿 컨테이너 한도는 백스톱으로 남깁니다.
Testing
빌드와 도메인 테스트 12개 통과만 확인했습니다.
Deployment Notes
configuration-bootstrap/ddl/files.sql을 수기로 적용해야 합니다.ddl-auto: validate라 테이블이 없으면 기동에 실패합니다. 마이그레이션 도구 도입은 후속 이슈S3_BUCKET,AWS_REGION환경변수 주입 필요. 버킷과 IAM 권한(s3:PutObject,GetObject,HeadObject,DeleteObject)이 선행되어야 합니다Checklist
명세와 의도적으로 다르게 구현한 3곳 — 리뷰 필요
url(의존성 등록 과정 문서화 #8) — 평문 S3 URL 대신 presigned URL로 발급합니다. 증명사진은 개인정보인데 공개 버킷이면 키를 아는 누구나 열람할 수 있고, 비공개 버킷이면 명세대로는 아예 동작하지 않습니다. 응답 스키마(url필드)는 그대로 유지했습니다.200 + exists:false를 반환합니다. "다운로드가 아닌 조회 목적"이라는 명세 설명상 부재는 예외가 아니라 정상 결과입니다. 명세의FILE_NOT_FOUND행은 삭제가 필요합니다.attachmentId(docs(documents): 의존성 관리 구조 문서 추가 (#8) #9) —object_key에는 랜덤 토큰을 쓰고 ID는filesPK로 발급합니다. 명세 예시(attachment/attachment_1_guide.pdf)와 달리 키가 추측 불가능하고, 업로드 전에 ID를 알아야 하는 순서 문제도 없습니다.알려진 공백
guidelineId가 어떻게 생기는지 미정이라 다운로드만 구현했습니다. ID 기반 조회라 어느 prefix로 저장되든 동작합니다.인증컬럼이 11개 전부 공란이고 소비자가 모두 내부 서비스라 "내부 전용"으로 설계했습니다. 다만 이 전제가 코드로도 인프라로도 강제되어 있지 않고,systems/gateway도 아직 스캐폴딩입니다. 현재는 포트가 닿으면 누구나 파일을 올리고 presigned URL을 받을 수 있습니다. 네트워크 차단 + 서비스 간 공유 시크릿을 별도 이슈로 처리해야 합니다.contracts/proto/configuration.proto에 파일 RPC 추가가 선행되어야 하며, Admin의 파일 연동 전체가 여기에 막혀 있습니다.