Skip to content
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

Merged
merged 2 commits into from
Nov 15, 2018

Conversation

iNecas
Copy link
Member

@iNecas iNecas commented Nov 9, 2018

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.

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.
iNecas added a commit to iNecas/katello that referenced this pull request Nov 9, 2018
`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.
iNecas added a commit to iNecas/katello that referenced this pull request Nov 9, 2018
`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.
@iNecas
Copy link
Member Author

iNecas commented Nov 9, 2018

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 :)

Copy link

@johnpmitsch johnpmitsch left a 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:
h3ere

And they are there with this and the Katello PR
here

@iNecas
Copy link
Member Author

iNecas commented Nov 15, 2018

Thanks for feedback. Merging now

@iNecas iNecas merged commit 040c4d8 into Apipie:master Nov 15, 2018
@iNecas
Copy link
Member Author

iNecas commented Nov 16, 2018

apipie-rails-0.5.14 has just been released, including this fix

iNecas added a commit to iNecas/katello that referenced this pull request Nov 16, 2018
`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.
johnpmitsch pushed a commit to Katello/katello that referenced this pull request Nov 16, 2018
`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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants