String resourcePath = api.getResourcePath();
if (!Strings.isNullOrEmpty(resourcePath)) {
String resourceName = resourcePath.replaceFirst("/", "").replaceAll("/", "_").replaceAll("[\\{\\}]", "");
resources.add(new ResourceListingAPI("/" + resourceName + ".{format}", api.getDescription()));
File apiFile = new File(outputDirectory, resourceName + ".json");
recorder.record(apiFile, api);
}
}
// write out json for api
ResourceListing listing = new ResourceListing(SWAGGER_VERSION, this.options.getApiVersion(), this.options.getDocBasePath(), resources,