Skip to content
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

Merged
merged 78 commits into from
Feb 11, 2024
Merged

[#35] restdocs도입 #36

merged 78 commits into from
Feb 11, 2024

Conversation

jzakka
Copy link
Collaborator

@jzakka jzakka commented Feb 11, 2024

  • 현재까지 만들어진 모든 컨트롤러 메서드 문서화

jzakka added 30 commits February 8, 2024 14:00
- 테스트 추가
- 스케줄링 크론식 추가
- Add:여행일지 생성 예외 클래스
- Add:여행일지 조회 예외 클래스
@jzakka jzakka added the enhancement New feature or request label Feb 11, 2024
@jzakka jzakka requested a review from f-lab-moony February 11, 2024 12:51
@jzakka jzakka self-assigned this Feb 11, 2024
Copy link

Copy link
Collaborator

@f-lab-moony f-lab-moony left a 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()))
Copy link
Collaborator

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())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

근데 뭔가 restdocs를 쓰는데 코드가 되게 깔끔하군요 ..?
버전이 달라서 그런건가 ? 요거 문서 확인 해보셨을까요 ? 필드정보같은게 하나도 없어보여서 ..

Copy link
Collaborator Author

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"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

요거 한파일에 다 못 몰아두나요 ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

url마다 파일로 만들어서 index.html에서 참조하는 식으로 했는데 처음부터 한파일에 모아서 할 걸 그랬군요...!

@f-lab-moony f-lab-moony merged commit fc83b72 into main Feb 11, 2024
2 checks passed
@jzakka jzakka deleted the feature/35 branch February 12, 2024 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants