Dmytro Nesteriuk

Results 27 comments of Dmytro Nesteriuk

This issue is still valid: ```ruby class API < Grape::API prefix :api version 'v1', using: :path get '/' do puts hello_helper end helpers do def hello_helper 'Hello World!' end end...

@keithpitty @dblock I would pretend that `Grape::Entity` is a custom type which implements [the parse method](https://github.com/ruby-grape/grape#custom-types-and-coercions), thus, Grape won't know anything about Grape entity. I guess it is a right...

We still use 2.7 and don't plan to upgrade to 3.1, unfortunately, it is slower than 2.7, see more there https://www.reddit.com/r/ruby/comments/royv5z/benchmarking_ruby_25_to_31_and_yjit/

I would try to use [dependent params](https://github.com/ruby-grape/grape#dependent-parameters). An example from the doc: ```ruby given type: ->(val) { val == 'foo' } do requires :description end ```

@ly123525 it is recommended to use `declared(params)` to avoid [mass assignment](https://medium.com/@jaeger.rob/exploring-rails-mass-assignment-vulnerability-b8b3d19e20b6). I wouldn't fix anything in Grape.

ok, I figured it out when this behavior [was changed](https://github.com/ruby-grape/grape/pull/2189), actually, it is described in the [upgrading doc](https://github.com/ruby-grape/grape/blob/master/UPGRADING.md#upgrading-to--160), so it isn't a bug, it is how Grape works after 1.6.0...

@dblock This one might be closed, [the related](https://github.com/ruby-grape/grape/issues/1592) issue was fixed.

This one is tricky. First problem: https://github.com/ruby-grape/grape/blob/62b9f6cc33adcd67e1a4654693fb07b06ca51305/lib/grape/validations/params_scope.rb#L50 If a scope (`foos` in this case) is empty and all children are empty too, the validation should be skipped. Second problem: https://github.com/ruby-grape/grape/blob/62b9f6cc33adcd67e1a4654693fb07b06ca51305/lib/grape/validations/validators/base.rb#L47...

What if we fix it [this way](https://github.com/ruby-grape/grape/compare/bugfix/memory-leak)? Yeah, `API.compile!` will be mandatory in this case, however, we might clean up some things, for example, `@setup` variable :thinking:

@Bilal-Abbas-Gigalabs which version of Grape and Rack do you use?