in component-test/src/main/java/org/apache/fineract/cn/office/OfficeApiDocumentation.java [93:122]
public void documentFindOffice ( ) throws Exception {
final Office office = OfficeFactory.createRandomOffice();
office.setIdentifier("MyOffice");
office.setName("My Office");
office.setDescription("My Own Office");
this.organizationManager.createOffice(office);
this.eventRecorder.wait(EventConstants.OPERATION_POST_OFFICE, office.getIdentifier());
this.mockMvc.perform(get("/offices/" + office.getIdentifier())
.contentType(MediaType.APPLICATION_JSON_VALUE)
.accept(MediaType.ALL_VALUE))
.andExpect(status().isOk())
.andDo(document("document-find-office", preprocessResponse(prettyPrint()),
responseFields(
fieldWithPath("identifier").description("office's identifier"),
fieldWithPath("name").description("office name"),
fieldWithPath("description").description("office description"),
fieldWithPath("parentIdentifier").type("String").description("Parent's branch"),
fieldWithPath("address").type("Address").description("Office's address + \n " +
" *class* _Address_ { + \n" +
" private String street + \n" +
" private String city + \n" +
" private String region + \n" +
" private String postalCode + \n" +
" private String countryCode + \n" +
" private String country + \n" +
"}"),
fieldWithPath("externalReferences").description("External references"))));
}