need some advice on designing my API. the frontend will communicate with it to fetch data. in my last project i built it using hyperlinked serialisers which i observed not add much benefit other than making the browser api easier to navigate. so this time, i am thinking of using model serialisers. is there a widely suggested guidelines on how to pick and design your serialisers?
#need to decide type of serialiser in DRF
3 messages · Page 1 of 1 (latest)
use model serializers for simplicity and performance and only reach for hyperlinked serializers if discoverability or hateoas is a real requirement for your api
The idea of hyperlinked serializers and a discoverable API is neat, but I have yet to see it used in production. It seems to be much more common to just represent relations with plain IDs.