반응형
에러 메시지 :
org.springframework.restdocs.snippet.SnippetException: The following parts of the payload were not documented

 

{
  "list" : [ {
    "name" : "ai1"
  }, {
    "name" : "ai2"
  }, {
    "name" : "ai5"
  }, {
    "name" : "ai8"
  } ]
}
 
원인 : 에러메세지 밑에 있는 필드를 restdocs로 작성하지 않았다 or 오타
 
해결 방법 : test에서 name이라는 필드의 값을 찾아서 추가 또는 수정해준다.

fieldWithPath("name").type(JsonFieldType.STRING).description("인공지능 인스턴스 이름"),

 
※ 단순히 restdocs에서 작성 하지 않은 것만 보여주는 것이다. 
반응형

+ Recent posts