Nested API parameter validation in Rails with ActiveModel::Validations

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 #activemodel::validations #api #parameter https://rubyonrails.ba/single/nested-api-parameter-validation-in-rails-with-activemodel-validations

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles