-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: post response 응답코드 swagger 명세 수정 #164
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오홍 수정되어야할부분 콕 찝어주셨군요 좋습니다
이미지는 url만 만드는거라서 201으로 하기엔 조금 애매한거같아요 200으로 충분한거같습니다
리액션도 요청할때마다 생성/삭제 가 반복되는 구조라서 200이 맞는거같습니다
코드 수정이 되어야할부분은 한번 알아보겠습니다
image는 image가 s3에 업로드가 되는게 서버입장에서 새로운 content가 created 된다고 생각해서 201로 작성하였습니다 |
네 이미지 api는 url만 만들어지는게 맞습니다 |
생각해보면 리액션은 추가랑 삭제가 동시에 있으니까 PUT 이 좀더 어울릴지도모르겠네요 |
Restful에 대해 얕은 지식이지만 restful하려면 post/delete로 분리되어야하는게 아닌가? 싶습니다 |
post/delete으로 하면, 프론트에서 post/delete를 번갈아서 보내줘야하는데 네트워크 지연이 생기면 중복해서 날아올수있어서 합친거같습니다. |
그러게요 저도 리엑션은 추가/삭제가 동시에 있어서 PUT이 맞다고 생각해요. |
post / put 사용방식 조금 더 찾아보니 이런 차이가 있었네요 POST
PUT
정리하고 보니 좋아요 누르는 건
POST가 맞는 것 같아요. 그렇담 저도 post delete 나누는 게 좋을 것 같긴 한데 순서 섞이는게 문제니... 정말 멘토님께 조언을... |
넵 맞습니다 저도 어제 찾아봤는데 post delete로 분리되는게 가장 확실하긴 한것같습니다 서비스상의 문제가 생길수있으니 그 문제를 해결하고 분리하면 좋을것 같습니다. |
프론트에서 잘 처리하면 괜찮을거같기도한데... 지금 프론트가 PC 개발하시는것도 벅찰거같은데 어떻게 하는게 좋을지 고민되네요... |
당장 급한 건 아니라서 이슈 남기고 다음에 변경해도 될듯요 |
금요일에 어떻게 할지 정하고 머지하시죠 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨습니다
근데 post / delete로 나눈다고 하더라도 완전 restful 하게 만들기는 어려울거 같네요 |
그러면 put / delete의 형태가 되어야겠군요 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
좋아요 👍
일단 코드는 그대로 두고, 프론트도 수정해야하니까 |
바뀐점
ApiOkResponse로 명세된 POST 응답들의 명세를 ApiCreatedResponse로 수정
바꾼이유
#162 /intra-auth 뿐만아닌 post 요청에서 201 응답이 날아오는 부분에 관한 명세를 알맞게 수정
설명
POST /intra-auth의 경우에는 상의 후 201로 명세를 표기 할 지 응답코드를 수정할지 결정