docs: 부수효과를 일으키는 쪽에도 적는다 - #329
Open
sevineleven wants to merge 1 commit into
Open
Conversation
- 코스 삭제가 연차를 되돌린다는 것이 취소 API 설명에만 있었다. FE 는 삭제 API 문서만 보고 지나쳐 실서버를 찔러 확인했다. 부수효과는 그것을 일으키는 쪽에 적혀야 한다 - 삭제 문서에 두 가지를 적었다: 이 코스로 깎은 연차가 함께 돌아온다는 것, 그리고 #328 로 여행 결과 답변도 함께 지워진다는 것. 응답에 연차를 싣지 않는 이유도 — 삭제 뒤 화면은 목록으로 돌아가므로 거기서 다시 읽는다 - 차감 취소 문서에도 답변 삭제를 적었다. #328 이 동작을 바꿨는데 그쪽 *Api 문서는 안 고쳤다 — 내가 만든 공백이다. 그 코스가 "아직 답하지 않은" 으로 돌아가 모달이 다시 묻는다는 것까지 적었다 - trip-outcome 의 409 설명도 함께 고쳤다. "이미 답한 여행은 409" 가 이제 영구적이지 않다 — 차감을 취소하면 다시 답을 받는다 - 상태를 바꾸는 엔드포인트 23개를 같은 눈으로 훑었다. 탈퇴·로그아웃·기기해제·날짜수정은 이미 부수효과가 적혀 있어 손대지 않았다
|
Warning Review limit reachedNext included review available in 40 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
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.
Situation
DELETE /courses/{courseId}는 연차를 함께 되돌린다. 그런데 그 사실이 차감 취소 API 설명에만 적혀 있었다.삭제 API 문서만 보면 그 부수효과를 모르고 지나간다. FE 는 실서버를 찔러 확인했다.
그리고 어제 머지된 #328 이 그 자리를 하나 더 벌렸다 — 차감 취소가 여행 결과 답변까지 지우게 됐는데
*Api문서는 안 고쳤다. 내가 만든 공백이다.Task
부수효과는 그것을 일으키는 쪽에 적는다. 반대편에만 있으면 읽는 사람은 자기가 부르는 API 문서를 다 읽고도 모른다.
Action
삭제 API — 두 가지를 적었다
응답에 연차를 싣지 않는 이유도 적었다. 삭제 뒤 화면은 목록으로 돌아가므로 그 자리에서 다시 읽는다 — 차감 취소가 갱신된 연차를 돌려주는 것과 다른 점이라, 안 적으면 "왜 여기만 안 주지" 가 된다.
차감 취소 API — #328 이 바꾼 동작을 적었다
답변이 지워져 그 코스가 "아직 답하지 않은" 상태로 돌아간다는 것과, 그래서 모달이 다시 묻고
VISITED로 복원하거나NOT_VISITED로 확정할 수 있다는 것.trip-outcome의 409 — 이제 영구적이지 않다#328 이후 이 문장만 읽으면 틀린 그림이 된다. 차감을 취소하면 다시 답을 받는다는 것을 덧붙였다.
나머지는 손대지 않았다
이슈가 함께 요청한 "다른 상태 변경 엔드포인트도 같은 눈으로" 를 따라 23개를 전부 훑었다.
DELETE /users/me(탈퇴)POST /auth/logoutDELETE /devicesPATCH /courses/{courseId}(날짜 수정)POST /courses/{id}/trip-outcome고칠 곳은 코스 삭제 하나뿐이었다. 나머지는 이미 양쪽이 맞다.
Result
DELETE /courses/{courseId}문서만 보고도 연차가 돌아온다는 것과 답변이 지워진다는 것을 알 수 있다 — 이슈의 완료 기준이다.문서만 바뀌었고 동작은 그대로다. 테스트를 더하지 않은 이유가 그것이다.
연관 이슈