You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using this bundle with FosRestBundle. If I serialize an object and its referring objects I want to control what is being printed to the Rest clients. My current solution is to write @ExclusionPolicy("all") on each entity and then use @expose on the properties I want to expose.
The problem is when a developer forgets about the API and creates a new relation between two objects A and B where A is a part of the Rest API. Now will all properties of B be exposed.
Therefore I wish to have a setting in config.yml with the default exclusion policy. If I look at the driver (ie JMS\Serializer\Metadata\Driver\YamalDriver line 45) you have hard coded the exclusion policy to be 'NONE'.
I could make the change myself and do a pull request if you like.
Is that feature of any interest? I want to have full control of what is going to be serialized.
The text was updated successfully, but these errors were encountered: