use of com.google.api.services.discovery.model.ApiConfigs in project endpoints-java by cloudendpoints.
the class ProxyingDiscoveryProvider method getDirectory.
@Override
public DirectoryList getDirectory(String root) throws InternalServerErrorException {
try {
Map<ApiKey, String> configStrings = configWriter.writeConfig(rewriteConfigsWithRoot(getAllApiConfigs(), root));
ApiConfigs configs = new ApiConfigs();
configs.setConfigs(Lists.newArrayList(configStrings.values()));
return discovery.apis().generateDirectory(configs).execute();
} catch (IOException | ApiConfigException e) {
logger.atSevere().withCause(e).log("Could not generate or cache directory");
throw new InternalServerErrorException("Internal Server Error", e);
}
}
Aggregations