diff --git a/pkg/generator/helper/docuHelper.go b/pkg/generator/helper/docuHelper.go index 29a0b138c..6aa3f8a52 100644 --- a/pkg/generator/helper/docuHelper.go +++ b/pkg/generator/helper/docuHelper.go @@ -69,6 +69,7 @@ func setDefaultStepParameters(stepData *config.StepData) { switch param.Type { case "bool": param.Default = "`false`" + param.PossibleValues = append(param.PossibleValues, true, false) case "int": param.Default = "`0`" } @@ -80,6 +81,7 @@ func setDefaultStepParameters(stepData *config.StepData) { param.Default = fmt.Sprintf("`%v`", param.Default) case "bool": param.Default = fmt.Sprintf("`%v`", param.Default) + param.PossibleValues = append(param.PossibleValues, true, false) case "int": param.Default = fmt.Sprintf("`%v`", param.Default) } diff --git a/pkg/generator/helper/docuHelper_test.go b/pkg/generator/helper/docuHelper_test.go index 767f687ff..edd5540f8 100644 --- a/pkg/generator/helper/docuHelper_test.go +++ b/pkg/generator/helper/docuHelper_test.go @@ -20,7 +20,7 @@ var expectedResultDocument string = "# testStep\n\n\t## Description\n\nLong Test "| `param1` | No | | |\n" + "| `param2` | Yes | | |\n" + "| `script` | Yes | | |\n" + - "| `verbose` | No | `false` | |\n\n" + + "| `verbose` | No | `false` | `true`, `false` |\n\n" + " * `param0`: param0 description\n" + " * `param1`: param1 description\n" + " * `param2`: param1 description\n" +