Bug #22964
closedSome numeric options are no longer recognized as numeric. Tests are failing.
Description
With recent change in recognition of option types in hammer [1] we tightened condition for numeric types.
There are some params improperly documented in API that produce unexpected type descriptions such as
{ "name": "architecture_id", "full_name": "hostgroup[architecture_id]", "description": "\n\u003cp\u003eArchitecture ID\u003c/p\u003e\n", "required": false, "allow_nil": true, "allow_blank": false, "validator": "number.", "expected_type": "string", "metadata": null, "show": true, "validations": [] },
These are no longer recognized as a numeric options.
The source param looks like
param :architecture_id, :number, :desc => N_('Architecture ID')
where the type :number is not valid type validator in Apipie. (correct ones are e.g. 'Integer' or 'Numeric' [2]3)
Prior this is fixed in API [4] Hammer should have either fixed the tests to reflect this new behavior or workaround the incorrectly typed params.
[1] https://github.com/theforeman/hammer-cli/pull/272
[2] https://github.com/Apipie/apipie-rails/blob/master/lib/apipie/validator.rb
[3] https://github.com/theforeman/foreman/blob/cb591e34f4e1f462b826a5f391bed20ceb192da3/config/initializers/apipie.rb#L71-L147
[4] http://projects.theforeman.org/issues/22963
Updated by Martin Bacovsky over 6 years ago
- Related to Bug #22963: Some API params are documented with wrong type added
Updated by The Foreman Bot over 6 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/hammer-cli-foreman/pull/360 added
Updated by Martin Bacovsky over 6 years ago
- Translation missing: en.field_release set to 350
Updated by Anonymous over 6 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset hammer-cli-foreman|ac3e0e053f367397c06e31d7b052b226be0d186d.