eeverman / eeverman/andhow

FlagProp's should note their 'flag' ability in the generated sample

Open
#704 0 comments 0 reactions 0 assignees View on GitHub
API Addition API Change enhancement
Dominant language
Java
Stars
25
Forks
34
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**
Looking at a config sample, its impossible to tell a BolProp from a FlagProp. The andhow.properties file is the defecto reference for properties, so it would be nice to have 'flaggability' noted in there.

**Describe the solution you'd like**
It would be helpful if the type were noted as '(Boolean, Flag)'. Then the default help text could explain what a flag is. If someone specifies help text, it would just replace that.
`ValueType` should include two new methods:
* `getStringFormatDescription()` which would provide help text for how to set a value from string (only non-null on properties that need it)
* `getTypeDescriptiveName()` which returns the simple destination type class name, or in cases like flag, something like `Boolean, flag`.

`Property.getHelpText()` would default to returning the getStringFormatDescription(). The sample printers would use `getTypeDescriptiveName()` for the type.

**Describe alternatives you've considered**
Could add another field beyond the help text for Properties behavior notes, but the help text is really ideal. Presumably, if someone specifies more info in help, they are taking control of user instructions, so its on them.

**Additional context**
It might be nice to add default help text for LocalDateTime as well.

Contributor guide

Open the contributing guide

Research direction

Start by locating ValueType, Property.getHelpText(), and the sample printers referenced in the issue. Trace how FlagProp and BolProp appear in the generated andhow.properties sample, then check existing tests around type names and help text. Done means flag properties are distinguishable, default string-format guidance is shown when applicable, and supplied help text replaces it.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
developer-experience, documentation
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.