How are you approaching rendeding ecto model association using "viewless" JSON views?

Just use functional programming, like in your example. In my opinion, Ecto schemas have no business in the controller.