diff --git a/samples/rest-notes-spring-data-rest/src/test/java/com/example/notes/ApiDocumentation.java b/samples/rest-notes-spring-data-rest/src/test/java/com/example/notes/ApiDocumentation.java index f58d92ad..cfa00bde 100644 --- a/samples/rest-notes-spring-data-rest/src/test/java/com/example/notes/ApiDocumentation.java +++ b/samples/rest-notes-spring-data-rest/src/test/java/com/example/notes/ApiDocumentation.java @@ -44,7 +44,7 @@ import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.SpringApplicationConfiguration; import org.springframework.hateoas.MediaTypes; -import org.springframework.restdocs.payload.FieldType; +import org.springframework.restdocs.payload.JsonFieldType; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; @@ -279,8 +279,8 @@ public class ApiDocumentation { .andExpect(status().isNoContent()) .andDo(document("note-update-example", requestFields( - fieldWithPath("title").description("The title of the note").type(FieldType.STRING).optional(), - fieldWithPath("body").description("The body of the note").type(FieldType.STRING).optional(), + fieldWithPath("title").description("The title of the note").type(JsonFieldType.STRING).optional(), + fieldWithPath("body").description("The body of the note").type(JsonFieldType.STRING).optional(), fieldWithPath("tags").description("An array of tag resource URIs").optional()))); } diff --git a/samples/rest-notes-spring-hateoas/src/test/java/com/example/notes/ApiDocumentation.java b/samples/rest-notes-spring-hateoas/src/test/java/com/example/notes/ApiDocumentation.java index c8c7dca2..1bf10810 100644 --- a/samples/rest-notes-spring-hateoas/src/test/java/com/example/notes/ApiDocumentation.java +++ b/samples/rest-notes-spring-hateoas/src/test/java/com/example/notes/ApiDocumentation.java @@ -44,7 +44,7 @@ import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.SpringApplicationConfiguration; import org.springframework.hateoas.MediaTypes; -import org.springframework.restdocs.payload.FieldType; +import org.springframework.restdocs.payload.JsonFieldType; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.web.servlet.MockMvc; @@ -267,8 +267,8 @@ public class ApiDocumentation { .andExpect(status().isNoContent()) .andDo(document("note-update-example", requestFields( - fieldWithPath("title").description("The title of the note").type(FieldType.STRING).optional(), - fieldWithPath("body").description("The body of the note").type(FieldType.STRING).optional(), + fieldWithPath("title").description("The title of the note").type(JsonFieldType.STRING).optional(), + fieldWithPath("body").description("The body of the note").type(JsonFieldType.STRING).optional(), fieldWithPath("tags").description("An array of tag resource URIs").optional()))); }