Project

General

Profile

Bug #22752

Updated by Tomáš Strachota almost 7 years ago

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: 
 <pre> 
 [1] pry(#<HammerCLI::Apipie::OptionBuilder>)> param.validator 
 => "Must be one of: <code>string</code>, <code>boolean</code>, <code>integer</code>, <code>real</code>, <code>array</code>, <code>hash</code>, <code>yaml</code>, <code>json</code>." 
 [2] pry(#<HammerCLI::Apipie::OptionBuilder>)> param.expected_type.to_s 
 => "string" 
 </pre> 
 <pre> 
 [1] pry(#<HammerCLI::Apipie::OptionBuilder>)> param.validator 
 => "Must be one of: String, Array." 
 [2] pry(#<HammerCLI::Apipie::OptionBuilder>)> param.expected_type.to_s 
 => "string" 
 </pre>

Back