Add default title to choices

This commit is contained in:
jamesread 2021-11-02 22:01:01 +00:00
parent 4b2ef44959
commit 6357c9dc61
1 changed files with 6 additions and 0 deletions

View File

@ -38,6 +38,12 @@ func sanitizeActionArgument(arg *ActionArgument) {
arg.Title = arg.Name
}
for idx, choice := range arg.Choices {
if choice.Title == "" {
arg.Choices[idx].Title = choice.Value
}
}
sanitizeActionArgumentNoType(arg)
// TODO Validate the default against the type checker, but this creates a