-
Notifications
You must be signed in to change notification settings - Fork 1
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
[#35] restdocs도입 #36
[#35] restdocs도입 #36
Conversation
jzakka
commented
Feb 11, 2024
- 현재까지 만들어진 모든 컨트롤러 메서드 문서화
- 테스트 추가 - 스케줄링 크론식 추가
- Add:여행일지 생성 예외 클래스 - Add:여행일지 조회 예외 클래스
- Add:여행일지 생성 예외 클래스 - Add:여행일지 조회 예외 클래스
|
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.
고생 많으셨습니다!
다음에 결과 확인 한번 해봐야겠네요..!
요건 테스트 & 문서작성이라 바로 머지 해 둘게요!
def parameterDescriptor = parameterWithName("feedId").description("id of feed") | ||
def writer = new AuthenticatedMember(1L, "test@email.com", "pwdpwdpwd123") | ||
def commentText = "This is comment" | ||
when(commentService.createComment(any(), any(), any())) |
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.
빈 모킹때문에 junit 쓸수밖에 없으셨던거같군요 .. 요런게 있긴 한데 굳이 안바꾸셔도 괜찮습니다 ㅋㅋ 지금도 나쁘지 않은 것 같아요..!
.with(authenticatedMember(writer))) | ||
.andDo(documentWithPath(parameterDescriptor)) | ||
then: | ||
response.andExpect(status().isOk()) |
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.
근데 뭔가 restdocs를 쓰는데 코드가 되게 깔끔하군요 ..?
버전이 달라서 그런건가 ? 요거 문서 확인 해보셨을까요 ? 필드정보같은게 하나도 없어보여서 ..
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.
https://65c95f79558605780a961456--sweet-shortbread-ea756b.netlify.app/
대강 이런식으로 만들어두긴 했습니다.
restdocs가 아직 익숙하지 않아서 뭔가 빠뜨린 게 있을 수도 있겠네요.
나머지 기능까지 다 만들어지면 그 때 문서화는 좀더 손보면 괜칞을 것 같습니다.
@@ -0,0 +1,2 @@ | |||
== Like a feed | |||
operation::like-controller-test/Cancel like[snippets="http-request,http-response,path-parameters"] |
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.
url마다 파일로 만들어서 index.html에서 참조하는 식으로 했는데 처음부터 한파일에 모아서 할 걸 그랬군요...!