docBundles.get(plugin.getCoordinates().getArtifactId());
if (docs != null && !docs.isEmpty()) {
for (DocumentationBundle bundle : docs) {
// here, we (mis)use the documentation field, to store path segments only, the REST resource will create
// proper URLs out this these.
DocumentationLink link = new DocumentationLink();
link.setLabel(bundle.getDescription());
link.setUrl(bundle.getPluginId() + "/" + bundle.getPathPrefix());
result.addDocumentation(link);
}
}
// TODO: log/diagnose OSGi issues?