Merge branch '1.2.x'
This commit is contained in:
@@ -103,6 +103,18 @@ public class RequestFieldsSnippetTests extends AbstractSnippetTests {
|
||||
.build());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void subsectionOfMapRequestWithCommonPrefix() throws IOException {
|
||||
this.snippets.expect("request-fields-beneath-a")
|
||||
.withContents(tableWithHeader("Path", "Type", "Description").row("`b.c`",
|
||||
"`String`", "two"));
|
||||
|
||||
requestFields(beneathPath("a"))
|
||||
.andWithPrefix("b.", fieldWithPath("c").description("two"))
|
||||
.document(this.operationBuilder.request("http://localhost")
|
||||
.content("{\"a\": {\"b\": {\"c\": \"charlie\"}}}").build());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void arrayRequestWithFields() throws IOException {
|
||||
this.snippets.expectRequestFields()
|
||||
|
||||
@@ -95,6 +95,17 @@ public class ResponseFieldsSnippetTests extends AbstractSnippetTests {
|
||||
.build());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void subsectionOfMapResponseWithCommonsPrefix() throws IOException {
|
||||
this.snippets.expect("response-fields-beneath-a")
|
||||
.withContents(tableWithHeader("Path", "Type", "Description").row("`b.c`",
|
||||
"`String`", "two"));
|
||||
responseFields(beneathPath("a"))
|
||||
.andWithPrefix("b.", fieldWithPath("c").description("two"))
|
||||
.document(this.operationBuilder.response()
|
||||
.content("{\"a\": {\"b\": {\"c\": \"charlie\"}}}").build());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void arrayResponseWithFields() throws IOException {
|
||||
this.snippets.expectResponseFields()
|
||||
|
||||
Reference in New Issue
Block a user