}
if(plugin.isMethodAllowed(HttpMethod.GET) || plugin.isMethodAllowed(HttpMethod.POST))
apis.add(buildApi(plugin,resourceBundle));
TypeFactory typeFactory = objectMapper.getTypeFactory();
if(plugin.isHistoryEnabled())
{
apis.add(buildHistory(plugin,resourceBundle));
models.putAll(buildModels(String.format("%sHistoryResponse", plugin.getEndpointName()),
typeFactory.constructParametricType(HistoryResponse.class, Serializable.class, pluginVersion.getApiClass())));
}
api.setApis(apis);
models.putAll(buildModels(endpoint, typeFactory.constructType(pluginVersion.getApiClass())));
if(plugin.isMethodAllowed(HttpMethod.GET))
models.putAll(buildModels(String.format("%sEntityResponse", plugin.getEndpointName()),
typeFactory.constructParametricType(EntityResponse.class, pluginVersion.getApiClass())));
if(plugin.isMethodAllowed(HttpMethod.DELETE))
models.putAll(buildModels(String.format("%sDeleteResponse", plugin.getEndpointName()),
typeFactory.constructType(DeleteResponse.class)));
return api;
}