Open eidge opened 8 years ago
I will leave this open as a feature request. It's possible that the only thing missing is that helpers
method, but generally the documentation tells you to declare reusable parameters inside a helpers
block. I would go from there.
That makes sense. Our API is big enough to have the same params repeated in more than one endpoint though (think filters, embeddable models, etc..)
Hi guys, do we have progress on this one?
Maybe you can help @tanduong?
Hello guys,
I'm trying to reuse param definition in my helpers but the
use :param
method doesn't seem to work inside Grape::API::Helpers.The use case is I have two different models that include a third model like this:
Unfortunately inside
Dog
grape complains that it cannot find params for :animal. I've tried extending and including the Animal module with no success.Also the helpers method is not included by Grape::API::Helpers.
Is there any way I can do this?