-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Minor
-
Component/s: extensible-choice-parameter-plugin
jp.ikedam.jenkins.plugins.extensible_choice_parameter.ExtensibleChoiceParameterDefinition#getChoiceList
should be @Exported in order to get the choiceList in Remote Access API.
 It allows programs retrieve choices in this way, with Remote Access API (https://www.jenkins.io/doc/book/using/remote-access-api/):
$ curl --user username:password <JENKINS_URL>/job/<JOB_NAME>/api/json
{
"_class": "hudson.model.FreeStyleProject",
...
"description": "",
"displayName": "job1",
"displayNameOrNull": null,
"fullDisplayName": "job1",
"fullName": "job1",
"name": "job1",
...
"property": [
{
"_class": "hudson.model.ParametersDefinitionProperty",
"parameterDefinitions": [
{
"_class": "jp.ikedam.jenkins.plugins.extensible_choice_parameter.ExtensibleChoiceParameterDefinition",
"defaultParameterValue": {
"_class": "hudson.model.StringParameterValue",
"name": "extchoice1",
"value": "value1"
},
"description": "",
"name": "extchoice1",
"type": "ExtensibleChoiceParameterDefinition",
"choiceList": [
"value1",
"value2",
"value3"
]
}
]
}
],
...
}
Built-in choice parameter also exposed its choice in JENKINS-3703 to allow Eclipse retrieve choices to trigger builds. Built-in choice returns choices in REST api in this way:
{
"_class": "hudson.model.ChoiceParameterDefinition",
"defaultParameterValue": {
"_class": "hudson.model.StringParameterValue",
"name": "choice1",
"value": "value1"
},
"description": "",
"name": "choice1",
"type": "ChoiceParameterDefinition",
"choices": [
"value1",
"value2",
"value3"
]
}
See https://github.com/jenkinsci/extensible-choice-parameter-plugin/pull/43
- relates to
-
JENKINS-3703 Parameterized Build: get the list of declared parameters and default values
-
- Closed
-
-
JENKINS-66145 choices not exposed via api from view
-
- Resolved
-