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 9, 2018
1 parent a9383fb commit fa0b28b
Showing 1 changed file with 2 additions and 1 deletion.
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

0 comments on commit fa0b28b

Please sign in to comment.