Refactor to leverage Models / Serializers
- Symfony Doc
- Medium Nebojša Kamber Using Symfony Serializer to consume REST APIs in OOP way
- SymfonyCast JSON API Endpoint
Check Also the API Platform course at SymfonyCast, and especially chapter 09 The Serializer
Edited by Matthieu FAURE