restdoc .snippet

    IntelliJ Restdocs Unexpected token - .snippet 파일을 AsciiDoc로 인식하지 않을 때

    Restdocs 커스텀을 위하여 src/test/resources/org/springframework/restdocs/templates 경로에 snippet 파일을 추가하여 작성하면 다음처럼 인식이 되지 않아서 작성하기 힘든 경우가 생긴다. Unexpected token 빨간줄에, 문법 형식도 맞지 않게 작성된다. Intellij 설정을 바꾸면 해결된다. 해결법 Mac 기준 Preferences -> Editor -> File Types -> Recognized File Types Recognized File Types 에서 마우스 조금 내리다보면 AsciiDoc files보인다. File name patterns에 *.snippet 추가 writing AsciiDoc works best with sof..