
간단하게 외부 api 문서 작성할게 있어 도입하고 지속 활용해보기로 결정. 이전 기본 설정 이후 test class 작성. 하나 예시로 get 방식 api 활용. @Test public void getAlarmHistoryList() throws Exception { this.mockMvc.perform(RestDocumentationRequestBuilders.get("/external/getAlarmHistory/{startDate}/{endDate}", "20220629120000", "20220629120500") .accept(MediaType.APPLICATION_JSON)) .andDo(print()) .andExpect(status().isOk()) .andDo(document("alarm..

특징 1. 테스트 코드 기반으로 문서를 작성함. 2. 테스트 코드에서 명세를 작성하기 때문에 비즈니스 로직의 가독성에 영향을 미치지 않는다. maven dependecy, plugin 설정 org.springframework.restdocs spring-restdocs-mockmvc {project-version} test org.asciidoctor asciidoctor-maven-plugin 1.5.8 generate-docs prepare-package process-asciidoc html book org.springframework.restdocs spring-restdocs-asciidoctor {project-version} 작성된 doc을 jar에 package하기 위해 플러그인 추가 ma..