Skip to content

Commit f17f9fc

Browse files
Merge pull request #77 from danielgtaylor/fix-param-name
fix: use param display name instead of name
2 parents 6e13db8 + fa8d26b commit f17f9fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cli/param.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ func typeConvert(from, to interface{}) interface{} {
2828
type Param struct {
2929
Type string `json:"type"`
3030
Name string `json:"name"`
31-
DisplayName string `json:"displayName,omitEmpty"`
31+
DisplayName string `json:"displayName,omitempty"`
3232
Description string `json:"description,omitempty"`
3333
Style Style `json:"style,omitempty"`
3434
Explode bool `json:"explode,omitempty"`
@@ -103,7 +103,7 @@ func (p Param) AddFlag(flags *pflag.FlagSet) interface{} {
103103
if p.DisplayName != "" {
104104
name = p.DisplayName
105105
}
106-
name = strcase.ToDelimited(p.Name, '-')
106+
name = strcase.ToDelimited(name, '-')
107107

108108
def := p.Default
109109

0 commit comments

Comments
 (0)