1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-14 11:03:09 +02:00

docs: add possible value for bool parameters (#1486)

This commit is contained in:
Christopher Fenner 2020-04-30 06:39:48 +02:00 committed by GitHub
parent e77209922a
commit 6eb8dc8191
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -69,6 +69,7 @@ func setDefaultStepParameters(stepData *config.StepData) {
switch param.Type { switch param.Type {
case "bool": case "bool":
param.Default = "`false`" param.Default = "`false`"
param.PossibleValues = append(param.PossibleValues, true, false)
case "int": case "int":
param.Default = "`0`" param.Default = "`0`"
} }
@ -80,6 +81,7 @@ func setDefaultStepParameters(stepData *config.StepData) {
param.Default = fmt.Sprintf("`%v`", param.Default) param.Default = fmt.Sprintf("`%v`", param.Default)
case "bool": case "bool":
param.Default = fmt.Sprintf("`%v`", param.Default) param.Default = fmt.Sprintf("`%v`", param.Default)
param.PossibleValues = append(param.PossibleValues, true, false)
case "int": case "int":
param.Default = fmt.Sprintf("`%v`", param.Default) param.Default = fmt.Sprintf("`%v`", param.Default)
} }

View File

@ -20,7 +20,7 @@ var expectedResultDocument string = "# testStep\n\n\t## Description\n\nLong Test
"| `param1` | No | | |\n" + "| `param1` | No | | |\n" +
"| `param2` | Yes | | |\n" + "| `param2` | Yes | | |\n" +
"| `script` | Yes | | |\n" + "| `script` | Yes | | |\n" +
"| `verbose` | No | `false` | |\n\n" + "| `verbose` | No | `false` | `true`, `false` |\n\n" +
" * `param0`: param0 description\n" + " * `param0`: param0 description\n" +
" * `param1`: param1 description\n" + " * `param1`: param1 description\n" +
" * `param2`: param1 description\n" + " * `param2`: param1 description\n" +