mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-13 08:55:44 +01:00
expose plugin dependencies
This commit is contained in:
@@ -6,6 +6,8 @@ import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@NoArgsConstructor
|
||||
@@ -18,6 +20,7 @@ public class PluginDto extends HalRepresentation {
|
||||
private String author;
|
||||
private String category;
|
||||
private String avatarUrl;
|
||||
private Set<String> dependencies;
|
||||
|
||||
public PluginDto(Links links) {
|
||||
add(links);
|
||||
|
||||
@@ -22,6 +22,7 @@ public abstract class PluginDtoMapper {
|
||||
|
||||
public PluginDto map(Plugin plugin) {
|
||||
PluginDto dto = createDto(plugin);
|
||||
dto.setDependencies(plugin.getDescriptor().getDependencies());
|
||||
map(plugin.getDescriptor().getInformation(), dto);
|
||||
if (dto.getCategory() == null) {
|
||||
dto.setCategory("Miscellaneous");
|
||||
|
||||
Reference in New Issue
Block a user