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 #1

Updated by Tomáš Strachota almost 7 years ago

  • Description updated (diff)
Actions #2

Updated by The Foreman Bot almost 7 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Tomáš Strachota
  • Pull request https://github.com/theforeman/hammer-cli/pull/272 added
Actions #3

Updated by Anonymous almost 7 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #4

Updated by Martin Bacovsky almost 7 years ago

  • Translation missing: en.field_release set to 347
Actions

Also available in: Atom PDF