When wanting to validate external data with Ecto like this and it’s a nested data structure, I prefer using embedded_schema over schemaless changesets (which I use when validating flat data structures). I’ve also used Goal, which is a wrapper around Ecto.
I’ve also been wanting to try the aforementioned Drops library, but have not yet done so.






















