in component-test/src/main/java/org/apache/fineract/cn/provisioner/tenant/TenantApiDocumentation.java [81:116]
public void documentCreateTenant ( ) throws Exception {
final Tenant myTenant = Fixture.getCompTestTenant();
Gson gson = new Gson();
this.mockMvc.perform(post("/tenants")
.accept(MediaType.APPLICATION_JSON_VALUE)
.contentType(MediaType.APPLICATION_JSON_VALUE)
.content(gson.toJson(myTenant)))
.andExpect(status().isAccepted())
.andDo(document("document-create-tenant", preprocessRequest(prettyPrint()),
requestFields(
fieldWithPath("identifier").description("Tenant's Identifier"),
fieldWithPath("name").description("Tenant's name"),
fieldWithPath("description").description("Tenant's description"),
fieldWithPath("cassandraConnectionInfo").type("CassandraConnectionInfo").description("Tenant's Cassandra Connection Information +\n" +
" +\n" +
"*class* _CassandraConnectionInfo_ { +\n" +
" String clusterName; +\n" +
" String contactPoints; +\n" +
" String keyspace; +\n" +
" String replicationType; +\n" +
" String replicas; +\n" +
" } +"),
fieldWithPath("databaseConnectionInfo").type("_DatabaseConnectionInfo_").description("Tenant's Database Connection Information +\n" +
" +\n" +
"*class* _DatabaseConnectionInfo_ { +\n" +
" String driverClass; +\n" +
" String databaseName; +\n" +
" String host; +\n" +
" String port; +\n" +
" String user; +\n" +
" String password; +\n" +
" } +")
)
));
}