Skip to content

Commit

Permalink
Fixes #25142 - fix extending module_streams api docs
Browse files Browse the repository at this point in the history
`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 Apipie/apipie-rails#642).

Both changes are needed in order for this issue to be resolved.
  • Loading branch information
iNecas committed Nov 16, 2018
1 parent a9383fb commit c641b48
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/controllers/katello/api/v2/module_streams_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion katello.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit c641b48

Please sign in to comment.