Open
Conversation
- 스프린트 미션#4에서 구현한 API를 RESTful API로 다시 설계 - 공통 성공 응답모델(SuccessResponse)을 컨트롤러에 적용하기 - Service 레벨에서 예외처리 하는 부분에 BusinessLogicException 적용하기 - GlobalHandlerException 작성 - springdoc-openapi를 활용하여 Swagger 기반의 API 문서를 생성
- 프론트에서 이 형태를 받지 않으므로 제거했습니다.
- 이전 미션에 남겨주신 내용에 따라 파일 확장자를 스펙에 맞게 변경
- 공통사항 - 파일 이름 앞에 랜덤한 UUID를 붙여 파일 이름이 중복되지 않도록 하였습니다. - 첨부파일이 존재하는지를 service에서 확인하도록 했습니다. - BasicMessageService - 여러 첨부파일을 저장할 수 있도록 기존의 코드를 활용하여 작성했습니다.
- Swagger에서 multipart/form-data로 request를 날릴 때 Octet-Stream 문제가 발생함 - 이를 해겷하기 위해 Octet-Stream을 처리하는 코드를 작성
- 참가자 검증은 private channel에서만 하도록 함 - readStatus 생성을 서버가 아닌 프론트에게 맡김
- 엔티티 리턴에서 DTO 리턴으로 변경
- mapper를 통해 코드를 분리
- 회원가입, 회원정보 수정, 메시지 전송에서 첨부파일을 저장하는 코드가 중복됨 - 이를 AttachmentUtil 클래스를 통해 분리함 - 또한 첨부파일 저장 경로를 application.yml에 분리함
- PATCH /api/users/{userId}의 응답 형태 수정
- ChannelPatchDto(ChannelUpdateRequest) 필드 수정
- Bean Validation을 이용하여 요청과 관련된 DTO의 필드에 대해 유효성 검사를 하도록 수정
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.
요구사항
기본
스프린트 미션#4에서 구현한 API를 RESTful API로 다시 설계해보세요.
BusinessLogicException적용하기Postman을 활용해 컨트롤러를 테스트 하세요.
springdoc-openapi를 활용하여 Swagger 기반의 API 문서를 생성하세요.
Swagger-UI를 활용해 API를 테스트해보세요.
심화
Settings > Network섹션에서Generate Domain버튼을 통해 도메인을 생성하세요.스크린샷
멘토에게