Update Epics API for Grape 1.7 compatibility
What does this MR do and why?
Contributes to #395809 (closed)
Problem
There is a change to parameter renaming functionality in Grape >= 1.6.0. https://github.com/ruby-grape/grape/blob/master/UPGRADING.md#upgrading-to--160
We need to update parameters for compatibility reasons.
When we send start_date
(deprecated params) to Epics API, Grape converts it to start_date_fixed
and applies necessary validations. Both Grape versions 1.5.2 and 1.7.0 treat it equally.
However, when we send start_date_fixed
(an expected param). Grape 1.7.0 removes it from the declared_params
list, because it expects to receive start_date
. But current version 1.5.2 allows that.
Solution
Don't use as
for parameters renaming. Instead define two separate
params and redefine them.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.