File tree Expand file tree Collapse file tree 1 file changed +1
-17
lines changed Expand file tree Collapse file tree 1 file changed +1
-17
lines changed Original file line number Diff line number Diff line change @@ -10,23 +10,7 @@ You need to use serialization groups to hide some properties like `plainPassword
10
10
shown are handled with the [ ` normalization_context ` ] ( serialization-groups-and-relations.md#normalization ) , while the properties
11
11
you can modify are handled with [ ` denormalization_context ` ] ( serialization-groups-and-relations.md#denormalization ) .
12
12
13
- First register the following service:
14
-
15
- ``` yaml
16
- # app/config/services.yml
17
-
18
- resource.user :
19
- parent : " api.resource"
20
- arguments : [ "AppBundle\Entity\User" ]
21
- calls :
22
- - method : " initNormalizationContext"
23
- arguments : [ { groups: [ "user_read" ] } ]
24
- - method : " initDenormalizationContext"
25
- arguments : [ { groups: [ "user_write" ] } ]
26
- tags : [ { name: "api.resource" } ]
27
- ` ` `
28
-
29
- Then create your User entity with serialization groups:
13
+ Create your User entity with serialization groups:
30
14
31
15
``` php
32
16
<?php
You can’t perform that action at this time.
0 commit comments