Puppet params have types (string, undef, int, float, bool, array, hash), and these do matter - 'true' is not equal to true, etc. But we have no type information from puppet, so we have to make users make this determination, without being overwhelmed by it.
Assumptions:
- Strings are going to be the most popular type
- Things that appear to be integers / bools / floats are more likely to be integers / bools / floats of the appropriate type than strings that just have the appropriate contents
- There will be a 'raw yaml' interface for arrays and hashes
- We need to support 'undefined'
- We would like the UI to be as unconfusing as possible
Proposed co-ercion solution:
- Empty string implies undefined
- The literal value '' implies empty string
- The literal values true and false imply the boolean values true and false
- Values that are integers / floats will just be integers/floats
- Values that are integers / floats with quotes around them will be strings
- The literal values 'true' and 'false' will be literal strings
Basically, we guess-check to see if it is a bool or int or float - and if guess fails, it is a string. If users want to force it to be a string, put quotes around it.
To make this simple and easy and avoid people asking questions, ideally we'd pop up a nice and simple callout whenever someone types in 'true' or 'false' or a number into the textbox.