Actions
Bug #30908
openContent View Filter Rule controller does not support the same parameters for CREATE and UPDATE
Status:
New
Priority:
Normal
Assignee:
-
Category:
Content Views
Target version:
-
Description
Ohai,
looking at app/controllers/katello/api/v2/content_view_filter_rules_controller.rb
, I see the following difference between POST /content_view_filters/:content_view_filter_id/rules
and PUT /content_view_filters/:content_view_filter_id/rules/:id
@@ -75,15 +75,19 @@ module Katello N_("Update a filter rule. The parameters included should be based upon the filter type.") param :content_view_filter_id, :number, :desc => N_("filter identifier"), :required => true param :id, :number, :desc => N_("rule identifier"), :required => true - param :name, String, :desc => N_("package, package group, or docker tag: name") + param :name, Array, of: [String], :desc => N_("package, package group, or docker tag names") + param :uuid, String, :desc => N_("package group: uuid") param :version, String, :desc => N_("package: version") param :architecture, String, :desc => N_("package: architecture") param :min_version, String, :desc => N_("package: minimum version") param :max_version, String, :desc => N_("package: maximum version") param :errata_id, String, :desc => N_("erratum: id") + param :errata_ids, Array, :desc => N_("erratum: IDs or a select all object") param :start_date, String, :desc => N_("erratum: start date (YYYY-MM-DD)") param :end_date, String, :desc => N_("erratum: end date (YYYY-MM-DD)") param :types, Array, :desc => N_("erratum: types (enhancement, bugfix, security)") + param :date_type, String, :desc => N_("erratum: search using the 'Issued On' or 'Updated On' column of the errata. Values are 'issued'/'updated'") + param :module_stream_ids, Array, :desc => N_("module stream ids") def update update_params = rule_params update_params[:name] = update_params[:name].first if update_params[:name]
The diff is from todays master (3.18.0), but similar differences can be found in older releases (e.g. 3.12, which I accidentally happen to have at hand).
The discrepancy breaks API clients like foreman-ansible-modules which take the APIdoc as the source of truth what the server accepts.
I have no idea what implications the Array[String] vs String for name have, btw…
Actions