Actions
Bug #22752
closedHammer wrongly determines parameter value of enums
Status:
Closed
Priority:
Normal
Assignee:
Category:
Hammer core
Target version:
Difficulty:
Triaged:
Pull request:
Team Backlog:
Description
If a paremeter is documented as enum, containing any of the words 'array' or 'boolean', hammer wrongly creates a parameter with list or boolean normalizer. This results in passing wrong values to the api or errors during parsing options.
Some examples when this happens:
[1] pry(#<HammerCLI::Apipie::OptionBuilder>)> param.validator => "Must be one of:string
,boolean
,integer
,real
,array
,hash
,yaml
,json
."
[2] pry(#<HammerCLI::Apipie::OptionBuilder>)> param.expected_type.to_s
=> "string"
[1] pry(#<HammerCLI::Apipie::OptionBuilder>)> param.validator => "Must be one of: String, Array." [2] pry(#<HammerCLI::Apipie::OptionBuilder>)> param.expected_type.to_s => "string"
Actions