Skip to content

Commit 6f94dc5

Browse files
authored
Merge pull request #1188 from daspilker/JENKINS-51202
[JENKINS-51202] fixed API viewer
2 parents 350005c + 031cf68 commit 6f94dc5

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

docs/Home.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ Browse the Jenkins issue tracker to see any [open issues](https://issues.jenkins
3838
([JENKINS-43693](https://issues.jenkins-ci.org/browse/JENKINS-43693))
3939
* Enhanced support for the [Branch API Plugin](https://plugins.jenkins.io/branch-api)
4040
([JENKINS-54877](https://issues.jenkins-ci.org/browse/JENKINS-54877))
41+
* Fixed problem with API viewer
42+
([JENKINS-51202](https://issues.jenkins-ci.org/browse/JENKINS-51202))
4143
* Fixed [[Dynamic DSL]] problem
4244
([JENKINS-57817](https://issues.jenkins-ci.org/browse/JENKINS-57817))
4345
* 1.74 (May 01 2019)

job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/doc/GroovyDocHelper.groovy

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,16 @@ class GroovyDocHelper {
2424
Method method = clazz.methods.findAll { it.name == methodDoc.name() }.find { Method method ->
2525
List docParamNames = methodDoc.parameters().collect {
2626
String name = it.type()?.qualifiedTypeName() ?: it.typeName()
27+
if (name.contains('<')) {
28+
name = name[0..(name.indexOf('<') - 1)]
29+
if (name in ['Map', 'List']) {
30+
name = 'java.util.' + name
31+
} else if (name in ['Iterable']) {
32+
name = 'java.lang.' + name
33+
} else {
34+
throw new UnsupportedOperationException(name)
35+
}
36+
}
2737
if (name.startsWith('.')) {
2838
name = name[1..-1]
2939
}

0 commit comments

Comments
 (0)