{"action":"created","issue":{"url":"https://api.github.com/repos/Apipie/apipie-rails/issues/400","labels_url":"https://api.github.com/repos/Apipie/apipie-rails/issues/400/labels{/name}","comments_url":"https://api.github.com/repos/Apipie/apipie-rails/issues/400/comments","events_url":"https://api.github.com/repos/Apipie/apipie-rails/issues/400/events","html_url":"https://github.com/Apipie/apipie-rails/issues/400","id":111981505,"number":400,"title":"Merging @api_params with params","user":{"login":"joshpfosi","id":3605462,"avatar_url":"https://avatars.githubusercontent.com/u/3605462?v=3","gravatar_id":"","url":"https://api.github.com/users/joshpfosi","html_url":"https://github.com/joshpfosi","followers_url":"https://api.github.com/users/joshpfosi/followers","following_url":"https://api.github.com/users/joshpfosi/following{/other_user}","gists_url":"https://api.github.com/users/joshpfosi/gists{/gist_id}","starred_url":"https://api.github.com/users/joshpfosi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshpfosi/subscriptions","organizations_url":"https://api.github.com/users/joshpfosi/orgs","repos_url":"https://api.github.com/users/joshpfosi/repos","events_url":"https://api.github.com/users/joshpfosi/events{/privacy}","received_events_url":"https://api.github.com/users/joshpfosi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-17T19:45:23Z","updated_at":"2015-10-20T12:28:04Z","closed_at":null,"body":"Hi, I am working with a fairly large Rails API (55+ models) and would not like to switch all instances of `params` => `@api_params` (an undocumented requirement to use the value processing feature). If I throw a `params!.merge @api_params` into a `before_filter`, however, `apipie_validations` may not have been called yet. Calling it `:explicitly` causing results in strange behavior.\r\n\r\nSpecifically, if I make multiple request to the same endpoint within 1 rspec example, with different paramters, `@api_params` accumulates ALL the parameters across the different requests.\r\n\r\n```ruby\r\n    return unless defined? apipie_validations\r\n    apipie_validations\r\n    params.deep_merge! @api_params\r\n```"},"comment":{"url":"https://api.github.com/repos/Apipie/apipie-rails/issues/comments/149549975","html_url":"https://github.com/Apipie/apipie-rails/issues/400#issuecomment-149549975","issue_url":"https://api.github.com/repos/Apipie/apipie-rails/issues/400","id":149549975,"user":{"login":"joshpfosi","id":3605462,"avatar_url":"https://avatars.githubusercontent.com/u/3605462?v=3","gravatar_id":"","url":"https://api.github.com/users/joshpfosi","html_url":"https://github.com/joshpfosi","followers_url":"https://api.github.com/users/joshpfosi/followers","following_url":"https://api.github.com/users/joshpfosi/following{/other_user}","gists_url":"https://api.github.com/users/joshpfosi/gists{/gist_id}","starred_url":"https://api.github.com/users/joshpfosi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshpfosi/subscriptions","organizations_url":"https://api.github.com/users/joshpfosi/orgs","repos_url":"https://api.github.com/users/joshpfosi/repos","events_url":"https://api.github.com/users/joshpfosi/events{/privacy}","received_events_url":"https://api.github.com/users/joshpfosi/received_events","type":"User","site_admin":false},"created_at":"2015-10-20T12:28:04Z","updated_at":"2015-10-20T12:28:04Z","body":"Hmm it could be that. But that is necessary to ensure *all* params for a given endpoint are included, no? I claim that this is an actual bug in Apipie where `@api_params` needs to be reset at the beginning of `_apipie_define_validators`.\r\n\r\nRe: background: I definitely agree with the design decision to use `@api_params` and would much prefer to use it, however, the code base I'm working in is too intricate for such a blanket code change and the feature isn't worth the time required to be more judicious about the refactor."}}