in component-test/src/main/java/org/apache/fineract/cn/group/GroupApiDocumentation.java [669:687]
public void documentCreateGroupDefinition ( ) throws Exception {
final GroupDefinition randomGroupDefinition = GroupDefinitionGenerator.createRandomGroupDefinition();
Gson serialize = new Gson();
this.mockMvc.perform(post("/definitions")
.accept(MediaType.APPLICATION_JSON_VALUE)
.contentType(MediaType.APPLICATION_JSON_VALUE)
.content(serialize.toJson(randomGroupDefinition)))
.andExpect(status().isAccepted())
.andDo(document("document-create-group-definition", preprocessRequest(prettyPrint()),
requestFields(
fieldWithPath("identifier").description("Group definition Identifier"),
fieldWithPath("description").description("Group definition description"),
fieldWithPath("minimalSize").type("Integer").description("Group's minimum size"),
fieldWithPath("maximalSize").type("Integer").description("Group's maximum size"),
fieldWithPath("cycle").type("Cycle").description("Group definition's cycle")
)));
}