Project

General

Profile

Bug #22753

Some API parameters are wrongly documented as enum types

Added by Tomáš Strachota 8 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Category:
API
Target version:
Difficulty:
Triaged:
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

There are several params in the apidoc that are wrongly documented as enum types. Authors most likely intended to validate the parameter for multiple allowed values, but apipie interprets the array syntax as enum.
E.g.:

param :value, LookupKey::KEY_TYPES # -> [ string, boolean, integer, real, array, hash, yaml, json ]

As a result hammer validates such options and raises an exception if ti contains values other than enumerated, which makes the commands unusable.


Related issues

Related to Hammer CLI - Bug #22751: Adding override values doesn't work with 1.17Closed2018-03-02
Related to Foreman - Bug #17087: Updating default_value of a hash/array smart class parameter with a non string value should return an error messageClosed2016-10-25
Related to Katello - Bug #22754: Content view filter rule name param is wrongly documented as enumClosed2018-03-02

Associated revisions

Revision cb591e34 (diff)
Added by Tomáš Strachota 7 months ago

Fixes #22753 - add apipie validator for multiple allowed types

History

#1 Updated by The Foreman Bot 8 months ago

  • Assignee set to Tomáš Strachota
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/5286 added

#2 Updated by Tomáš Strachota 8 months ago

  • Related to Bug #22751: Adding override values doesn't work with 1.17 added

#3 Updated by Tomáš Strachota 8 months ago

  • Related to Bug #17087: Updating default_value of a hash/array smart class parameter with a non string value should return an error message added

#4 Updated by Tomáš Strachota 8 months ago

  • Related to Bug #22754: Content view filter rule name param is wrongly documented as enum added

#5 Updated by Anonymous 7 months ago

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

#6 Updated by Ivan Necas 7 months ago

  • Legacy Backlogs Release (now unused) set to 330

Also available in: Atom PDF