dwincort · GitHub

As mentioned in #61, it would be nice if default values showed up in help messages. This PR implements such a change that I'm using personally and thought might be desired upstream.

This is a small change so that a field with <!> "defaultValue" will show (Default: defaultValue) in the help string. I opted to put this in the parseFields definition, which means that the order of field decorators now matters: that is, if one writes ... <!> "1" <?> "Field help", then the help text will read Field help (Default: 1), but if the order is ... <?> "Field help" <!> "1", then the help text will read Field help. This is by design so that the behavior could be overridden if desired.

Read the original on github.com ↗