-
Notifications
You must be signed in to change notification settings - Fork 467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for adding new params via update_api
#642
Conversation
Before this patch, we only supported updating nested hashes. For example param :user, Hash do param :login, String end and param :user, Hash do param :oauth, String end has been merged properly. However when merging top-level params, such as param :login, String and param :oauth, String no changes were propagated.
`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.
`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.
In some Ruby implementations, we couldn't rely on specific order in the hash. The new matcher implementation doesn't rely on the order.
As a bonus, I've also fixed the intermittent test failure we've seen in master for past several weeks. @iNecas is ready for the weekend :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works for me!
Tested with Katello/katello#7827
On master katello and master apipie-rails, the name_stream_only
and host_id
params are missing:
Thanks for feedback. Merging now |
apipie-rails-0.5.14 has just been released, including this fix |
`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.
`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.
Before this patch, we only supported updating nested hashes. For example
and
has been merged properly. However when merging top-level params, such as
and
no changes were propagated.