Using macros to interface with Faker lib for generating data

  1. I would say don’t use macros.
def resolve(model, fun) do
  Faker
  |> Module.concat(model)
  |> apply(fun, [])
end
  1. instead of check_model_validity(model)

why not just do Map.fetch! and let it crash if the model isn’t in there. Presumably you’re fully in control of the supplied models.