Nested API parameter validation in Rails with ActiveModel::Validations
12-Dec-2019 1652
In an earlier project we had a few affiliate partners with a deep desire to interact with our system in an automated fashion. So, I naturally created a new basic API endpoint for them to send leads to our system. Then we started testing the integration together and everything was rosy until we met some internal hard to debug errors in our end because of the missing or wrong data we received.So, I decided to put a validation layer in front of our API to prevent further hours of tedious debugging. (This proved to be worth it on the long run.).
Nested API parameter validation in Rails with ActiveModel::Validations #ruby #rubydeveloper #rubyonrails #Nested #parameter #validation #Rails #ActiveModel::Validations #activemodel::validations #api #parameter https://rubyonrails.ba/link/nested-api-parameter-validation-in-rails-with-activemodel-validations