in component-test/src/main/java/org/apache/fineract/cn/group/GroupApiDocumentation.java [690:716]
public void documentUpdateGroupDefinition ( ) throws Exception {
final GroupDefinition randomGroupDefinition = GroupDefinitionGenerator.createRandomGroupDefinition();
this.testSubject.createGroupDefinition(randomGroupDefinition);
this.eventRecorder.wait(EventConstants.POST_GROUP_DEFINITION, randomGroupDefinition.getIdentifier());
Gson serialize = new Gson();
this.mockMvc.perform(put("/definitions/" + randomGroupDefinition.getIdentifier())
.accept(MediaType.APPLICATION_JSON_VALUE)
.contentType(MediaType.APPLICATION_JSON_VALUE)
.content(serialize.toJson(randomGroupDefinition)))
.andExpect(status().isAccepted())
.andDo(document("document-update-group-definition", preprocessRequest(prettyPrint()),
requestFields(
fieldWithPath("identifier").type("String").description("Group definition Identifier"),
fieldWithPath("description").type("String").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("Cycle of Meetings " +
" \n + " +
" *class* _Cycle_ { + \n" +
" private Integer numberOfMeetings; + \n" +
" private Frequency frequency; + \n" +
" private Adjustment adjustment; + \n" +
" } \n +")
)));
}