Details
-
Type:
Improvement
-
Status: Fixed but Unreleased (View Workflow)
-
Priority:
Minor
-
Resolution: Fixed
-
Component/s: extensible-choice-parameter-plugin
-
Labels:
-
Similar Issues:
Description
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
Attachments
Issue Links
- relates to
-
JENKINS-3703 Parameterized Build: get the list of declared parameters and default values
-
- Closed
-
Thanks a lot for your contribution.
extensible-choice-parameter-1.7.0 is released.
It will be available in the update center in a day.
Please try that.