Last active
August 29, 2015 14:23
-
-
Save warmuuh/15120d13e8fdabb476b3 to your computer and use it in GitHub Desktop.
documenting-and-testing-versioned-apis
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void user() throws Exception { | |
this.mockMvc | |
.perform(get("/user")) | |
.andExpect(status().isOk()) | |
.andDo(response() | |
.common(fieldWithPath("id").description("user-id"), | |
fieldWithPath("name").description("name of user")) | |
.v1( fieldWithPath("g").description("gender of the user")) | |
.v2( fieldWithPath("gender").description("gender of the user")) | |
.build()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment