Oh, I think this is just a misunderstanding about best practices then for JSON encoding. It is NOT considered a best practice to use @derive for doing encodings for an API. Instead you should be using JSON views. This post all the way back from 2015 is still relevant: https://rokkincat.com/blog/2015-03-17-json-views-in-phoenix/






















