From c641b48cd230d8b7c94b6b13d34753b0d22b834a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Ne=C4=8Das?= Date: Fri, 9 Nov 2018 17:40:21 +0100 Subject: [PATCH] Fixes #25142 - fix extending module_streams api docs `update_api` is only usable from within a concern. When extending an API inside controller that's coming from concern, `apipie_update_params` should be used instead. Also, there has been an issue on apipie side, that prevented merging top-level params (see https://github.com/Apipie/apipie-rails/pull/642). Both changes are needed in order for this issue to be resolved. --- app/controllers/katello/api/v2/module_streams_controller.rb | 3 ++- katello.gemspec | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/katello/api/v2/module_streams_controller.rb b/app/controllers/katello/api/v2/module_streams_controller.rb index 185b91a223f..2ecf2805407 100644 --- a/app/controllers/katello/api/v2/module_streams_controller.rb +++ b/app/controllers/katello/api/v2/module_streams_controller.rb @@ -6,7 +6,8 @@ class Api::V2::ModuleStreamsController < Api::V2::ApiController before_action :check_params, :only => :index - update_api(:index) do + # updating params inherited from Katello::Concerns::Api::V2::RepositoryContentController + apipie_update_params([:index]) do param :host_ids, Array, :desc => N_("List of host id to list available module streams for") param :name_stream_only, :boolean, :desc => N_("Return name and stream information only)") end diff --git a/katello.gemspec b/katello.gemspec index eaa63e8bfb1..0ecf5f817bc 100644 --- a/katello.gemspec +++ b/katello.gemspec @@ -33,7 +33,7 @@ Gem::Specification.new do |gem| gem.add_dependency "qpid_messaging" gem.add_dependency "gettext_i18n_rails" - gem.add_dependency "apipie-rails", ">= 0.5.4" + gem.add_dependency "apipie-rails", ">= 0.5.14" # Pulp gem.add_dependency "runcible", ">= 2.9.0", "< 3.0.0"