Skip to content

Commit

Permalink
Fixes #37981 - generic content units api docs fixes
Browse files Browse the repository at this point in the history
* Fixes translating the content units param requirement string
* Adds a validation for checking the content units param
  • Loading branch information
ianballou authored and qcjames53 committed Nov 13, 2024
1 parent c32d9ac commit 0f83665
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ module Katello
class Api::V2::GenericContentUnitsController < Api::V2::ApiController
resource_description do
name 'Content Units'
param :content_type, String, desc: N_("Possible values: #{Katello::RepositoryTypeManager.generic_content_types.join(", ")}"), required: true
param :content_type, lambda { |val| Katello::RepositoryTypeManager.generic_content_types.include?(val) },
desc: N_("Possible values: %s") % Katello::RepositoryTypeManager.generic_content_types.join(", "), required: true
end
apipie_concern_subst(:a_resource => N_("a content unit"), :resource_id => "content_units")

Expand Down

0 comments on commit 0f83665

Please sign in to comment.