mirror of
https://gitee.com/dcren/initializr.git
synced 2025-09-18 17:48:14 +08:00
Add optional links to a dependency
See gh-163
This commit is contained in:

committed by
Stephane Nicoll

parent
9c7bdcc5bf
commit
d8a1927a36
@@ -57,6 +57,9 @@ class DependencyMetadataV21JsonMapper implements DependencyMetadataJsonMapper {
|
||||
if (dep.repository) {
|
||||
result.repository = dep.repository
|
||||
}
|
||||
if (dep.links) {
|
||||
result.links = dep.links
|
||||
}
|
||||
result
|
||||
}
|
||||
|
||||
|
@@ -52,6 +52,9 @@ class InitializrMetadataV21JsonMapper extends InitializrMetadataV2JsonMapper {
|
||||
if (dependency.versionRange) {
|
||||
content['versionRange'] = dependency.versionRange
|
||||
}
|
||||
if (dependency.links) {
|
||||
content.links = dependency.links
|
||||
}
|
||||
content
|
||||
}
|
||||
|
||||
|
@@ -82,6 +82,10 @@ class UiController {
|
||||
if (d.description) {
|
||||
result.description = d.description
|
||||
}
|
||||
if (d.links) {
|
||||
result.url = d.links[0].url
|
||||
result.links = d.links
|
||||
}
|
||||
if (d.weight) {
|
||||
result.weight = d.weight
|
||||
}
|
||||
|
Reference in New Issue
Block a user