Repository navigation
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review: 2
Please check the settings in the CodeRabbit UI or the
|
hodoon
reviewed
Oct 21, 2026
hodoon
left a comment
Collaborator
There was a problem hiding this comment.
리뷰했습니다. 인라인 코멘트 확인 부탁드립니다.
업종 조회 실패도 같은 ILLEGAL_ARGUMENT로 나가서, 중복 검증이 빠진 코드에서도 테스트가 통과하던 문제를 막는다.
ysw789
force-pushed
the
fix/alt-297-qa-followup
branch
from
October 28, 2026 10:38
5230a96 to
bf154a3
Compare
ysw789
marked this pull request as ready for review
October 28, 2026 10:39
This branch has not been deployed
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.
요약
업장 등록 신청에서 같은 파일 ID를 등록증·신분증·위임장 중 두 칸 이상에 넣으면, 서버 내부 매핑에서 앞 역할이 뒤 역할로 덮어써져 필수 증빙 하나가 빠진 신청이 저장될 수 있었습니다. 이제 이런 요청은 저장 전에 400
B001로 거부합니다.요청·응답 필드는 바뀌지 않았습니다. DB 스키마 변경과 신규 ErrorCode도 없습니다. 운영 코드 변경은
CreateWorkspaceRequest의 검증 7줄과 Swagger 설명 2줄뿐입니다. 나머지는 기존 입력·업로드 검증이 앞으로도 바뀌지 않도록 단위 테스트로 고정한 것입니다.변경 내용
POST /app/workspace-requests,POST /manager/workspace-requests(CreateWorkspaceRequest)두 API는 같은 유스케이스를 쓰므로 동작이 같습니다.
workspaceCertFileId사업자등록증명원,workspaceOwnIdentityFileId대표자 신분증,workspaceWarrantFileId위임 확인서) 중 두 칸 이상이 같으면 400B001(ILLEGAL_ARGUMENT)을 반환합니다.증빙 서류는 역할별로 서로 다른 파일을 첨부해야 합니다.그대로 유지되는 규칙 (테스트로 고정)
bizName,brn,address,province,district,town,workspaceCertFileId,workspaceOwnIdentityFileId는 비우거나 공백만 넣을 수 없고,latitude,longitude,businessTypeId는 null일 수 없습니다. 어기면 400B001입니다.brn은 비어 있지만 않으면 형식을 따지지 않습니다.123-45-12345,1234512345,1,letters-123이 모두 통과합니다.B001입니다.POST /app/files,POST /manager/files,FileValidator)B022B023B024Swagger
UserWorkspaceRequestControllerSpec,ManagerWorkspaceRequestControllerSpec의 업장 등록 신청 400 설명에 "등록증·신분증·위임장에 같은 파일 ID 중복 첨부"를 추가했습니다. 두 Spec 모두 예시(example) 없이 설명만 쓰고 있어 같은 방식으로 맞췄습니다.프론트 영향
B001이 옵니다. 칸마다 따로 업로드한 파일 ID를 보내 주세요. 같은B001이 다른 입력 오류에도 쓰이므로, 화면 안내가 필요하면 message로 구분해야 합니다.FileValidator는 20MiB까지 허용하지만, 실제 HTTP 요청에서는application.yml의 multipart 상한(max-file-size,max-request-size모두 20MB)이 먼저 걸립니다. 20MiB를 넘는 파일은B024가 아니라 HTTP 413으로 거부됩니다. 요청 전체 크기도 20MB로 묶여 있어, 크기가 정확히 20MiB인 파일도 실제로는 413이 될 가능성이 큽니다(이 경계는 실제 요청으로 확인하지 않았습니다). 화면 안내는 "20MB 미만"으로 하는 것을 권장합니다.테스트
모두 Spring 컨텍스트나 DB 없이 도는 단위 테스트입니다.
CreateWorkspaceRequestTests(보강, Mockito)B001과 위 메시지로 거부되고, 신청 저장과 파일 연결이 일어나지 않는지 확인합니다. 업종 조회 실패도B001이라 처음에는 중복 검증이 없어도 통과할 수 있었는데, 이제 메시지까지 비교하므로 검증이 빠지면 실제로 실패합니다.WorkspaceRequestValidationTests(신규) — DTO 필수값·공백 거부,brn형식 미제한, 대표 이미지 5개 상한FileValidatorTests(신규) — 허용 MIME 5종의 20MiB 허용, 1바이트 초과 거부, 비허용·형식 없는 파일 거부, 빈 파일·파일 없음 거부FileUploadServiceTests(신규, Mockito) — 형식·크기 검증 실패 시 S3·DB 미호출, 정상 업로드의 PENDING 저장./gradlew test732건 통과(실패·에러·skip 0)남긴 것
병합 순서
base는
fix/alt-297-qa-followup이고, PR #108의 앞부분(연락처 정규화)입니다. PR #108을 먼저 병합한 뒤 이 PR을 병합해 주세요.관련 문서
추가 반영: 업로드 크기 한도 정리
spring.servlet.multipart.max-request-size를 20MB→25MB로 올렸습니다(max-file-size20MB 유지). 기존에는 multipart 경계·헤더가 요청 크기에 더해져 정확히 20MiB인 파일이 413으로 막혔습니다.GlobalExceptionHandler에MaxUploadSizeExceededException처리를 추가해, 한도 초과를 스프링 기본 413 대신 프로젝트 오류 형식의 400/B024로 응답합니다. 새 ErrorCode는 없습니다.POST /api/manager/files, 매니저 토큰): 정확히 20MiB(text/plain, S3 업로드 전 차단)→400/B023, 20MiB+1B·22MB·24MiB·26MiB(image/png)→모두 400/B024. 연결 끊김 없이 응답을 받았습니다. 정상 파일 업로드(S3)는 실행하지 않았습니다../gradlew clean build전체 733건 통과.client_max_body_size가 없어 1MB를 넘는 업로드가 nginx 413으로 막히던 문제를client_max_body_size 25m로 고쳤습니다(서버 설정 변경, 이 PR 코드와 무관). 운영 nginx는 아직 반영 전입니다.