-
Notifications
You must be signed in to change notification settings - Fork 2
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
Spring REST Docs 설정을 추가하라 #32
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.
코드의 수정 사항은 없어서, comment 달아주시고 merge 해주시면 됩니다!! 💯
@@ -0,0 +1,187 @@ | |||
= Caregiver Salrong API Document |
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.
와우 👍 👍
|
||
=== HTTP Status | ||
|
||
link:https://tools.ietf.org/html/rfc7231#section-6[RFC7231] 에 많은 HTTP 응답코드가 정의되어 있지만, 너무 많은 응답코드는 개발자에서 혼란을 초래한다. |
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.
|=== | ||
|
||
NOTE: link:https://tools.ietf.org/html/rfc7231[RFC7231], link:https://ko.wikipedia.org/wiki/HTTP[위키백과] 에 근거하여 HTTP GET Method 에는 Request Body를 포함하지 않는다. | ||
이러한 이유로 인해 조회 성격의 API 이지만 조회 쿼리가 복잡할 경우 POST Method 를 사용할 수 있다. |
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.
👍
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.
어제 이거 관련해서 좀 찾아보다가 재미있는걸 찾았습니다.
가장 표를 많이 받은 글내용을 보면 GET 메서드에서 body를 사용해도된다라는 의견으로 이해가 되는데요.
@yongjin5184 님 의견은 어떠신가요?
|=== | ||
| Field | Type | Description | ||
|
||
| `success` |
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.
성공여부를 body 에 내려주는 이유가 뭔지 여쭤봐도 될까요~? 🤔
Http Status 만으로는 판단하기 어려운 경우가 있나요~?
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.
네 맞아요 http status
로 만으로도 API 의 성공여부를 판단할 수 있습니다.
제가 success
필드를 추가한 이유는 클라이언트입장에서는 http status
로 성공여부를 판단하는 거는
너무 많은 경우를 주는게 아닌가 라는 생각이 들어서 추가를 하였습니다.
@onemask 님 의견을 들어보면 좋을거같아요.
불필요한 필드라면 제거해도 좋습니다
해당 PR은 승인이 완료되었다고 판단되어 머지하도록 하겠습니다. |
작업 내용
gradlew applications:client-api:clean applications:client-api:build
명령어를 실행 후 생성된 jar 파일을 java -jar xxx.jar 로 실행 할 경우 아래 이미지를 확인 가능합니다.