diff --git a/help.go b/help.go index c651216..a3f4793 100644 --- a/help.go +++ b/help.go @@ -129,10 +129,16 @@ func printHelpCommand(command string) { //Collect valid flag values var enum []any - if parameter.Value.Schema.Value.Items != nil { + if parameter.Value.Schema.Value.Type == "array" && + parameter.Value.Schema.Value.Items != nil && + parameter.Value.Schema.Value.Items.Value.Enum != nil { enum = parameter.Value.Schema.Value.Items.Value.Enum } + if parameter.Value.Schema.Value.Enum != nil { + enum = parameter.Value.Schema.Value.Enum + } + flags[renameFlag(parameter.Value.Name)] = Parameter{ varType: parameter.Value.Schema.Value.Type, description: renameFlag(parameter.Value.Description),