Project

General

Profile

Actions

Bug #22752

closed

Hammer wrongly determines parameter value of enums

Added by Tomáš Strachota almost 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Hammer core
Target version:
Difficulty:
Triaged:
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:

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

Also available in: Atom PDF