I have an Api-Platform project where I have a rest-api that shows certain data. Currently the api returns ALL information, which isn't good. Can someone push me in the right direction?
I found this for adding extra data: https://api-platform.com/docs/core/serialization/#decorating-a-serializer-and-add-extra-data
Should I use the decorator approach mentioned in the doc above and just unset the fields that I don't want displayed? Is there perhaps some annotation I could use above fields in the entities so that they are omitted?
Thanks.